Initial Commit
This commit is contained in:
parent
98c62bacde
commit
ab14bee35d
3 changed files with 53 additions and 0 deletions
12
background.js
Normal file
12
background.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
browser.browserAction.onClicked.addListener(function(tab){
|
||||
browser.tabs.executeScript({
|
||||
file: "jerry.js",
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
25
jerry.js
Normal file
25
jerry.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
let classes = [ "fEy1Z2XT", "_82u8vq" ]
|
||||
|
||||
|
||||
function removeElementsByClass(className) {
|
||||
let elements = document.getElementsByClassName(className);
|
||||
while(elements.length > 0) {
|
||||
elements[0].parentNode.removeChild(elements[0]);
|
||||
}
|
||||
}
|
||||
//Inspired by Admiral Sucks on GitHub
|
||||
function setScroll(){
|
||||
var style = "overflow: scroll;";
|
||||
|
||||
document.getElementsByTagName('html')[0].style = style;
|
||||
}
|
||||
|
||||
console.log("Bueller?");
|
||||
classes.forEach( (c) =>{
|
||||
removeElementsByClass(c);
|
||||
console.log("Bueller?");
|
||||
});
|
||||
|
||||
//Inspired by Admiral Sucks on GitHub
|
||||
setScroll();
|
||||
console.log("Bueller?");
|
16
manifest.json
Normal file
16
manifest.json
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Jerry's Blocker",
|
||||
"version": "1.0",
|
||||
"description":"An ad blocker blocker blocker... you read that right. This gets rid of Admiral recovery popups",
|
||||
|
||||
"permissions": ["activeTab"],
|
||||
|
||||
"background": {
|
||||
"scripts": ["background.js"]
|
||||
},
|
||||
"browser_action": {
|
||||
"default_title": "Whereami?"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in a new issue