Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
Index: trunk/src/chrome.manifest =============================================================== --- trunk/src/chrome.manifest (revision 491) +++ trunk/src/chrome.manifest (working copy) @@ -1,3 +1,4 @@ content greasemonkey chrome/chromeFiles/content/ overlay chrome://browser/content/browser.xul chrome://greasemonkey/content/browser.xul +overlay chrome://songbird/content/xul/mainScriptsOverlay.xul chrome://greasemonkey/content/browser.xul locale greasemonkey en-US chrome/chromeFiles/locale/en-US/ Index: trunk/src/chrome/chromeFiles/content/browser.js =============================================================== --- trunk/src/chrome/chromeFiles/content/browser.js (revision 491) +++ trunk/src/chrome/chromeFiles/content/browser.js (working copy) @@ -11,7 +11,8 @@ var GM_BrowserUI = new Object(); GM_BrowserUI.QueryInterface = function(aIID) { if (!aIID.equals(Components.interfaces.nsISupports) && !aIID.equals(Components.interfaces.gmIBrowserWindow) && - !aIID.equals(Components.interfaces.nsISupportsWeakReference)) + !aIID.equals(Components.interfaces.nsISupportsWeakReference) && + !aIID.equals(Components.interfaces.nsIWebProgressListener)) throw Components.results.NS_ERROR_NO_INTERFACE; return this; @@ -55,6 +56,14 @@ GM_BrowserUI.chromeLoad = function(e) { this.toolsMenu = document.getElementById("taskPopup"); } + // songbird compat + if (!this.tabBrowser && window.gBrowser) { + this.tabBrowser = window.gBrowser; + } + if (!this.appContent && this.tabBrowser) { + this.appContent = this.tabBrowser.parentNode; + } + // update visual status when enabled state changes this.enabledWatcher = GM_hitch(this, "refreshStatus"); GM_prefRoot.watch("enabled", this.enabledWatcher); @@ -73,8 +82,9 @@ GM_BrowserUI.chromeLoad = function(e) { this.winWat = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher); + // we use this to determine if we are the active window sometimes // this gives us onLocationChange - document.getElementById("content").addProgressListener(this, + this.tabBrowser.addProgressListener(this, Components.interfaces.nsIWebProgress.NOTIFY_LOCATION); // update enabled icon @@ -107,7 +117,7 @@ GM_BrowserUI.registerMenuCommand = function(menuCommand) { */ GM_BrowserUI.openInTab = function(domWindow, url) { if (this.isMyWindow(domWindow)) { - document.getElementById("content").addTab(url); + this.tabBrowser.addTab(url); } } Index: trunk/src/chrome/chromeFiles/content/browser.xul =============================================================== --- trunk/src/chrome/chromeFiles/content/browser.xul (revision 491) +++ trunk/src/chrome/chromeFiles/content/browser.xul (working copy) @@ -62,6 +62,7 @@ <statusbarpanel id="gm-status" insertafter="livemark-button"> <label id="gm-status-label" collapsed="true" crop="end" style="width:0px; margin:0;" /> <image id="gm-status-image" width="16" height="16" style="margin:0 5px" + mousethrough="never" onclick="if (!event.button) GM_setEnabled(!GM_getEnabled()); else if (event.button == 1) GM_BrowserUI.manageMenuItemClicked();" context='gm-status-popup'/> Index: trunk/src/install.rdf =============================================================== --- trunk/src/install.rdf (revision 491) +++ trunk/src/install.rdf (working copy) @@ -30,6 +30,7 @@ <em:optionsURL>chrome://greasemonkey/content/manage.xul</em:optionsURL> <em:iconURL>chrome://greasemonkey/content/status_on.gif</em:iconURL> + <!-- Firefox --> <em:targetApplication> <Description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> @@ -38,6 +39,15 @@ </Description> </em:targetApplication> + <!-- Songbird --> + <em:targetApplication> + <Description> + <em:id>songbird@songbirdnest.com</em:id> + <em:minVersion>0.3pre</em:minVersion> + <em:maxVersion>0.3</em:maxVersion> + </Description> + </em:targetApplication> + <em:file> <Description about="urn:mozilla:extension:file:greasemonkey"> <em:package>content/</em:package>
This paste will be private.
From the Design Piracy series on my blog: