Skip to content
Permalink
Browse files

block boris

  • Loading branch information...
tomroyal committed Sep 28, 2019
1 parent 6c5bbed commit 701dd6d27d4ba43c456adfc2ca4797196165d80a
Showing with 34 additions and 24 deletions.
  1. +4 −0 maka.js
  2. BIN maka128.png
  3. BIN maka48.png
  4. +15 −8 makaoptions.html
  5. +1 −1 manifest.json
  6. +14 −15 options.js
@@ -22,6 +22,7 @@ chrome.storage.local.get({
blockLePen: false,
blockWilders: false,
blockBannon: false,
blockBoris: false,
customBlock: false
}, function(items) {
if (items.blockPence){
@@ -39,6 +40,9 @@ chrome.storage.local.get({
};
if (items.blockBannon){
blacklist.push("bannon");
};
if (items.blockBoris){
blacklist.push("boris johnson");
};
// process custom blocklist

BIN -26 KB (19%) maka128.png
Binary file not shown.
BIN -5.28 KB (46%) maka48.png
Binary file not shown.
@@ -13,41 +13,48 @@
<body>

<h2>Make America Kittens Again</h2>
<p>v1.3.0 10/04/17</p>
<p>v1.3.1 28/9/19</p>

<p>Donald Trump is now being blocked. Want to get rid of anyone else while we're at it?</p>

<form>
<ul>
<li>
<label>
<input type="checkbox" id="blockpence">
<input type="checkbox" id="blockpence" />
Mike Pence
</label>
</li>
<li>
<label>
<input type="checkbox" id="blockbannon">
<input type="checkbox" id="blockbannon" />
Steve Bannon
</label>
</li>
<li>
<label>
<input type="checkbox" id="blockfarage">
<input type="checkbox" id="blockfarage" />
Nigel Farage
</label>
</li>
<li>
<label>
<input type="checkbox" id="blocklepen">
<input type="checkbox" id="blocklepen" />
Marine Le Pen
</label>
</li>
<li>
<label>
<input type="checkbox" id="blockwilders">
<input type="checkbox" id="blockboris" />
Alexander de Pfeffel Boris Johnson
</label>
</li>
<li>
<label>
<input type="checkbox" id="blockwilders" />
Geert Wilders
</label>
</li>

</ul>
<p>Custom Blocking: enter a comma-separated list of names (for example: Thatcher, Reagan) and we'll kittenize them too.
<p>
@@ -58,7 +65,7 @@ <h2>Make America Kittens Again</h2>

<p><div id="status"></div>
<p><button id="save">Block 'em!</button>

</form>

<h3>Undo! Undo!</h3>
<p>Looking for images of a trumpet, or socks in Swedish? Right-click / Control-click the page then choose "Make Kittens Trump Again :(" to undo the replacements.</p>
@@ -3,7 +3,7 @@

"name": "Make America Kittens Again",
"description": "Replaces images of Donald Trump with kittens, because seriously, f*** that guy.",
"version": "1.3.0",
"version": "1.3.1",
"options_page": "makaoptions.html",

"permissions": [
@@ -2,20 +2,14 @@

// Saves options to chrome.storage
function save_options() {
var blockPence = document.getElementById('blockpence').checked;
var blockFarage = document.getElementById('blockfarage').checked;
var blockLePen = document.getElementById('blocklepen').checked;
var blockWilders = document.getElementById('blockwilders').checked;
var blockBannon = document.getElementById('blockbannon').checked;
var customBlock = document.getElementById('customblock').value;

chrome.storage.local.set({
blockPence: blockPence,
blockFarage: blockFarage,
blockLePen: blockLePen,
blockWilders: blockWilders,
blockBannon: blockBannon,
customBlock: customBlock
blockPence: document.getElementById('blockpence').checked,
blockFarage: document.getElementById('blockfarage').checked,
blockLePen: document.getElementById('blocklepen').checked,
blockWilders: document.getElementById('blockwilders').checked,
blockBannon: document.getElementById('blockbannon').checked,
blockBoris: document.getElementById('blockboris').checked,
customBlock: document.getElementById('customblock').value
}, function() {
// Update status to let user know options were saved.
var status = document.getElementById('status');
@@ -37,19 +31,24 @@ function restore_options() {
blockLePen: false,
blockWilders: false,
blockBannon: false,
blockBoris: false,
customBlock: false
}, function(items) {
document.getElementById('blockpence').checked = items.blockPence;
document.getElementById('blockfarage').checked = items.blockFarage;
document.getElementById('blocklepen').checked = items.blockLePen;
document.getElementById('blockwilders').checked = items.blockWilders;
document.getElementById('blockbannon').checked = items.blockBannon;
document.getElementById('blockboris').checked = items.blockBoris;
if (items.customBlock != false){
document.getElementById('customblock').value = items.customBlock;
};
});
}

document.addEventListener('DOMContentLoaded', restore_options);
document.getElementById('save').addEventListener('click',
save_options);
document.getElementById('save').addEventListener('click',function(event){
event.preventDefault();
save_options();
});

0 comments on commit 701dd6d

Please sign in to comment.
You can’t perform that action at this time.