Here’s How To Make An Extension Compatible With Prism (Two-ish)

I know it’s been a while since I’ve posted. There’s been a lot going on – school, work, home, you get the point. Anyway, I’ve been trying to keep my last post on how to make extensions compatible with Prism up-to-date, but this is turning out to be a difficult task. So I’m just going to post new instructions as needed. Basically, everything remains the same but the version string changes. The DOM inspector is the key to figuring out the correct target to put into your extension’s install.rdf. Clear as mud yet? Well, let me lay out the steps for you again here.

Step 1
Navigate to the Prism installation directory, in Windows this is:
C:\Program Files\Prism\

Open up the extensions folder, then the DOM inspector extension folder:
C:\Program Files\Prism\extensions\inspector@mozilla.org

Now open the “install.rdf” file and find this section of code which can be used (usually) as-is in most extensions pasted in the right place (just use the extension’s preconfigured targets as your guide on where to place it):


<em:targetApplication>
<!– Prism –>
<Description>
<em:id>prism@developer.mozilla.org</em:id>
<em:minVersion>0.4</em:minVersion>
<em:maxVersion>1.0.0.*</em:maxVersion>
</Description>
</em:targetApplication>

Step 2
Open up your extension’s xpi file using 7zip or your favorite archiving tool and extract the install.rdf file.

Open that install.rdf file with a text editor (other than notepad which doesn’t understand the line breaks used by other editors) and find the area where it lists the installation targets and insert your copied text into that or modify one of the install targets with the appropriate information from the DOM inspector extension install.rdf file.

Step 3
Install the extension. This will get tricky due to the way Prism’s developers have modified the profiles and what not. Well, I say that, but it really only gets that tricky if you’re manually installing the extension. Prism developers have seen fit to include the Addons menu item from the Prism menu in the lower right of Prism’s window to help things go more smoothly.

One of the ways to use this new install feature for an extension is globally, which means all webapps will be able to use the extension. This is the least preferred manner due to the fact that you won’t want all extensions available for all webapps in most cases. An example would be having the Better Gmail extension available for Bloglines – don’t think that’s real necessary, do you? So plan accordingly.

Using the second, and more preferred method, you just open your webapp. Open your webapp’s Addons panel, then install by either dragging and dropping the extension onto it, or by clicking the “Install…” button and navigating to the extension and selecting it for installation.

Conclusion
That should be about it. My next Prism post will be about how to make one of two stand alone Firefox/Prism exention webapps – POW local server or Scribefire standalone webapp. Stay tuned, we get to play with chrome!!

Links:

Prism


18 Responses to “Here’s How To Make An Extension Compatible With Prism (Two-ish)

  • avatar
    1
    Lucky Disasters » WebRunner now Prism, Whatever - Here’s How To Make An Extension Compatible With At Least One…
    June 11th, 2008 22:46

    [...] UPDATE AGAIN! 080611 I’ve made a new post on this subject cause it’s easier to update by adding new posts ins… [...]

  • avatar
    2
    Sid
    June 28th, 2008 21:19

    Hi,

    I am glad i found your blog, as I’m trying to install the Meebo extension in prism and so far have been unable to. In the comments about that firefox add on (Meebo) on mozilla.org someone mentions it works fine with prism, so I’m hoping I can get it to work.

    Unfortunately, when i go to C:\Program Files\Prism\extensions there is nothing in that directory. Any chance you could tell me how to get the DOM Inspector install? I attempted to install the actual DOM Inspector Add-on from (https://addons.mozilla.org/en-US/firefox/downloads/file/14870/dom_inspector-1.8.1.2-tb.xpi) but had no luck installing it in prism (says it is incompatible). I’ve tried googling for “Prism DOM Inspector” with similiarly no luck. Any guidance?

    This is Vista Home Basic, FF 3 Installed, Prism .9 Win32. I know you’re not tech support, but I thought I might ask =)

    Thanks,

    Sid

  • avatar
    3
    Kris
    June 29th, 2008 22:33

    Thanks for the comments Sid, as it turns out, I had the same problem when I started working with Prism on Vista Business. I’ve also done some new builds recently and after installation, the extensions weren’t there, so they may be hold outs from the older installs I have on my other system. Any-who, I’ve uploaded the install.rdf for the inspector extension on my system as well as another with a different implementation of the target browser.

    I’ve used these methods for creating several standalone webapps based on Firefox extensions (which I hope to have instructions for up soon).

  • avatar
    4
    Sid
    June 30th, 2008 04:12

    Thanks for the help Kris. So I was able to install the meebo plugin in Prism, but now nothing happens – I see it in my add ons list, but the add on itself appears to not do anything.

    Perhaps it is *really* not compatible with prism since it requires a sidebar, and perhaps prism doesn’t support that. Or maybe I just need to research this further. Either way, I am a step closer!

    Thanks for your help and replying. I’ll try out some more add ons later now that I was finally able to get one install to work!

    Sid

  • avatar
    5
    ian
    July 16th, 2008 14:24

    easygestures did not work for – i could get it to show up in the add ons by modifying install.rdf, but it would not copy the files, so I manually extracted and copied under extensions/ – still no luck though

    it would seem that Prism does not play nice with extensions, I will stick with plain ol FireFox->’new window’ for now…

  • avatar
    6
    Ryan
    August 1st, 2008 00:05

    I’ve been trying to get Better Gmail working through the Prism addon for Firefox 3 and am still unable to. In the Better Gmail addon, I changed and added the code so that it looks like:

    Did I at least get this part right? And do I need to edit the Prism addon before I install it in Firefox?

    Thanks for the help,
    Ryan

  • avatar
    7
    Ryan
    August 1st, 2008 00:08

    Sorry, I’ll try again:
    “… that it looks like:”

  • avatar
    8
    Kris
    August 4th, 2008 08:21

    Hey Ryan,
    Sorry WordPress doesn’t like HTML in comments, but I think from now on if you use:

    <pre lang="HTML">
    code
    < /pre>

    (without that space before the “/” in the closing pre)

    It should recognize it. Better Gmail did give me fits for a while as well, but I haven’t worked with the latest version. I’ll take a look and see what I can find, but if you’d like to email me the file, I’d be happy to look at what you’ve got as a starting point as well…

  • avatar
    9
    Manolo
    August 16th, 2008 14:58

    ok i add the extensions remember the milk for gmail and i see it on the addons page, but nothing happend, also i edit the js file of the extensions and put alert(“hello”); but the alert never comes up.

    After the extensions is installed where Prism put the files?

    i look into (my pc is spanish):

    C:\Documents and Settings\Administrator\Configuración local\Datos de programa\Prism\

    and:

    c:\program files\Prism\components

    and dont see any files of the XPI

  • avatar
    10
    Manolo
    August 17th, 2008 00:30

    Well, after a LOT of testing i finally get the RTM extension to work in Prism, but unfortunally there was a couple of “hard things” i must to do before have success. Is possible that must of this things must to be done in order to get other extensions to work. Im interested in this, so if someone need help can write me a mail.

    i dont remember all but:

    1) after you do the steps on this post the extension is loaded aparently ok but nothing happens, thats cause in the chrome.manifest the XUL file is loading like:

    overlay chrome://browser/content/browser.xul chrome://rtmgmail/content/script-compiler-overlay.xul

    But browser.xul dont exists in Prism!! thats the default browser schema for firefox!.

    so i must change to:

    overlay chrome://webrunner/content/webrunner.xul chrome://rtmgmail/content/script-compiler-overlay.xul

    webrunner.xul is the schema for prism.

    2) this:

    var appcontent=window.document.getElementById(“appcontent”);

    dont works in Prism, appcontent is a element where the tabbed browser is (The JS on the extensions runs from the chrome perspective, not from the document), but only exist on firefox, not in prism so i must change it to:

    var appcontent=window.document.getElementById(“browser_content”); //browser content is the document container for Prism

    3)

    The RTM extension load a couple of JS from they server, but i need to download that JS and put inside the extension for a lot of reasons, for example, when you are not logged in there is a messege with a link “login to view your task”. if you click on “login” your default browser is launched…

    I need to modified the extension to look like:

    http://www.evernote.com/shard/s1/res/504b185c-4a3e-4cec-a71c-4cac6083f8b8

    and make the login proceduro on gmail.

    Well, after that the extension is working like a charm… i will package it and upload to my server… if anyone is interested…

  • avatar
    11
    manolo
    September 14th, 2008 20:49

    i upload the XPI to made works the RTM extension in prism, this the link:

    http://www.arnoldroa.com/software/remember-the-milk-gmail-y-prism/

    is a spanish blog, but you can get it at the end of the page! and please comment, dont cares you dont speak spanish =)

  • avatar
    12
    airis
    October 26th, 2008 16:27

    I’ve been looking for something like this for ages, but I have a slight problem. Is there a way to make this work for the Firefox addon of Prism, Refractor?

    Refractor is an addon that creats Prism apps from within Firefox, so I don have C:\Program Files\Prism\extensions\inspector@mozilla.org or anything like that. I would really love to be able to have Better Gmail 2 in my Gmail app.

    Thanks!

  • avatar
    13
    Marcel
    November 5th, 2008 11:22

    I’m using a mac; I’ve tried both the FF extension and the standalone app and neither of them have anything by default in the ‘extensions’ folder (which incidentally is in ‘~/Library/Application Support/YourAppName/Profiles/ProfileName/extensions’ for both of them).

    I tried modifying the extension as described in the previous post and also with the XML in this post, and installing it using the built-in installer and the Extensions.webapp provided from this site (and just dropping it in the extensions folder in desperation!).

    Nothing works. I can’t browse extensions and when I try to install from the Extensions.webapp, I am told the install-xxx.rdf (where xxx is a random string) is corrupted or doesn’t exist.

    I’m at my wits end and REALLY want to install GTDInbox onto my Gmail app :(

    Can anyone help?

    Thanks

    Marcel

  • avatar
    14
    Lucky Disasters » Prism Information - In Depth
    November 6th, 2008 14:26

    [...] also been running into a problem described by commenter Marcel, here. I’ve been getting a similar error under Windows for different extensions when I try to [...]

  • avatar
    15
    Mahal kita » How to install Adblock Plus in Prism 0.9
    November 8th, 2008 21:52

    [...] (9/11/2008): I’ve found a nicer way to do this. For your convenience, here’s Adblock Plus 0.7.5.5 for Prism, created using the [...]

  • avatar
    16
    LeafStorm
    November 29th, 2008 11:10

    I’m trying to hack up POW to work in Prism to deploy my PyTin framework for a project named DWA. After modifying install.rdf to include Prism as a target application (and making a change to POW’s “startup.sjs”), I created a Web app that would go to the address POW would broadcast on, and picked “Tools/Add-ons”. I tried to add my hacked-up XPI file, but it responded with ‘”POW” will not be installed because it does not provide secure updates’. I tried accessing the about:config and changing the “extensions.update.enabled” setting to False, but still no dice. Does anyone know how I can either (a) trick Prism into thinking the extension provides secure updates, or (b) keep Prism from checking for it?

    Regards, LeafStorm.

  • avatar
    17
    nicolas' weblog @ trevize.net » Blog Archive » Prism et GreaseMonkey
    January 28th, 2009 16:06

    [...] comportement sous Prism, comme FlashBlock par exemple. Il y a peut être un élément de réponse ici (dans le commentaire n°10), en fait les overlays comme: overlay [...]

  • avatar
    18
    reed1
    January 13th, 2010 23:47

    worked, thanks : )

Leave a Reply