Skip to content

Commit

Permalink
parse
Browse files Browse the repository at this point in the history
  • Loading branch information
blackstormx committed Jul 29, 2020
1 parent 5d9f794 commit 430ad13
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
6 changes: 6 additions & 0 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ const addSlogan = document.getElementById("add");
const customBanWord = document.getElementById("customBanWord");
const set = document.getElementById("set");

const parseWiki = document.getElementById("parseWiki");

parseWiki.onchange = () => {
chrome.storage.sync.set({ parseWiki: parseWiki.checked }, function() {});
};

chrome.storage.sync.get("customBanWord", function(items) {
customBanWord.placeholder = "Current: " + items.customBanWord;
});
Expand Down
16 changes: 12 additions & 4 deletions content.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
const body = document.body;

let bannedWord = "*Banned by StopSlogan*";
let parseWiki = true;

chrome.storage.sync.get("customBanWord", function(items) {
bannedWord = items.customBanWord;
console.log(items, bannedWord);
startScan();
chrome.storage.sync.get("parseWiki", function(items) {
console.log(items);
parseWiki = items.parseWiki;
next();
});

function next() {
chrome.storage.sync.get("customBanWord", function(items) {
bannedWord = items.customBanWord;
startScan();
});
}

function startScan() {
const slogans = {};
let slogansKeys = [];
Expand Down

0 comments on commit 430ad13

Please sign in to comment.