Permalink
Browse files

Moving to work with 3.5, can't be compatible with previous releases d…

…ue to odd import bugs.
  • Loading branch information...
mikeal committed May 27, 2009
1 parent 8bd3880 commit 88e3e625ac4185586c498255ce0ac021f7bdbdc9
Showing with 18 additions and 19 deletions.
  1. +0 −1 extension/content/overlay.js
  2. +2 −2 extension/install.rdf
  3. +3 −4 extension/resource/modules/init.js
  4. +0 −2 extension/resource/modules/service.js
  5. +13 −10 manage.py
@@ -35,7 +35,6 @@
var init = {}; Components.utils.import('resource://pushmarks/modules/init.js', init);
-
var Prefs = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefService);
Prefs = Prefs.getBranch("extensions.my_extension_name.");
View
@@ -4,15 +4,15 @@
<Description about="urn:mozilla:install-manifest">
<em:id>pushmarks@mozilla.com</em:id>
<em:name>PushMarks</em:name>
- <em:version>0.2.1</em:version>
+ <em:version>0.3.0</em:version>
<em:creator>Mikeal Rogers</em:creator>
<em:description>Firefox extension that pushes bookmarks to public bookmark sharing sites.</em:description>
<em:targetApplication>
<!-- Firefox -->
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>3.0</em:minVersion>
- <em:maxVersion>3.0.*</em:maxVersion>
+ <em:maxVersion>3.5.*</em:maxVersion>
</Description>
</em:targetApplication>
<em:iconURL>chrome://pushmarks/content/pushmarks.png</em:iconURL>
@@ -46,8 +46,6 @@ var bmsvc = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"]
.getService(Components.interfaces.nsINavBookmarksService);
var consoleService = Components.classes["@mozilla.org/consoleservice;1"]
.getService(Components.interfaces.nsIConsoleService);
-var livemarkService = Components.classes["@mozilla.org/browser/livemark-service;2"]
- .getService(Components.interfaces.nsILivemarkService);
var hwindow = Components.classes["@mozilla.org/appshell/appShellService;1"]
.getService(Components.interfaces.nsIAppShellService)
.hiddenDOMWindow;
@@ -56,7 +54,6 @@ var historyService = Components.classes["@mozilla.org/browser/nav-history-servic
var uuidgen = Components.classes["@mozilla.org/uuid-generator;1"]
.getService(Components.interfaces.nsIUUIDGenerator);
-Components.utils.import("resource://gre/modules/JSON.jsm");
Components.utils.import("resource://pushmarks/modules/service.js")
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
@@ -256,7 +253,7 @@ var getAllBookmarks = function () {
return hash
}
- return recursizeChildAdd(JSON.fromString(readFile(f)), {});
+ return recursizeChildAdd(JSON.parse(readFile(f)), {});
}
// An nsINavBookmarkObserver
@@ -286,6 +283,8 @@ var MyExtension = {
},
callbackArgs: [],
_itemAdded: function (aItemId, aFolder, aIndex) {
+ var livemarkService = Components.classes["@mozilla.org/browser/livemark-service;2"]
+ .getService(Components.interfaces.nsILivemarkService);
if (!livemarkService.isLivemark(aFolder) &&
!isAddedByExtension(aItemId) &&
bmsvc.getItemType(aItemId) == 1) {
@@ -45,8 +45,6 @@ var bmsvc = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"]
.getService(Components.interfaces.nsINavBookmarksService);
var consoleService = Components.classes["@mozilla.org/consoleservice;1"]
.getService(Components.interfaces.nsIConsoleService);
-var livemarkService = Components.classes["@mozilla.org/browser/livemark-service;2"]
- .getService(Components.interfaces.nsILivemarkService);
var hwindow = Components.classes["@mozilla.org/appshell/appShellService;1"]
.getService(Components.interfaces.nsIAppShellService)
.hiddenDOMWindow;
View
@@ -1,14 +1,17 @@
-import os, sys
+import os
+import mozrunner
+
+parent_path = os.path.abspath(os.path.dirname(__file__))
+extension_path = os.path.join(parent_path, 'extension')
+
+class CLI(mozrunner.CLI):
+ def get_profile(self, *args, **kwargs):
+ profile = super(CLI, self).get_profile(*args, **kwargs)
+ profile.install_plugin(extension_path)
+
+ return profile
-import jsbridge
-from jsbridge import global_settings
-this_dir = os.path.abspath(os.path.dirname(__file__))
-def cli():
- sys.argv.append('--launch')
- global_settings.MOZILLA_PLUGINS.append(os.path.join(this_dir, 'extension'))
- jsbridge.cli(shell=False)
-
if __name__ == "__main__":
- cli()
+ CLI().run()

0 comments on commit 88e3e62

Please sign in to comment.