OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 | 2 |
3 <html> | 3 <html> |
4 <head> | 4 <head> |
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
6 <title>Adblock Plus Errors</title> | 6 <title>Adblock Plus Errors</title> |
7 <style type="text/css"> | 7 <style type="text/css"> |
8 .warning, .error | 8 .warning, .error |
9 { | 9 { |
10 border: 1px dashed black; | 10 border: 1px dashed black; |
(...skipping 18 matching lines...) Expand all Loading... |
29 } | 29 } |
30 </style> | 30 </style> |
31 </head> | 31 </head> |
32 <body> | 32 <body> |
33 <button onclick="window.location.reload();">Refresh</button> | 33 <button onclick="window.location.reload();">Refresh</button> |
34 <button onclick="clearErrors();">Clear errors</button> | 34 <button onclick="clearErrors();">Clear errors</button> |
35 | 35 |
36 <script type="application/x-javascript;version=1.7"> | 36 <script type="application/x-javascript;version=1.7"> |
37 let id = null; | 37 let id = null; |
38 try { | 38 try { |
39 function require(module) | |
40 { | |
41 let {Services} = Components.utils.import("resource://gre/modules/Service
s.jsm"); | |
42 let result = {}; | |
43 result.wrappedJSObject = result; | |
44 Services.obs.notifyObservers(result, "adblockplus-require", module); | |
45 return result.exports; | |
46 } | |
47 let {addonVersion, addonID} = require("info"); | 39 let {addonVersion, addonID} = require("info"); |
48 | 40 |
49 let text = "You are running Adblock Plus " + addonVersion; | 41 let text = "You are running Adblock Plus " + addonVersion; |
50 text += "."; | 42 text += "."; |
51 document.write("<p>" + text + "</p>"); | 43 document.write("<p>" + text + "</p>"); |
52 | 44 |
53 id = addonID.replace(/[\{\}]/g, ""); | 45 id = addonID.replace(/[\{\}]/g, ""); |
54 } catch (e) {} | 46 } catch (e) {} |
55 | 47 |
56 // See https://bugzilla.mozilla.org/show_bug.cgi?id=664695 - starting with | 48 // See https://bugzilla.mozilla.org/show_bug.cgi?id=664695 - starting with |
(...skipping 29 matching lines...) Expand all Loading... |
86 document.write("<div class='" + type + "'>" + | 78 document.write("<div class='" + type + "'>" + |
87 html + | 79 html + |
88 "</div>"); | 80 "</div>"); |
89 } | 81 } |
90 } | 82 } |
91 else | 83 else |
92 { | 84 { |
93 document.write("<p>No errors found.</p>"); | 85 document.write("<p>No errors found.</p>"); |
94 } | 86 } |
95 | 87 |
| 88 function require(module) |
| 89 { |
| 90 let {Services} = Components.utils.import("resource://gre/modules/Services.
jsm"); |
| 91 let result = {}; |
| 92 result.wrappedJSObject = result; |
| 93 Services.obs.notifyObservers(result, "adblockplus-require", module); |
| 94 return result.exports; |
| 95 } |
| 96 |
96 function encodeHTML(string) | 97 function encodeHTML(string) |
97 { | 98 { |
98 return string.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, "
>"); | 99 return string.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, "
>"); |
99 } | 100 } |
100 | 101 |
101 function clearErrors() | 102 function clearErrors() |
102 { | 103 { |
103 Components.classes["@mozilla.org/consoleservice;1"] | 104 Components.classes["@mozilla.org/consoleservice;1"] |
104 .getService(Components.interfaces.nsIConsoleService) | 105 .getService(Components.interfaces.nsIConsoleService) |
105 .reset(); | 106 .reset(); |
106 window.location.reload(); | 107 window.location.reload(); |
107 } | 108 } |
108 </script> | 109 </script> |
109 </body> | 110 </body> |
110 </html> | 111 </html> |
OLD | NEW |