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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(key, value, callback) |
546 { | 546 { |
547 let items = {}; | 547 let items = {}; |
548 items[key] = value; | 548 items[key] = value; |
549 chrome.storage.local.set(items, callback); | 549 chrome.storage.local.set(items, callback); |
550 }, | 550 }, |
| 551 setMultiple: function(items, callback) |
| 552 { |
| 553 chrome.storage.local.set(items, callback); |
| 554 }, |
551 remove: function(key, callback) | 555 remove: function(key, callback) |
552 { | 556 { |
553 chrome.storage.local.remove(key, callback); | 557 chrome.storage.local.remove(key, callback); |
554 }, | 558 }, |
555 onChanged: chrome.storage.onChanged | 559 onChanged: chrome.storage.onChanged |
556 }; | 560 }; |
557 | 561 |
558 /* Options */ | 562 /* Options */ |
559 | 563 |
560 ext.showOptions = function(callback) | 564 ext.showOptions = function(callback) |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 afterTabLoaded(callback)(createdWindow.tabs[0]); | 604 afterTabLoaded(callback)(createdWindow.tabs[0]); |
601 }); | 605 }); |
602 } | 606 } |
603 else | 607 else |
604 { | 608 { |
605 ext.pages.open(createData.url, callback); | 609 ext.pages.open(createData.url, callback); |
606 } | 610 } |
607 } | 611 } |
608 }; | 612 }; |
609 })(); | 613 })(); |
OLD | NEW |