Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Workaround for GreaseFire compatibility.

Restore "GM_BrowserUI.startInstallScript()" which it was calling directly.  Also clean up installUri util.

Fixes #1507
  • Loading branch information...
commit 3527b559d0057fd9595d21923b023a7eb809124b 1 parent d5d6543
@arantius arantius authored
View
5 content/addons.js
@@ -535,10 +535,9 @@ var greasemonkeyDragObserver = {
} else if ('application/x-moz-file' == dropData.flavour.contentType) {
url = GM_util.getUriFromFile(dropData.data).spec;
}
- dump('Dropped url: ['+url+']\n');
if (url && url.match(/\.user\.js$/)) {
- // TODO: Make this UI appear in the add-ons win, rather than the browser?
- GM_util.installUri(GM_util.uriFromUrl(url));
+ GM_util.showInstallDialog(
+ url, GM_util.getBrowserWindow().gBrowser, GM_util.getService());
}
},
getSupportedFlavours: function() {
View
5 content/browser.js
@@ -205,6 +205,11 @@ GM_BrowserUI.refreshStatus = function() {
}
};
+// Not used directly, kept for GreaseFire. See #1507.
+GM_BrowserUI.startInstallScript = function(aUri) {
+ GM_util.showInstallDialog(aUri.spec, gBrowser, GM_util.getService());
+};
+
GM_BrowserUI.viewContextItemClicked = function() {
var uri = GM_BrowserUI.getUserScriptLinkUnderPointer();
if (!uri) return;
View
12 modules/util/installUri.js
@@ -1,12 +0,0 @@
-Components.utils.import('resource://greasemonkey/util.js');
-
-const EXPORTED_SYMBOLS = ['installUri'];
-
-function installUri(uri, contentWin) {
- var win = GM_util.getBrowserWindow();
- if (win && win.GM_BrowserUI) {
- win.GM_BrowserUI.startInstallScript(uri, contentWin);
- return true;
- }
- return false;
-}
Please sign in to comment.
Something went wrong with that request. Please try again.