Skip to content

Commit

Permalink
modified : preferences.js
Browse files Browse the repository at this point in the history
The Clear rules button was not working.
This patch clears the existing blacklist,
except the default ones.

fixes WorldBrain#102
  • Loading branch information
wimpykid26 committed Mar 1, 2017
1 parent bc1efd1 commit 192e896
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/js/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,16 @@
function clearRules() {
chrome.storage.local.get(['blacklist'], function(items) {
var blacklist = items['blacklist'];
blacklist['SITE'] = ['chrome-ui://newtab']
chrome.storage.local.set({'blacklist':null});
blacklist['PAGE'] = '';
blacklist['REGEX'] = '';
blacklist['SITE'] = '';
console.log(blacklist)
chrome.storage.local.set({'blacklist':blacklist});
});
notie.alert(1, 'Deleted Rules. Restarting WorldBrain...', 2)
setTimeout(function() {
chrome.runtime.reload()
}, 2000);
chrome.runtime.reload()
}, 2000);
}

function clearHistory() {
Expand Down

0 comments on commit 192e896

Please sign in to comment.