├── .gitignore ├── image.png ├── icons ├── icon128.png ├── icon16.png ├── icon19.png └── icon48.png ├── Makefile ├── src ├── bg │ └── background.js └── inject │ └── inject.js ├── manifest.json ├── README.md ├── LICENSE └── _locales └── en └── messages.json /.gitignore: -------------------------------------------------------------------------------- 1 | real-aws-status.* 2 | -------------------------------------------------------------------------------- /image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josegonzalez/real-aws-status/HEAD/image.png -------------------------------------------------------------------------------- /icons/icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josegonzalez/real-aws-status/HEAD/icons/icon128.png -------------------------------------------------------------------------------- /icons/icon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josegonzalez/real-aws-status/HEAD/icons/icon16.png -------------------------------------------------------------------------------- /icons/icon19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josegonzalez/real-aws-status/HEAD/icons/icon19.png -------------------------------------------------------------------------------- /icons/icon48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josegonzalez/real-aws-status/HEAD/icons/icon48.png -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | zip --recurse-paths real-aws-status.zip icons _locales src image.png manifest.json 3 | -------------------------------------------------------------------------------- /src/bg/background.js: -------------------------------------------------------------------------------- 1 | // if you checked "fancy-settings" in extensionizr.com, uncomment this lines 2 | 3 | // var settings = new Store("settings", { 4 | // "sample_setting": "This is how you use Store.js to remember values" 5 | // }); 6 | 7 | 8 | //example of using a message handler from the inject scripts 9 | chrome.extension.onMessage.addListener( 10 | function(request, sender, sendResponse) { 11 | chrome.pageAction.show(sender.tab.id); 12 | sendResponse(); 13 | }); 14 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Real AWS Status", 3 | "version": "0.1.0", 4 | "manifest_version": 2, 5 | "description": "Make the aws status page a bit more useful during outages", 6 | "homepage_url": "https://github.com/josegonzalez/real-aws-status", 7 | "icons": { 8 | "16": "icons/icon16.png", 9 | "48": "icons/icon48.png", 10 | "128": "icons/icon128.png" 11 | }, 12 | "default_locale": "en", 13 | "background": { 14 | "scripts": [ 15 | "src/bg/background.js" 16 | ], 17 | "persistent": false 18 | }, 19 | "permissions": [ 20 | "http://status.aws.amazon.com/*", 21 | "https://status.aws.amazon.com/*" 22 | ], 23 | "content_scripts": [ 24 | { 25 | "matches": [ 26 | "http://status.aws.amazon.com/*", 27 | "https://status.aws.amazon.com/*" 28 | ], 29 | "js": [ 30 | "src/inject/inject.js" 31 | ] 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # real-aws-status 2 | 3 | Modifies the aws status page such that it *actually* shows the status of services. 4 | 5 | ![example](image.png) 6 | 7 | # usage 8 | 9 | ## from the chrome store 10 | 11 | - Install it from [here](https://chrome.google.com/webstore/detail/real-aws-status/kaegondhonfdclembpcgaaammmlfaekj). 12 | - Enjoy! 13 | 14 | ## from source 15 | 16 | - Download the latest crx release from the [releases page](https://github.com/josegonzalez/real-aws-status/releases) 17 | - Drag the release to your Chrome browser on the `chrome://extensions/` page and install 18 | - Enjoy! 19 | 20 | # how does it work? 21 | 22 | - Grabs all the rows in the status table 23 | - Deletes the rows if the status image is "a-okay" 24 | - Increments the status image in all other cases (except when AWS already says a service is down) 25 | - Updates the legend to show a joke legend 26 | - Shows all "resolved" issues as infobox 27 | 28 | # todo 29 | 30 | Whatever is in the issue tracker. Pull requests welcome! 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Jose Diaz-Gonzalez and contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/inject/inject.js: -------------------------------------------------------------------------------- 1 | var css = "#current_events_block table.fullWidth tbody tr { display:none }", 2 | head = document.head || document.getElementsByTagName('head')[0], 3 | style = document.createElement('style'); 4 | 5 | style.type = 'text/css'; 6 | if (style.styleSheet){ 7 | style.styleSheet.cssText = css; 8 | } else { 9 | style.appendChild(document.createTextNode(css)); 10 | } 11 | 12 | head.appendChild(style); 13 | 14 | chrome.extension.sendMessage({}, function(response) { 15 | var readyStateCheckInterval = setInterval(function() { 16 | if (document.readyState === 'complete') { 17 | clearInterval(readyStateCheckInterval); 18 | 19 | var tables = document.querySelectorAll('#current_events_block table.fullWidth tbody'); 20 | for (let table of tables) { 21 | var allClear = true; 22 | var trs = table.querySelectorAll('tr'); 23 | 24 | for (let tr of trs) { 25 | var image = tr.getElementsByTagName('img')[0]; 26 | if (image.src.indexOf('status0.gif') > -1) { 27 | var textEl = tr.querySelectorAll('td:nth-of-type(3)')[0], 28 | text = textEl.innerText || textEl.textContent; 29 | if (text.toLowerCase().indexOf('service is operating normally') == 0) { 30 | tr.parentNode.removeChild(tr); 31 | continue; 32 | } 33 | } 34 | 35 | tr.style.display = 'table-row'; 36 | if (image.src.indexOf('/images/status0.gif') > -1) { 37 | tr.parentNode.removeChild(tr); 38 | } else if (image.src.indexOf('/images/status1.gif') > -1) { 39 | image.src = '/images/status2.gif'; 40 | } else if (image.src.indexOf('/images/status2.gif') > -1) { 41 | image.src = '/images/status3.gif'; 42 | } else { 43 | image.src = '/images/status1.gif'; 44 | } 45 | allClear = false; 46 | } 47 | 48 | if (allClear) { 49 | var extra = [ 50 | '', 51 | '', 52 | 'Amazon AWS', 53 | 'Service is (probably) operating normally', 54 | '', 55 | '', 56 | ].join(' '); 57 | 58 | table.innerHTML = table.innerHTML + extra; 59 | } 60 | } 61 | var tds = document.querySelectorAll('body > div > div .pad8.bordered:not(.gradient):not(.whitebg) td') 62 | var iteration = 0; 63 | var messages = { 64 | 1: 'Service is (probaby)
operating normally', 65 | 2: 'Everything is fucked', 66 | 3: 'We finally concede
everything is fucked', 67 | 4: 'Nuclear armageddon
wiped out all life on Earth', 68 | }; 69 | var i = 0; 70 | for (let tr of tds) { 71 | var image = tr.getElementsByTagName('img'); 72 | i++ 73 | if (image.length > 0) { 74 | if (iteration == 1) { 75 | image[0].src ='/images/status1.gif'; 76 | } 77 | if (iteration == 2) { 78 | image[0].src ='/images/status2.gif'; 79 | } 80 | if (iteration == 3) { 81 | image[0].src ='/images/status3.gif'; 82 | } 83 | iteration++; 84 | continue; 85 | } 86 | if (i % 2 == 0) { 87 | tr.innerHTML = messages[iteration]; 88 | } 89 | } 90 | } 91 | }, 10); 92 | }); 93 | -------------------------------------------------------------------------------- /_locales/en/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "l10nTabName": { 3 | "message":"Localization" 4 | ,"description":"name of the localization tab" 5 | } 6 | ,"l10nHeader": { 7 | "message":"It does localization too! (this whole tab is, actually)" 8 | ,"description":"Header text for the localization section" 9 | } 10 | ,"l10nIntro": { 11 | "message":"'L10n' refers to 'Localization' - 'L' an 'n' are obvious, and 10 comes from the number of letters between those two. It is the process/whatever of displaying something in the language of choice. It uses 'I18n', 'Internationalization', which refers to the tools / framework supporting L10n. I.e., something is internationalized if it has I18n support, and can be localized. Something is localized for you if it is in your language / dialect." 12 | ,"description":"introduce the basic idea." 13 | } 14 | ,"l10nProd": { 15 | "message":"You are planning to allow localization, right? You have no idea who will be using your extension! You have no idea who will be translating it! At least support the basics, it's not hard, and having the framework in place will let you transition much more easily later on." 16 | ,"description":"drive the point home. It's good for you." 17 | } 18 | ,"l10nFirstParagraph": { 19 | "message":"When the options page loads, elements decorated with data-l10n will automatically be localized!" 20 | ,"description":"inform that elements will be localized on load" 21 | } 22 | ,"l10nSecondParagraph": { 23 | "message":"If you need more complex localization, you can also define data-l10n-args. This should contain $containerType$ filled with $dataType$, which will be passed into Chrome's i18n API as $functionArgs$. In fact, this paragraph does just that, and wraps the args in mono-space font. Easy!" 24 | ,"description":"introduce the data-l10n-args attribute. End on a lame note." 25 | ,"placeholders": { 26 | "containerType": { 27 | "content":"$1" 28 | ,"example":"'array', 'list', or something similar" 29 | ,"description":"type of the args container" 30 | } 31 | ,"dataType": { 32 | "content":"$2" 33 | ,"example":"string" 34 | ,"description":"type of data in each array index" 35 | } 36 | ,"functionArgs": { 37 | "content":"$3" 38 | ,"example":"arguments" 39 | ,"description":"whatever you call what you pass into a function/method. args, params, etc." 40 | } 41 | } 42 | } 43 | ,"l10nThirdParagraph": { 44 | "message":"Message contents are passed right into innerHTML without processing - include any tags (or even scripts) that you feel like. If you have an input field, the placeholder will be set instead, and buttons will have the value attribute set." 45 | ,"description":"inform that we handle placeholders, buttons, and direct HTML input" 46 | } 47 | ,"l10nButtonsBefore": { 48 | "message":"Different types of buttons are handled as well. <button> elements have their html set:" 49 | } 50 | ,"l10nButton": { 51 | "message":"in a button" 52 | } 53 | ,"l10nButtonsBetween": { 54 | "message":"while <input type='submit'> and <input type='button'> get their 'value' set (note: no HTML):" 55 | } 56 | ,"l10nSubmit": { 57 | "message":"a submit value" 58 | } 59 | ,"l10nButtonsAfter": { 60 | "message":"Awesome, no?" 61 | } 62 | ,"l10nExtras": { 63 | "message":"You can even set data-l10n on things like the <title> tag, which lets you have translatable page titles, or fieldset <legend> tags, or anywhere else - the default Boil.localize() behavior will check every tag in the document, not just the body." 64 | ,"description":"inform about places which may not be obvious, like , etc" 65 | } 66 | } 67 | --------------------------------------------------------------------------------