| OLD | NEW |
| 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-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 }); | 535 }); |
| 536 | 536 |
| 537 | 537 |
| 538 /* Storage */ | 538 /* Storage */ |
| 539 | 539 |
| 540 ext.storage = { | 540 ext.storage = { |
| 541 get: function(keys, callback) | 541 get: function(keys, callback) |
| 542 { | 542 { |
| 543 chrome.storage.local.get(keys, callback); | 543 chrome.storage.local.get(keys, callback); |
| 544 }, | 544 }, |
| 545 set: function(key, value, callback) | 545 set: function(items, callback) |
| 546 { | 546 { |
| 547 let items = {}; | |
| 548 items[key] = value; | |
| 549 chrome.storage.local.set(items, callback); | 547 chrome.storage.local.set(items, callback); |
| 550 }, | 548 }, |
| 551 remove: function(key, callback) | 549 remove: function(key, callback) |
| 552 { | 550 { |
| 553 chrome.storage.local.remove(key, callback); | 551 chrome.storage.local.remove(key, callback); |
| 554 }, | 552 }, |
| 555 onChanged: chrome.storage.onChanged | 553 onChanged: chrome.storage.onChanged |
| 556 }; | 554 }; |
| 557 | 555 |
| 558 /* Options */ | 556 /* Options */ |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 afterTabLoaded(callback)(createdWindow.tabs[0]); | 598 afterTabLoaded(callback)(createdWindow.tabs[0]); |
| 601 }); | 599 }); |
| 602 } | 600 } |
| 603 else | 601 else |
| 604 { | 602 { |
| 605 ext.pages.open(createData.url, callback); | 603 ext.pages.open(createData.url, callback); |
| 606 } | 604 } |
| 607 } | 605 } |
| 608 }; | 606 }; |
| 609 })(); | 607 })(); |
| OLD | NEW |