├── .gitignore ├── icons ├── nukem-128.png ├── nukem-16.png ├── nukem-19.png ├── nukem-48.png └── nukem-19-disabled.png ├── popup.js ├── README.md ├── nukem.js ├── popup.html ├── manifest.json ├── options.html ├── options.css ├── engine.js ├── background.js ├── options.js └── jquery-3.1.1.slim.min.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | -------------------------------------------------------------------------------- /icons/nukem-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gruntfuggly/nukem/HEAD/icons/nukem-128.png -------------------------------------------------------------------------------- /icons/nukem-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gruntfuggly/nukem/HEAD/icons/nukem-16.png -------------------------------------------------------------------------------- /icons/nukem-19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gruntfuggly/nukem/HEAD/icons/nukem-19.png -------------------------------------------------------------------------------- /icons/nukem-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gruntfuggly/nukem/HEAD/icons/nukem-48.png -------------------------------------------------------------------------------- /icons/nukem-19-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gruntfuggly/nukem/HEAD/icons/nukem-19-disabled.png -------------------------------------------------------------------------------- /popup.js: -------------------------------------------------------------------------------- 1 | addEventListener( "unload", function( event ) 2 | { 3 | chrome.extension.getBackgroundPage().toggleEnabled(); 4 | }, true ); 5 | 6 | $( document ).ready( function() 7 | { 8 | $( "#start" ).click( function() 9 | { 10 | self.close(); 11 | } ); 12 | } ); -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Nukem 2 | 3 | There are plenty of Chrome extensions that allow you to remove 4 | elements from the page, but they all seem to be temporary. This 5 | one remembers whats been removed, and removes it whenever the 6 | page is loaded again. 7 | 8 | Wildcards can be used to make it work on multiple pages from 9 | the same site (for example) and an optional delay can be set in 10 | case the element you want to remove doesn't get displayed right 11 | away. 12 | 13 | [https://github.com/Gruntfuggly/nukem](https://github.com/Gruntfuggly/nukem) -------------------------------------------------------------------------------- /nukem.js: -------------------------------------------------------------------------------- 1 | function remove( selector, method ) 2 | { 3 | if( method === "Hide" ) 4 | { 5 | $( selector ).remove(); 6 | } 7 | else 8 | { 9 | $( selector ).css( "visibility", "hidden" ); 10 | } 11 | chrome.extension.sendRequest( { 12 | method: "elementNuked", 13 | }); 14 | } 15 | 16 | var url = document.location.href; 17 | 18 | chrome.extension.sendRequest( { 19 | method: "getElements", 20 | url: url 21 | }, 22 | function( response ) 23 | { 24 | response.elements.map( function( element ) 25 | { 26 | setTimeout( function() 27 | { 28 | remove( element.selector, element.method ); 29 | }, parseInt( element.delay ) ); 30 | }); 31 | } 32 | ); -------------------------------------------------------------------------------- /popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 |Move your mouse to hover over the element you want to remove, and click.
10 |When you've removed everything you want to, click the menu button again to go to the options page where you'll see what you've nuked.
11 |From the options page you can add a delay and change the method that's used to hide the element. You can also edit the URL to make it less specific, or add wildcards.
12 |Once you're happy, just close the options page. Next time the page is loaded, the elements will get nuked again...
13 |P.S. You can always visit the options page by right clicking the icon again.
15 | 16 | 17 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "Nukem", 4 | "short_name": "Nukem", 5 | "description": "Remove elements from web pages permanently", 6 | "version": "0.6", 7 | "author": "Gruntfuggly", 8 | "permissions": [ 9 | "chrome://favicon/", 10 | "activeTab", 11 | "storage" 12 | ], 13 | "icons": { 14 | "16": "icons/nukem-16.png", 15 | "48": "icons/nukem-48.png", 16 | "128": "icons/nukem-128.png" 17 | }, 18 | "background": { 19 | "scripts": [ 20 | "background.js" 21 | ] 22 | }, 23 | "browser_action": { 24 | "default_icon": "icons/nukem-19-disabled.png", 25 | "default_title": "Start nukin'...", 26 | "default_popup": "popup.html" 27 | }, 28 | "options_page": "options.html", 29 | "content_scripts": [ 30 | { 31 | "matches": [ 32 | "*://*/*" 33 | ], 34 | "js": [ 35 | "jquery-3.1.1.slim.min.js", 36 | "engine.js" 37 | ] 38 | }, 39 | { 40 | "matches": [ 41 | "*://*/*" 42 | ], 43 | "js": [ 44 | "jquery-3.1.1.slim.min.js", 45 | "nukem.js" 46 | ], 47 | "run_at": "document_end" 48 | } 49 | ] 50 | } -------------------------------------------------------------------------------- /options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |