diff options
author | portix <none@none> | 2013-02-26 01:32:00 +0100 |
---|---|---|
committer | portix <none@none> | 2013-02-26 01:32:00 +0100 |
commit | ce38b37da1fadbca561439d1a8a22c3abf217d70 (patch) | |
tree | 2a4f7e87d1696dd17d483d83cc72b6d9e5d93a95 /extensions/userscripts | |
parent | f1ddce570eec1666144d7fa80c37ed83991d5ec5 (diff) | |
download | dwb-ce38b37da1fadbca561439d1a8a22c3abf217d70.zip |
Use script.debug instead of extensions.debug in extensions; remove extensions.debug, extensions.enableDebugging, extensions.reload
Diffstat (limited to 'extensions/userscripts')
-rw-r--r-- | extensions/userscripts | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/extensions/userscripts b/extensions/userscripts index 14b98a59..689b07de 100644 --- a/extensions/userscripts +++ b/extensions/userscripts @@ -262,7 +262,7 @@ function handle(frame, array, isMainFrame) //{{{ } catch (e) { - extensions.debug(me); + script.debug(e); } } }//}}} @@ -381,25 +381,25 @@ function parseScript(path) //{{{ var userscript; var i, items, key, value, idx, m, matches = [], numVal; - var script = io.read(path); - if (!script || (/^\s*$/).test(script)) + var curScript = io.read(path); + if (!curScript || (/^\s*$/).test(curScript)) return; - var metaStart = script.search(/(^|\n)\/\/\s*==UserScript==/); - var metaEnd = script.search(/\n\/\/\s*==\/UserScript==/); + var metaStart = curScript.search(/(^|\n)\/\/\s*==UserScript==/); + var metaEnd = curScript.search(/\n\/\/\s*==\/UserScript==/); userscript = new UserScript(); if (metaStart == -1 || metaEnd == -1) { - userscript.script = script; + userscript.script = curScript; userscript.include = [ { regExp : /.*/, isTld : false} ]; onEnd.push(userscript); return; } - var meta = script.substring(metaStart, metaEnd).split("\n"); - var scriptStart = script.substring(metaEnd+1).indexOf("\n") + metaEnd + 1; + var meta = curScript.substring(metaStart, metaEnd).split("\n"); + var scriptStart = curScript.substring(metaEnd+1).indexOf("\n") + metaEnd + 1; var regValue = /\s[^\/@]\S?/; var regIsRule = /^\s*\/\/\s*@/; @@ -432,7 +432,7 @@ function parseScript(path) //{{{ userscript[key] = numVal; } catch (e) { - extensions.debug(me, e); + script.debug(e); } } else if (key == "unwrap") @@ -446,7 +446,7 @@ function parseScript(path) //{{{ } catch(e) { - extensions.debug(me, e); + script.debug(e); } } @@ -464,8 +464,8 @@ function parseScript(path) //{{{ userscript.scriptId = userscript.namespace + "::" + userscript.name; userscript.scriptId = userscript.scriptId.replace(/\s+/g, "_"); userscript.script = "var DWB_scriptId = '" + userscript.scriptId + "';" + - util.getBody(GM_compatability) + script.substring(0, metaStart) + - script.substring(scriptStart); + util.getBody(GM_compatability) + curScript.substring(0, metaStart) + + curScript.substring(scriptStart); getRequirements(userscript); |