Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus 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 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
309 // nsIObserver interface implementation | 309 // nsIObserver interface implementation |
310 // | 310 // |
311 _openers: new WeakMap(), | 311 _openers: new WeakMap(), |
312 | 312 |
313 observe: function(subject, topic, data, uri) | 313 observe: function(subject, topic, data, uri) |
314 { | 314 { |
315 switch (topic) | 315 switch (topic) |
316 { | 316 { |
317 case "content-document-global-created": | 317 case "content-document-global-created": |
318 { | 318 { |
319 var opener = this._openers.get(subject); | 319 let opener = this._openers.get(subject); |
Thomas Greiner
2016/02/11 11:06:23
Detail: Usually, we use `let` over `var` to define
Wladimir Palant
2016/02/11 13:44:45
Done.
| |
320 if (opener && Components.utils.isDeadWrapper(opener)) | 320 if (opener && Components.utils.isDeadWrapper(opener)) |
321 opener = null; | 321 opener = null; |
322 | 322 |
323 if (!opener) | 323 if (!opener) |
324 { | 324 { |
325 // We don't know the opener for this window yet, try to find it | 325 // We don't know the opener for this window yet, try to find it |
326 if (subject instanceof Ci.nsIDOMWindow) | 326 if (subject instanceof Ci.nsIDOMWindow) |
327 opener = subject.opener; | 327 opener = subject.opener; |
328 | 328 |
329 if (!opener) | 329 if (!opener) |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
480 let property = (hasCols ? "cols" : "rows"); | 480 let property = (hasCols ? "cols" : "rows"); |
481 let weights = parentNode[property].split(","); | 481 let weights = parentNode[property].split(","); |
482 weights[index] = "0"; | 482 weights[index] = "0"; |
483 parentNode[property] = weights.join(","); | 483 parentNode[property] = weights.join(","); |
484 } | 484 } |
485 } | 485 } |
486 else | 486 else |
487 node.classList.add(collapsedClass); | 487 node.classList.add(collapsedClass); |
488 } | 488 } |
489 } | 489 } |
LEFT | RIGHT |