HowTo: Change Locations in Prism

You may or may not know this, but you can use the Error Console in Prism to open new windows to any site you want. Just use the following javascript in the Code Evaluation box:

window.open('http://website.url','','');

This will open a new window to the address “http://website.url”, pretty basic stuff. Now, what happens if you want to change the location of the Prism window from your default webapp’s location. Well, you can still use the Error Console, but there’s a couple of layers of javascript reference you need to go through. If you try using this:

parent.location='http://website.url'

You redirect the Error Console to “http://website.url”, interesting (very, actually :), but not what we’re after. If you haven’t already done so, open the error console:
menu

Next, in the Code Evaluation text box, type the following:

parent.opener.content.location='about:config'

shot1shot2shot3

That’s about it, hit return or press “Evaluate” and you’re done. By using parent.opener.content.whatever you should be able to access all of Prism’s components. What? You don’t know what the other compents are?? Well, check out the webrunner.xul located in Prism’s install directory, in the chrome directory inside the webrunner.jar (copy, rename to .zip from .jar and extract).

Another thing you’ll learn from this file is a complete list of the navigation keys (look for the keyset directives) currently used by Prism:

Back=Alt+Left Arrow
Forward=Alt+Right Arrow
Home=Alt+Home (that’s the Home Key on your keyboard’s number pad BTW)
Reload Page=F5
Close=Accelerator Key (Ctrl Key)+w
Quit=Accelerator Key (Ctrl Key)+q
Print=Accelerator Key (Ctrl Key)+p

Prism as a TV

capture_02252009_194641I know I said that the next Prism related post I would be doing was one on manually installing an addon, but it’s taking me more time to get to than I had hoped. However, I do have another use for Prism that I’d like to share right now. I’ve been using Prism as a tool for creating TV show specific browsers for video sites. Veoh specifically, but I’m pretty sure you can do this for other video sharing sites as well.

Basically what I’ve done is used Prism to create a new webapp that points to the search URL of Veoh with a single program as the search term. For instance, right now I’m following the anime Toradora.

capture_02252009_194818To create the webapp, I’ve chosen to place a link on my desktop, used the search link above, and enabled the navigation keys for Prism:

Alt+Back Arrow = Back in History
Alt+Forward Arrow = Forward in History
Alt+Home = Home Page for webappX
etc.

Veoh Search Link:

http://www.veoh.com/search/videos/q/your+search+here

Prism automatically pulls the site’s favicon as the desktop icon (has anyone else experienced problems with Prism not correctly installing the icon from pre-bundled webapps?).

Other places where this could be useful (other than setting up your own custom television station on your desktop with play-on-demand access)? The instructors for the courses I’m taking right now at ECU via the web often put class lectures on both YouTube and ECU’s own servers (depending on the class and the web-savvy-ness of the instructor). This would be a perfect way to distribute these movies to students, simply by placing the right URL into Prism and bundling the webapp, you can create a feed specific video channel for student consumption.

Other thoughts on this process:

  • The ability to uninstall webapps would be useful. Manual uninstalls, while not difficult, are a pain.
  • An addon or webapp script for Prism to load into the sidebar with links or buttons corresponding to pre-configured feeds/pages to change the currently viewed page so that you can “change channels.”
  • Along those same lines, an addon with FF3′s built-in feed reader which would load into the sidebar would be a nifty means of navigating a number of pre-configured links… yes that would be nifty indeed…

Registry Seach and Destroy Missions Just Got Easier

Ever have to move a program folder after an install then try to update the registry so that everything still worked correctly?  Or how about simply having to make the same changes to a whole bunch of text strings in the registry manually? I recently had to do the former, a program installer wanted to put the program folder into C:\, but I prefer to have my programs in C:\Program Files – thanks. Some programs require a path without spaces (therefore, it helps to put them in the root folder), but others are just so old that they install to C:\ by default. Moving the program folder from C:\ to C:\Program Files works to move the files, but the registry keys will continue to point to a folder in the root directory (and of course will prevent your programs from completely working).

regrepl2To fix this you have to get adventurous and make edits to the registry. I found a solution to the slow process that is normally a standard part of finding and editing these entries. The program is called Registry Replace by Absolute Impulse. It allows you to do search and destroy string replacements similar to those you can perform with a standard text editor.