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