Greasemonkey patch for SeaMonkey 2.0

in The Banana Bar
Subscribe to Greasemonkey patch for SeaMonkey 2.0 34 posts, 9 voices



GIJoe Scriptwright
SeamonkeyMacintosh

http://www.seamonkey-project.org/ (Gecko/20091017 SeaMonkey/2.0)

Waiting for GreaseMonkey dev to add support to it.

Edit: too slow... done it before the dev :p

Go there.

 
Marti Scriptwright
FirefoxX11

GIJoe wrote:
Waiting for GreaseMonkey dev to add support to it.
This won't ever be done by them... Philip, I believe, is in charge of porting it. So patience. :)

 
smk Scriptwright
FirefoxWindows

Marti wrote:
This won't ever be done by them... Philip, I believe, is in charge of porting it. So patience. :)

you seem to hate the devs :p

 
Marti Scriptwright
FirefoxX11

smk wrote:
you seem to hate the devs :p
d: Incorrect. I lobbied to keep Seamonkey support in and of course that's not what they wanted. There was very little discussion and Seamonkey support was unilaterally stripped out of the GM source and many "voices silenced". I believe Philip is the one in charge for porting it. I'll see if I can dig up his contact info and send him a note. :)


Done! :)

 
sizzlemctwizzle Scriptwright
FirefoxMacintosh

I'm glad GM devs decided to support Songbird.

 
Tim Smart Scriptwright
FirefoxX11

sizzlemctwizzle wrote:
I'm glad GM devs decided to support Songbird.

Well they basically only had to add a few lines in install.rdf to make it work.

 
GIJoe Scriptwright
SeamonkeyMacintosh

in install.rdf, add:

    <!-- SeaMonkey -->
    <em:targetApplication>
      <Description>
        <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
        <em:minVersion>2.0</em:minVersion>
        <em:maxVersion>2.0.*</em:maxVersion>
      </Description>
    </em:targetApplication>

in chrome.manifest, add:

overlay    chrome://navigator/content/navigator.xul chrome://greasemonkey/content/browser.xul

Still missing something.... (scripts don't load... / problem in the chromeLoad)

 
IRoll11!~s Scriptwright
FirefoxWindows

Maybe you have to waterproof it first?

 
GIJoe Scriptwright
SeamonkeyMacintosh

Working in Seamonkey 2.0 now... the problem was the sidebar...

in browser.js, after "// seamonkey compat", add

  if (!this.sidebar) {
    this.sidebar = document.getElementById("gm-sidebar");
  }

in browser.xul, add:

	 <!-- Fake sidebar -->
	 <vbox id="appcontent">
		 <splitter id="gm-sidebar-splitter"/>
		 <vbox id="gm-sidebar"/>
	 </vbox>

 
Marti Scriptwright
FirefoxX11

Thanks... I'll forward this on. :)

 
GIJoe Scriptwright
SeamonkeyMacintosh

Found a better fix about the sidebar:

in browser.js, after "// seamonkey compat", add:

  if (!this.sidebar) {
    this.sidebar = document.getElementById("sidebar-box");
  }

 
GIJoe Scriptwright
SeamonkeyMacintosh
Here the diff:
content/browser.js
chrome.manifest
install.rdf
 
GIJoe Scriptwright
SeamonkeyMacintosh

Found a problem: GM_openInTab don't work with SM2...

Error: uncaught exception: Load of https://userscripts.org/scripts/show/33042 denied.

 
GIJoe Scriptwright
SeamonkeyMacintosh

New GreaseMonkey version... still no support for SM2...

 
GIJoe Scriptwright
SeamonkeyMacintosh
Patch in greasemonkey-2010-05-08-beta.xpi for SeaMonkey 2.x:

1) in /install.rdf, add:
    <!-- SeaMonkey -->
    <em:targetApplication>
      <Description>
        <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
        <em:minVersion>2.0</em:minVersion>
        <em:maxVersion>2.1.*</em:maxVersion>
      </Description>
    </em:targetApplication>

2) in /chrome.manifest, add:
overlay    chrome://navigator/content/navigator.xul chrome://greasemonkey/content/browser.xul

3) in /components/greasemonkey.js, before // Everything else supports 1.6., add:
  if(appInfo.name=='SeaMonkey' && (versionChecker.compare(appInfo.version, "2.0") >= 0)) {
    return "1.8";
  }

4) in /components/greasemonkey.js, replace:
    if (parseFloat(info.version, 10) < 3.0) {
      // Pre FF 3.0 wants the URL as the second argument.
      var newTab = chromeWin.openNewTabWith(
        url, safeContentWin.document.location.href, null, null, null, null);
    } else {
      // Post FF 3.0 wants the document as the second argument.
      var newTab = chromeWin.openNewTabWith(
        url, safeContentWin.document, null, null, null, null);
    }
by
    try {
      if (parseFloat(info.version, 10) < 3.0) {
        // Pre FF 3.0 wants the URL as the second argument.
        var newTab = chromeWin.openNewTabWith(
          url, safeContentWin.document.location.href, null, null, null, null);
      } else {
        // Post FF 3.0 wants the document as the second argument.
        var newTab = chromeWin.openNewTabWith(
          url, safeContentWin.document, null, null, null, null);
      }
    } catch(e) {
      var newTab = chromeWin.openNewTabWith(
        url, null, null, null, null, null);
    }

5) in /content/browser.js, after // seamonkey compat, add:
  if (!this.sidebar) {
    this.sidebar = document.getElementById("sidebar-box");
  }

6) for GreaseMonkey 0.9.x, in /content/browser.xul, replace all:
BrowserOpenAddonsMgr('userscripts');
by
try { BrowserOpenAddonsMgr('userscripts'); } catch(e) { toEM('userscripts'); }

 
cage_ User
SeamonkeyWindows

I made the changes to the files and I cannot seem to get this thing to install. I am continually getting a "Greasemonkey 0.8.20091209.4 could not be installed because it is not compatible with SeaMonkey 2.0.".

Am I missing something obvious here?

I'm using:
Build identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) Gecko/20091017 SeaMonkey/2.0

Turns out the install.rdf code requires case sensitivity! argh

It seems that the inline code tags of this forum strips case sensitivity.

 
GIJoe Scriptwright
SeamonkeyMacintosh

Corrected...
It's because i forgot to change the < and > to &lt; and &gt;

 
GIJoe Scriptwright
SeamonkeyMacintosh

Lol, Firebug work in Seamonkey 2.0.2
Still missing GreaseMonkey, because of the very lazy GM dev...

 
GIJoe Scriptwright
SeamonkeyMacintosh

Because the GreaseMonkey dev are very lazy, you still need to apply the same patch for Greasemonkey 0.8.20100211.5 so it work for Seamonkey 2.0.x

 
Marti Scriptwright
FirefoxX11

GIJoe wrote:
GreaseMonkey dev
Correction on nomenclature sir... GM Authors... the devs usually aren't to "blame". I don't know what happened to Phil I keep emailing him every so often but I guess Moz is keeping him too busy to come back around :\

 
GIJoe Scriptwright
SeamonkeyMacintosh

From wiki:

Original author: Aaron Boodman
Developer(s): Anthony Lieuallen, Johan Sundström

 
Marti Scriptwright
FirefoxX11

From AMO (the authoritative source):

Developers Anthony Lieuallen, Aaron Boodman, Johan Sundström
You are nitpicking worse than I am ;) *GRIN* Point being they aren't the only developers.

GIJoe wrote:
Lol, Firebug work in Seamonkey 2.0.2
Why is this not showing up in Seamonkey as an available addon?


For those interested I've uploaded the confirmed changes to the XPI from GIJoe above to my downloads. As I've worked with the original port author before I do know the suggested changes aren't 100% but it is enough to get Seamonkey rolling with most GM scripts. The only support I currently offer is the download and a verification check that the XPI is indeed installing and the changes are safe... beyond that I unfortunately don't have enough time yet to debug it with Seamonkey... it may not need it too. I will only be keeping the most current release version of GM there... so don't expect a history of downloads.

 
GIJoe Scriptwright
SeamonkeyMacintosh

check this:
http://home.kairo.at/blog/2010-01/firebug_1_5_a...

 
Marti Scriptwright
FirefoxX11

0.8.6 has been published on AMO... same changes from GIJoe seem to work well here... so publishing to my downloads. As I stated before all old versions won't be kept and are usually removed.

 
GIJoe Scriptwright
SeamonkeyMacintosh

Updated http://userscripts.org/topics/38360#posts-197377 so it can work with GM 0.9.x beta.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel