]> gitweb @ CieloNegro.org - sugar.git/blobdiff - dot-files/_vimperator/plugin/_libly_js
Auto commit by The Sugar System.
[sugar.git] / dot-files / _vimperator / plugin / _libly_js
index 51035bf78aff872af7c5ae7543c16eae7d152b77..1ff4600fac9a01aa5e2231c6d1b85769c5f663e4 100644 (file)
@@ -246,9 +246,10 @@ libly.$U = {//{{{
         function getPluginPath () {
           let pluginPath;
           Error('hoge').stack.split(/\n/).some(
-            function (s)
-              let (m = s.match(/-> liberator:\/\/template\/chrome:\/\/liberator\/content\/liberator\.js -> (.+):\d+$/))
-                (m && (pluginPath = m[1].replace(/\?.*$/, '')))
+            function (s) {
+              let m = s.match(/@chrome:\/\/liberator\/content\/liberator\.js -> file:\/\/\/(.+):\d+$/);
+              (m && (pluginPath = m[1].replace(/\?.*$/, '')));
+            }
           );
           return pluginPath;
         }
@@ -311,9 +312,8 @@ libly.$U = {//{{{
     evalJson: function(str, toRemove) {
         var json;
         try {
-            json = Components.classes['@mozilla.org/dom/json;1'].getService(Components.interfaces.nsIJSON);
             if (toRemove) str = str.substring(1, str.length - 1);
-            return json.decode(str);
+            return JSON.parse(str);
         } catch (e) { return null; }
     },
     dateFormat: function(dtm, fmt) {