Index: chrome/content/errors.html |
=================================================================== |
--- a/chrome/content/errors.html |
+++ b/chrome/content/errors.html |
@@ -31,24 +31,16 @@ |
</head> |
<body> |
<button onclick="window.location.reload();">Refresh</button> |
<button onclick="clearErrors();">Clear errors</button> |
<script type="application/x-javascript;version=1.7"> |
let id = null; |
try { |
- function require(module) |
- { |
- let {Services} = Components.utils.import("resource://gre/modules/Services.jsm"); |
- let result = {}; |
- result.wrappedJSObject = result; |
- Services.obs.notifyObservers(result, "adblockplus-require", module); |
- return result.exports; |
- } |
let {addonVersion, addonID} = require("info"); |
let text = "You are running Adblock Plus " + addonVersion; |
text += "."; |
document.write("<p>" + text + "</p>"); |
id = addonID.replace(/[\{\}]/g, ""); |
} catch (e) {} |
@@ -88,16 +80,25 @@ |
"</div>"); |
} |
} |
else |
{ |
document.write("<p>No errors found.</p>"); |
} |
+ function require(module) |
+ { |
+ let {Services} = Components.utils.import("resource://gre/modules/Services.jsm"); |
+ let result = {}; |
+ result.wrappedJSObject = result; |
+ Services.obs.notifyObservers(result, "adblockplus-require", module); |
+ return result.exports; |
+ } |
+ |
function encodeHTML(string) |
{ |
return string.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"); |
} |
function clearErrors() |
{ |
Components.classes["@mozilla.org/consoleservice;1"] |