| 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-2012 Eyeo GmbH | 3 * Copyright (C) 2006-2012 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 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 let typoWindowObserver = null; | 28 let typoWindowObserver = null; |
| 29 | 29 |
| 30 exports.attachWindowObserver = attachWindowObserver; | 30 exports.attachWindowObserver = attachWindowObserver; |
| 31 function attachWindowObserver() | 31 function attachWindowObserver() |
| 32 { | 32 { |
| 33 if (typoWindowObserver) | 33 if (typoWindowObserver) |
| 34 return; | 34 return; |
| 35 | 35 |
| 36 // Attach our handlers to all browser windows | 36 // Attach our handlers to all browser windows |
| 37 typoWindowObserver = new WindowObserver( | 37 typoWindowObserver = new WindowObserver({ |
| 38 { | |
| 39 applyToWindow: function(window) | 38 applyToWindow: function(window) |
| 40 { | 39 { |
| 41 if (!appIntegration.isKnownWindow(window)) | 40 if (!appIntegration.isKnownWindow(window)) |
| 42 return; | 41 return; |
| 43 | 42 |
| 44 netError.applyToWindow(window); | |
| 45 appIntegration.applyToWindow(window, correctURL); | 43 appIntegration.applyToWindow(window, correctURL); |
| 46 }, | 44 }, |
| 47 | 45 |
| 48 removeFromWindow: function(window) | 46 removeFromWindow: function(window) |
| 49 { | 47 { |
| 50 if (!appIntegration.isKnownWindow(window)) | 48 if (!appIntegration.isKnownWindow(window)) |
| 51 return; | 49 return; |
| 52 | 50 |
| 53 netError.removeFromWindow(window); | |
| 54 appIntegration.removeFromWindow(window); | 51 appIntegration.removeFromWindow(window); |
| 55 } | 52 } |
| 56 }); | 53 }); |
| 57 } | 54 } |
| 58 attachWindowObserver(); | 55 attachWindowObserver(); |
| 59 | 56 |
| 60 exports.detachWindowObserver = detachWindowObserver; | 57 exports.detachWindowObserver = detachWindowObserver; |
| 61 function detachWindowObserver() | 58 function detachWindowObserver() |
| 62 { | 59 { |
| 63 if (!typoWindowObserver) | 60 if (!typoWindowObserver) |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 stringBundle = Services.strings.createBundle("chrome://" + require("info").a
ddonName + "/locale/typo.properties?" + Math.random()); | 220 stringBundle = Services.strings.createBundle("chrome://" + require("info").a
ddonName + "/locale/typo.properties?" + Math.random()); |
| 224 let result = [ | 221 let result = [ |
| 225 stringBundle.GetStringFromName("urlfixer.isItCorrect"), | 222 stringBundle.GetStringFromName("urlfixer.isItCorrect"), |
| 226 stringBundle.GetStringFromName("urlfixer.yes"), | 223 stringBundle.GetStringFromName("urlfixer.yes"), |
| 227 stringBundle.GetStringFromName("urlfixer.no") | 224 stringBundle.GetStringFromName("urlfixer.no") |
| 228 ]; | 225 ]; |
| 229 | 226 |
| 230 getInfobarTexts = function() result; | 227 getInfobarTexts = function() result; |
| 231 return getInfobarTexts(); | 228 return getInfobarTexts(); |
| 232 } | 229 } |
| LEFT | RIGHT |