mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Switch to asych/await where useful
This commit is contained in:
parent
372ee755f7
commit
10413a89c3
11 changed files with 269 additions and 349 deletions
|
@ -114,11 +114,10 @@
|
|||
}
|
||||
return lists[type];
|
||||
};
|
||||
scope.appendTo = function appendToList(type, entry){
|
||||
scope.appendTo = async function appendToList(type, entry){
|
||||
const oldValue = settings[type + "List"];
|
||||
return settings.set(type + "List", oldValue + (oldValue? ",": "") + entry).then(function(){
|
||||
return updateList(type);
|
||||
});
|
||||
await settings.set(type + "List", oldValue + (oldValue? ",": "") + entry);
|
||||
return updateList(type);
|
||||
};
|
||||
scope.update = updateList;
|
||||
scope.updateAll = function updateAllLists(){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue