diff options
author | teramako | 2011-08-15 11:32:26 +0900 |
---|---|---|
committer | teramako | 2011-08-15 11:33:50 +0900 |
commit | 37c67349774da66bf44c1c99b2c0fe1debff1b4a (patch) | |
tree | 198900f825556cc733015687f70a7826325c9233 /delicious_search.js | |
parent | 66a8c82a495b404bd1aac6aff02f2453b684dbe5 (diff) | |
download | vimperator-plugins-37c67349774da66bf44c1c99b2c0fe1debff1b4a.tar.bz2 |
Supports "Delicious Extension"
最初に拡張のUUIDではなく、Components.classesに"@yahoo.com/nsYDelLocalStore;1"があるかで判断するようにした
Diffstat (limited to 'delicious_search.js')
-rw-r--r-- | delicious_search.js | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/delicious_search.js b/delicious_search.js index c67bec4..fb5d2c9 100644 --- a/delicious_search.js +++ b/delicious_search.js @@ -3,6 +3,7 @@ let PLUGIN_INFO = <name>{NAME}</name> <description>search DeliciousBookmark and that completer</description> <require type="extension" id="{2fa4ed95-0317-4c6a-a74c-5f3e3912c1f9}">Delicious Bookmarks</require> +<require type="extension" id="delicious@vjkarunapg.com">Delicious Extension</require> <author mail="teramako@gmail.com" homepage="http://vimperator.g.hatena.ne.jp/teramako/">teramako</author> <version>0.3</version> <minVersion>2.0pre</minVersion> @@ -43,17 +44,12 @@ set go-=D liberator.plugins.delicious = (function(){ -let uuid = PLUGIN_INFO.require[0].@id.toString(); +const YDELS_CLASS = "@yahoo.com/nsYDelLocalStore;1"; let ydls = null; -if ( typeof Application.extensions === "object" && Application.extensions.has(uuid) && Application.extensions.get(uuid).enabled ){ - ydls = Cc["@yahoo.com/nsYDelLocalStore;1"].getService(Ci.nsIYDelLocalStore); -} -else if ( typeof Application.getExtensions === "function" ) { - Application.getExtensions(function(extensions) { - if ( extensions.has(uuid) && extensions.get(uuid).enabled ) { - ydls = Cc["@yahoo.com/nsYDelLocalStore;1"].getService(Ci.nsIYDelLocalStore); - } - }); +if (YDELS_CLASS in Cc) { + ydls = Cc[YDELS_CLASS].getService(Ci.nsIYDelLocalStore); +} else { + return; } const ss = Cc["@mozilla.org/storage/service;1"].getService(Ci.mozIStorageService); |