| LEFT | RIGHT |
| 1 /* | 1 /* |
| 2 * This file is part of the URL Fixer, | 2 * This file is part of the URL Fixer, |
| 3 * Copyright (C) 2006-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 Eyeo GmbH |
| 4 * | 4 * |
| 5 * URL Fixer is free software: you can redistribute it and/or modify | 5 * URL Fixer is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * URL Fixer is distributed in the hope that it will be useful, | 9 * URL Fixer is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 function parseURL(url) | 118 function parseURL(url) |
| 119 { | 119 { |
| 120 if (/^\s*((?:\w+:)?\/*(?:[^\/#]*@)?)([^\/:#]*)/.test(url)) | 120 if (/^\s*((?:\w+:)?\/*(?:[^\/#]*@)?)([^\/:#]*)/.test(url)) |
| 121 return [RegExp.$1, RegExp.$2.toLowerCase(), RegExp.rightContext]; | 121 return [RegExp.$1, RegExp.$2.toLowerCase(), RegExp.rightContext]; |
| 122 else | 122 else |
| 123 return [url, null, null]; | 123 return [url, null, null]; |
| 124 } | 124 } |
| 125 | 125 |
| 126 addMessageListener("URLFixer:NetErrorOverlay", receivedNetErrorOverlay); | 126 addMessageListener("URLFixer:NetErrorOverlay", receivedNetErrorOverlay); |
| 127 addMessageListener("URLFixer:Shutdown", shutdown); | 127 addMessageListener("URLFixer:Shutdown", shutdown); |
| 128 onShutdown.add(() => { | 128 onShutdown.add(() => |
| 129 { |
| 129 removeMessageListener("URLFixer:NetErrorOverlay", receivedNetErrorOverlay); | 130 removeMessageListener("URLFixer:NetErrorOverlay", receivedNetErrorOverlay); |
| 130 removeMessageListener("URLFixer:Shutdown", shutdown); | 131 removeMessageListener("URLFixer:Shutdown", shutdown); |
| 131 }); | 132 }); |
| 132 sendAsyncMessage("URLFixer:GetNetErrorOverlay"); | 133 sendAsyncMessage("URLFixer:GetNetErrorOverlay"); |
| 133 | 134 |
| 134 Services.obs.addObserver(onDocumentCreated, "content-document-global-created", f
alse); | 135 Services.obs.addObserver(onDocumentCreated, "content-document-global-created", f
alse); |
| 135 onShutdown.add(() => { | 136 onShutdown.add(() => |
| 137 { |
| 136 Services.obs.removeObserver(onDocumentCreated, "content-document-global-create
d"); | 138 Services.obs.removeObserver(onDocumentCreated, "content-document-global-create
d"); |
| 137 }); | 139 }); |
| LEFT | RIGHT |