mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Remove code duplications and cleanup
This commit is contained in:
parent
8e414becf0
commit
32f9ea7447
9 changed files with 58 additions and 117 deletions
|
@ -30,6 +30,14 @@
|
|||
return undefined;
|
||||
};
|
||||
|
||||
scope.getStatusByFlag = function getStatusByFlag(flag){
|
||||
return function getStatus(obj, status, prefs){
|
||||
status = Object.create(status);
|
||||
status.active = prefs(flag, status.url);
|
||||
return status;
|
||||
};
|
||||
};
|
||||
|
||||
scope.setFunctionProperties = function setFunctionProperties(functions, data){
|
||||
Object.keys(functions).forEach(function(key){
|
||||
const func = functions[key];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue