| 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 276 localLoaded = true; | 276 localLoaded = true; |
| 277 checkLoaded(); | 277 checkLoaded(); |
| 278 }); | 278 }); |
| 279 } | 279 } |
| 280 }); | 280 }); |
| 281 | 281 |
| 282 if (require("info").platform == "chromium" && "managed" in chrome.storage) | 282 if (require("info").platform == "chromium" && "managed" in chrome.storage) |
| 283 { | 283 { |
| 284 chrome.storage.managed.get(null, function(items) | 284 chrome.storage.managed.get(null, function(items) |
| 285 { | 285 { |
| 286 // Shut up Opera ;P | 286 // Opera doesn't support chrome.storage.managed, but instead simply |
|
Thomas Greiner
2015/05/19 09:47:39
I literally had to LOL when I read this. :D
Still
Sebastian Noack
2015/05/19 16:09:01
I found it quite descriptive, as making Opera shut
Thomas Greiner
2015/05/19 16:39:53
Thanks a lot!
| |
| 287 // removing the API, Opera sets chrome.runtime.lastError when using it. | |
| 288 // So we have to retrieve that error, to prevent it from showing up | |
| 289 // in the console. | |
| 287 chrome.runtime.lastError; | 290 chrome.runtime.lastError; |
| 288 | 291 |
| 289 for (let key in items) | 292 for (let key in items) |
| 290 defaults[key] = items[key]; | 293 defaults[key] = items[key]; |
| 291 | 294 |
| 292 managedLoaded = true; | 295 managedLoaded = true; |
| 293 checkLoaded(); | 296 checkLoaded(); |
| 294 }); | 297 }); |
| 295 } | 298 } |
| 296 else | 299 else |
| 297 { | 300 { |
| 298 managedLoaded = true; | 301 managedLoaded = true; |
| 299 checkLoaded(); | 302 checkLoaded(); |
| 300 } | 303 } |
| 301 } | 304 } |
| 302 | 305 |
| 303 init(); | 306 init(); |
| LEFT | RIGHT |