├── src ├── icons │ ├── 16.png │ ├── 19.png │ ├── 38.png │ ├── 48.png │ ├── 128.png │ └── Untitled-1.png ├── manifest.json ├── background │ └── event.js └── content_scripts │ └── inject.js ├── awe-inspiring-synonyms-extension.crx ├── README.md ├── index.html └── demo.js /src/icons/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orangespaceman/awe-inspiring-synonyms-extension/master/src/icons/16.png -------------------------------------------------------------------------------- /src/icons/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orangespaceman/awe-inspiring-synonyms-extension/master/src/icons/19.png -------------------------------------------------------------------------------- /src/icons/38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orangespaceman/awe-inspiring-synonyms-extension/master/src/icons/38.png -------------------------------------------------------------------------------- /src/icons/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orangespaceman/awe-inspiring-synonyms-extension/master/src/icons/48.png -------------------------------------------------------------------------------- /src/icons/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orangespaceman/awe-inspiring-synonyms-extension/master/src/icons/128.png -------------------------------------------------------------------------------- /src/icons/Untitled-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orangespaceman/awe-inspiring-synonyms-extension/master/src/icons/Untitled-1.png -------------------------------------------------------------------------------- /awe-inspiring-synonyms-extension.crx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orangespaceman/awe-inspiring-synonyms-extension/master/awe-inspiring-synonyms-extension.crx -------------------------------------------------------------------------------- /src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Awe-inspiring synonyms", 3 | "version": "0.0.2", 4 | "manifest_version": 2, 5 | "description": "Awe-inspiring synonyms (for Americans)", 6 | "homepage_url": "http://guntlondon.com", 7 | "icons": { 8 | "16": "icons/16.png", 9 | "48": "icons/48.png", 10 | "128": "icons/128.png" 11 | }, 12 | "browser_action": { 13 | "default_title": "Toggle display of replaced words", 14 | "default_icon": { 15 | "19": "icons/19.png", 16 | "38": "icons/38.png" 17 | } 18 | }, 19 | "background": { 20 | "scripts": ["background/event.js"], 21 | "persistent": false 22 | }, 23 | "content_scripts": [ 24 | { 25 | "matches": [ 26 | "http://*/*", "https://*/*" 27 | ], 28 | "js": [ 29 | "content_scripts/inject.js" 30 | ], 31 | "run_at": "document_end" 32 | } 33 | ] 34 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Awe-inspiring Synonyms - Chrome extension 2 | 3 | A Chrome extension that automatically replaces the word 'phenomenal' with a random (but superior) synonym 4 | 5 | 6 | ## Installation 7 | 8 | Open Chrome, open the *extensions view* (chrome://extensions/) and drag/drop the **awe-inspiring-synonyms-extension.crx** file into the window 9 | 10 | 11 | ## Usage 12 | 13 | The plugin will automatically detect and replace every instance of 'phenomenal' on the page. 14 | 15 | These will be underlined to subtly highlight the location of the original word. 16 | 17 | To find the replaced words more easily, click the button in the toolbar to toggle a yellow background colour on each replacement. 18 | 19 | 20 | 21 | ## Credits 22 | 23 | Inspired by: 24 | 25 | * [Cloud to butt](https://github.com/panicsteve/cloud-to-butt) 26 | * [Downworthy](https://github.com/snipe/downworthy) 27 | * [Jailbreak-the-Patriarchy](https://github.com/DanielleSucher/Jailbreak-the-Patriarchy) 28 | -------------------------------------------------------------------------------- /src/background/event.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Awesome replacement... 3 | * 4 | * 5 | */ 6 | (function() { 7 | 8 | "use strict"; 9 | 10 | // update button state when find and replace has completed 11 | chrome.extension.onMessage.addListener(function(request, sender, sendResponse) { 12 | switch(request.type) { 13 | case "awesome-count": 14 | var wordCount = request.data.wordCount.toString(); 15 | var counter = request.data.counter.toString(); 16 | 17 | chrome.browserAction.setTitle({ 18 | title: "Toggle display of " + counter + " replaced words" 19 | }); 20 | chrome.browserAction.setBadgeText({ 21 | text: counter 22 | }); 23 | break; 24 | } 25 | return true; 26 | }); 27 | 28 | 29 | // toggle state when button is clicked 30 | chrome.browserAction.onClicked.addListener(function(tab){ 31 | chrome.tabs.sendMessage(tab.id, { action: "toggle-state" }); 32 | }); 33 | 34 | })(); -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |Awesome
28 |awesome
29 |AWESOME
31 |(awesome)
32 | Awesome 33 | 34 |that sucks
37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/content_scripts/inject.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Awesome replacement... 3 | * 4 | * 5 | */ 6 | (function() { 7 | 8 | "use strict"; 9 | 10 | // count how many replacements we've made 11 | var counter = 0; 12 | 13 | // strings to find and replace 14 | var findAndReplace = [ 15 | { word: "awesome", replacements: ["awe-inspiring","terrific", "fantastic", "amazing", "super", "stupendous", "outstanding", "great", "incredible", "marvelous", "wonderful", "fabulous", "impressive", "extraordinary", "magnificent", "superb", "astounding", "tremendous", "excellent", "exceptional", "awe-inspiring", "wondrous", "phenomenal", "actually quite good", "reasonably impressive", "marginally improved", "somewhat notable", "vaguely of interest"] }, 16 | { word: "sucks", replacements: ["is pretty terrible", "is rather awful", "is disappointingly bad"] } 17 | ]; 18 | 19 | 20 | // init! 21 | addStyles(); 22 | findAndReplace.forEach(function(wordObj){ 23 | awesomeFind(wordObj.word, wordObj.replacements); 24 | }); 25 | 26 | 27 | // insert page styles to display word replacements 28 | function addStyles() { 29 | 30 | // Create the