Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: lib/prefs.js

Issue 5999015493632000: Issue 2541 - Suppress error on Opera when calling chrome.storage.managed.get() (Closed)
Patch Set: Created May 18, 2015, 4:51 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 chrome.runtime.lastError;
288
286 for (let key in items) 289 for (let key in items)
287 defaults[key] = items[key]; 290 defaults[key] = items[key];
288 291
289 managedLoaded = true; 292 managedLoaded = true;
290 checkLoaded(); 293 checkLoaded();
291 }); 294 });
292 } 295 }
293 else 296 else
294 { 297 {
295 managedLoaded = true; 298 managedLoaded = true;
296 checkLoaded(); 299 checkLoaded();
297 } 300 }
298 } 301 }
299 302
300 init(); 303 init();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld