aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--delicious_search.js16
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);