mirror of
https://github.com/jlengrand/closeme.git
synced 2026-03-10 08:11:23 +00:00
Create repository
This commit is contained in:
14
closeme.js
Normal file
14
closeme.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const observer = new MutationObserver((mutationsList, observer) => {
|
||||
const buttons = document.getElementsByClassName("js-dismissMeterButton");
|
||||
if ( buttons != undefined){
|
||||
for (let b of buttons) {
|
||||
b.click(); console.log("closing annoying pop up");
|
||||
}
|
||||
}
|
||||
// else console.log("Nothing found");
|
||||
});
|
||||
|
||||
observer.observe(
|
||||
document.getElementsByClassName('site-main')[0],
|
||||
{ attributes: false, childList: true, subtree: true }
|
||||
);
|
||||
13
manifest.json
Normal file
13
manifest.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "CloseMe",
|
||||
"version": "1.0",
|
||||
"description": "Auto closes those annoying Medium pop-ups asking you to sign up!",
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": ["https://medium.com/*"],
|
||||
"js": ["closeme.js"],
|
||||
"run_at": "document_idle"
|
||||
}
|
||||
],
|
||||
"manifest_version": 2
|
||||
}
|
||||
Reference in New Issue
Block a user