| 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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 533 | 533 | 
| 534       for (var i = 0; i < keys.length; i++) | 534       for (var i = 0; i < keys.length; i++) | 
| 535       { | 535       { | 
| 536         var key = keys[i]; | 536         var key = keys[i]; | 
| 537         if (key in settings) | 537         if (key in settings) | 
| 538           items[key] = settings[key]; | 538           items[key] = settings[key]; | 
| 539       } | 539       } | 
| 540 | 540 | 
| 541       setTimeout(callback, 0, items); | 541       setTimeout(callback, 0, items); | 
| 542     }, | 542     }, | 
| 543     set: function(key, value, callback) | 543     set: function(items, callback) | 
| 544     { | 544     { | 
| 545       safari.extension.settings[key] = value; | 545       for (let key in items) | 
| 546 | 546         safari.extension.settings[key] = items[key]; | 
| 547       if (callback) | 547       if (callback) | 
| 548         setTimeout(callback, 0); | 548         setTimeout(callback); | 
| 549     }, | 549     }, | 
| 550     remove: function(key, callback) | 550     remove: function(key, callback) | 
| 551     { | 551     { | 
| 552       delete safari.extension.settings[key]; | 552       delete safari.extension.settings[key]; | 
| 553 | 553 | 
| 554       if (callback) | 554       if (callback) | 
| 555         setTimeout(callback, 0); | 555         setTimeout(callback, 0); | 
| 556     }, | 556     }, | 
| 557     onChanged: new ext._EventTarget() | 557     onChanged: new ext._EventTarget() | 
| 558   }; | 558   }; | 
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 597   /* Windows */ | 597   /* Windows */ | 
| 598   ext.windows = { | 598   ext.windows = { | 
| 599     // Safari doesn't provide as rich a windows API as Chrome does, so instead | 599     // Safari doesn't provide as rich a windows API as Chrome does, so instead | 
| 600     // of chrome.windows.create we have to fall back to just opening a new tab. | 600     // of chrome.windows.create we have to fall back to just opening a new tab. | 
| 601     create: function(createData, callback) | 601     create: function(createData, callback) | 
| 602     { | 602     { | 
| 603       ext.pages.open(createData.url, callback); | 603       ext.pages.open(createData.url, callback); | 
| 604     } | 604     } | 
| 605   }; | 605   }; | 
| 606 })(); | 606 })(); | 
| OLD | NEW | 
|---|