Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
blackstormx committed Jul 29, 2020
1 parent 70644b6 commit 52b5eee
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
18 changes: 14 additions & 4 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ chrome.storage.sync.get("customBanWord", function(items) {
});

set.onclick = () => {
chrome.storage.sync.set({ customBanWord: customBanWord.value }, function() {
customBanWord.placeholder = "Current: " + customBanWord.value;
customBanWord.value = "";
});
saveNewBanWord();
};

customBanWord.onkeyup = e => {
if (e.keyCode == 13) {
saveNewBanWord();
}
};

customSloganTextbox.onkeyup = e => {
Expand All @@ -47,6 +50,13 @@ addSlogan.onclick = () => {
addNew();
};

function saveNewBanWord() {
chrome.storage.sync.set({ customBanWord: customBanWord.value }, function() {
customBanWord.placeholder = "Current: " + customBanWord.value;
customBanWord.value = "";
});
}

function addNew() {
const customSlogan = customSloganTextbox.value.toLowerCase();
if (!customSlogans.includes(customSlogan)) {
Expand Down
1 change: 1 addition & 0 deletions popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
}
#page1 > .list {
height: calc(100% - 80px);
max-height: 340px;
}
#page2 > .list {
height: calc(100% - 220px);
Expand Down

0 comments on commit 52b5eee

Please sign in to comment.