├── background.js ├── data ├── icons │ ├── 128.png │ ├── 16.png │ ├── 19.png │ ├── 256.png │ ├── 32.png │ ├── 38.png │ ├── 48.png │ ├── 512.png │ ├── 64.png │ └── disabled │ │ ├── 16.png │ │ ├── 19.png │ │ ├── 32.png │ │ ├── 38.png │ │ ├── 48.png │ │ └── 64.png ├── options │ ├── index.html │ └── index.js └── themes │ └── global-dark-style.css └── manifest.json /background.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 'use strict'; 3 | 4 | var engine = {}; 5 | 6 | var notify = message => chrome.notifications.create({ 7 | title: chrome.runtime.getManifest().name, 8 | message, 9 | type: 'basic', 10 | iconUrl: 'data/icons/48.png' 11 | }); 12 | 13 | engine.policy = ({url}) => { 14 | if (url && url.startsWith('http')) { 15 | const {hostname} = new URL(url); 16 | if (localStorage.getItem('blacklist.' + hostname)) { 17 | return false; 18 | } 19 | else { 20 | return hostname; 21 | } 22 | } 23 | return false; 24 | }; 25 | 26 | 27 | engine.execute = (d, obj) => { 28 | const b = engine.policy(d); 29 | let code = ''; 30 | 31 | if (b !== false && !obj.code) { 32 | const theme = localStorage.getItem('theme'); 33 | const sg = localStorage.getItem('styles') || ''; 34 | const sc = localStorage.getItem('style.' + b) || ''; 35 | code = ` 36 | var style = document.createElement('style'); 37 | style.id = 'global-dark-style'; 38 | style.type = 'text/css'; 39 | style.textContent = atob('${theme}') + '\\n' + atob('${sg}') + '\\n' + atob('${sc}'); 40 | document.documentElement.appendChild(style); 41 | `; 42 | } 43 | 44 | chrome.tabs.executeScript(d.tabId || d.id, Object.assign({ 45 | runAt: 'document_start', 46 | matchAboutBlank: true, 47 | code 48 | }, obj), () => chrome.runtime.lastError); 49 | }; 50 | 51 | engine.onCommitted = d => engine.execute(d, { 52 | frameId: d.frameId 53 | }); 54 | 55 | engine.style = {}; 56 | engine.style.add = tab => engine.execute(tab, { 57 | allFrames: true 58 | }); 59 | 60 | engine.install = () => { 61 | chrome.webNavigation.onCommitted.addListener(engine.onCommitted); 62 | chrome.tabs.query({ 63 | url: '*://*/*' 64 | }, tabs => tabs.forEach(engine.style.add)); 65 | chrome.browserAction.setIcon({ 66 | path: { 67 | '16': 'data/icons/16.png', 68 | '19': 'data/icons/19.png', 69 | '32': 'data/icons/32.png', 70 | '48': 'data/icons/48.png', 71 | '64': 'data/icons/64.png' 72 | } 73 | }); 74 | }; 75 | engine.style.remove = tab => engine.execute(tab, { 76 | allFrames: true, 77 | code: ` 78 | [...document.querySelectorAll('style#global-dark-style')].forEach(s => s.remove()); 79 | ` 80 | }); 81 | engine.remove = () => { 82 | chrome.webNavigation.onCommitted.removeListener(engine.onCommitted); 83 | chrome.tabs.query({ 84 | url: '*://*/*' 85 | }, tabs => tabs.forEach(engine.style.remove)); 86 | chrome.browserAction.setIcon({ 87 | path: { 88 | '16': 'data/icons/disabled/16.png', 89 | '19': 'data/icons/disabled/19.png', 90 | '32': 'data/icons/disabled/32.png', 91 | '48': 'data/icons/disabled/48.png', 92 | '64': 'data/icons/disabled/64.png' 93 | } 94 | }); 95 | }; 96 | 97 | // browser action 98 | chrome.browserAction.onClicked.addListener(() => { 99 | const enabled = localStorage.getItem('enabled') !== 'true'; 100 | localStorage.setItem('enabled', enabled); 101 | 102 | engine[enabled ? 'install' : 'remove'](); 103 | }); 104 | 105 | // context-menu 106 | { 107 | const callback = () => { 108 | chrome.contextMenus.create({ 109 | title: 'Add/remove this domain to/from the blacklist', 110 | contexts: ['browser_action'], 111 | id: 'blacklist', 112 | documentUrlPatterns: ['*://*/*'] 113 | }); 114 | chrome.contextMenus.create({ 115 | title: 'Report an issue', 116 | contexts: ['browser_action'], 117 | id: 'report', 118 | documentUrlPatterns: ['*://*/*'] 119 | }); 120 | }; 121 | 122 | chrome.runtime.onStartup.addListener(callback); 123 | chrome.runtime.onInstalled.addListener(callback); 124 | } 125 | chrome.contextMenus.onClicked.addListener((d, tab) => { 126 | if (d.menuItemId === 'blacklist') { 127 | if (tab.url.startsWith('http')) { 128 | const {hostname} = new URL(tab.url); 129 | const name = 'blacklist.' + hostname; 130 | chrome.tabs.query({ 131 | url: '*://' + hostname + '/*' 132 | }, tabs => { 133 | if (localStorage.getItem(name)) { 134 | localStorage.removeItem(name); 135 | notify(`"${hostname}" is removed from the blacklist.`); 136 | if (localStorage.getItem('enabled') === 'true') { 137 | tabs.forEach(tab => engine.style.add(tab)); 138 | } 139 | } 140 | else { 141 | localStorage.setItem(name, 1); 142 | notify(`"${hostname}" is added to the blacklist.`); 143 | tabs.forEach(tab => engine.style.remove(tab)); 144 | } 145 | }); 146 | } 147 | else { 148 | notify('This domain is not supported'); 149 | } 150 | } 151 | else if (d.menuItemId === 'report') { 152 | chrome.tabs.create({ 153 | url: chrome.runtime.getManifest()['homepage_url'] + '#reviews' 154 | }); 155 | } 156 | }); 157 | 158 | // onInstalled: load the theme 159 | chrome.runtime.onInstalled.addListener(() => chrome.storage.local.get({ 160 | theme: 'global-dark-style.css' 161 | }, ({theme}) => { 162 | fetch('data/themes/' + theme).then(r => r.text()).then(content => { 163 | localStorage.setItem('theme', btoa(content)); 164 | localStorage.setItem('enabled', true); 165 | engine.install(); 166 | }); 167 | })); 168 | 169 | // init 170 | engine[localStorage.getItem('enabled') === 'true' ? 'install' : 'remove'](); 171 | 172 | chrome.storage.onChanged.addListener(prefs => { 173 | if (prefs.styles) { 174 | localStorage.setItem('styles', btoa(prefs.styles.newValue)); 175 | } 176 | }); 177 | // FAQs & Feedback 178 | chrome.storage.local.get({ 179 | 'version': null, 180 | 'faqs': true, 181 | 'last-update': 0 182 | }, prefs => { 183 | const version = chrome.runtime.getManifest().version; 184 | 185 | if (prefs.version ? (prefs.faqs && prefs.version !== version) : true) { 186 | const now = Date.now(); 187 | const doUpdate = (now - prefs['last-update']) / 1000 / 60 / 60 / 24 > 30; 188 | chrome.storage.local.set({ 189 | version, 190 | 'last-update': doUpdate ? Date.now() : prefs['last-update'] 191 | }, () => { 192 | // do not display the FAQs page if last-update occurred less than 30 days ago. 193 | if (doUpdate) { 194 | const p = Boolean(prefs.version); 195 | window.setTimeout(() => chrome.tabs.create({ 196 | url: chrome.runtime.getManifest().homepage_url + '?version=' + version + 197 | '&type=' + (p ? ('upgrade&p=' + prefs.version) : 'install'), 198 | active: p === false 199 | }), 3000); 200 | } 201 | }); 202 | } 203 | }); 204 | 205 | { 206 | const {name, version} = chrome.runtime.getManifest(); 207 | chrome.runtime.setUninstallURL( 208 | chrome.runtime.getManifest().homepage_url + '?rd=feedback&name=' + name + '&version=' + version 209 | ); 210 | } 211 | -------------------------------------------------------------------------------- /data/icons/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunu-bounir/Global-Dark-Style/3d4e0f121137d750dcc0660153706ca4c4082878/data/icons/128.png -------------------------------------------------------------------------------- /data/icons/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunu-bounir/Global-Dark-Style/3d4e0f121137d750dcc0660153706ca4c4082878/data/icons/16.png -------------------------------------------------------------------------------- /data/icons/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunu-bounir/Global-Dark-Style/3d4e0f121137d750dcc0660153706ca4c4082878/data/icons/19.png -------------------------------------------------------------------------------- /data/icons/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunu-bounir/Global-Dark-Style/3d4e0f121137d750dcc0660153706ca4c4082878/data/icons/256.png -------------------------------------------------------------------------------- /data/icons/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunu-bounir/Global-Dark-Style/3d4e0f121137d750dcc0660153706ca4c4082878/data/icons/32.png -------------------------------------------------------------------------------- /data/icons/38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunu-bounir/Global-Dark-Style/3d4e0f121137d750dcc0660153706ca4c4082878/data/icons/38.png -------------------------------------------------------------------------------- /data/icons/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunu-bounir/Global-Dark-Style/3d4e0f121137d750dcc0660153706ca4c4082878/data/icons/48.png -------------------------------------------------------------------------------- /data/icons/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunu-bounir/Global-Dark-Style/3d4e0f121137d750dcc0660153706ca4c4082878/data/icons/512.png -------------------------------------------------------------------------------- /data/icons/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunu-bounir/Global-Dark-Style/3d4e0f121137d750dcc0660153706ca4c4082878/data/icons/64.png -------------------------------------------------------------------------------- /data/icons/disabled/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunu-bounir/Global-Dark-Style/3d4e0f121137d750dcc0660153706ca4c4082878/data/icons/disabled/16.png -------------------------------------------------------------------------------- /data/icons/disabled/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunu-bounir/Global-Dark-Style/3d4e0f121137d750dcc0660153706ca4c4082878/data/icons/disabled/19.png -------------------------------------------------------------------------------- /data/icons/disabled/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunu-bounir/Global-Dark-Style/3d4e0f121137d750dcc0660153706ca4c4082878/data/icons/disabled/32.png -------------------------------------------------------------------------------- /data/icons/disabled/38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunu-bounir/Global-Dark-Style/3d4e0f121137d750dcc0660153706ca4c4082878/data/icons/disabled/38.png -------------------------------------------------------------------------------- /data/icons/disabled/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunu-bounir/Global-Dark-Style/3d4e0f121137d750dcc0660153706ca4c4082878/data/icons/disabled/48.png -------------------------------------------------------------------------------- /data/icons/disabled/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunu-bounir/Global-Dark-Style/3d4e0f121137d750dcc0660153706ca4c4082878/data/icons/disabled/64.png -------------------------------------------------------------------------------- /data/options/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |Hostname | 81 |CSS Rules | 82 |- | 83 |
---|
90 | 91 | 92 | 93 | 94 |
95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /data/options/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | document.getElementById('blacklist').value = 4 | Object.keys(localStorage).filter(s => s.startsWith('blacklist.')).map(s => s.substr(10)).join(', '); 5 | 6 | document.getElementById('styles').value = atob(localStorage.getItem('styles') || ''); 7 | 8 | var add = id => { 9 | const tr = document.createElement('tr'); 10 | tr.id = id; 11 | tr.appendChild(document.createElement('td')); 12 | tr.appendChild(document.createElement('td')); 13 | const td = document.createElement('td'); 14 | td.textContent = '×'; 15 | td.addEventListener('click', () => tr.remove()); 16 | tr.appendChild(td); 17 | document.querySelector('tbody').appendChild(tr); 18 | 19 | return tr; 20 | }; 21 | 22 | var update = (tr, hostname, style) => { 23 | tr.querySelector('td').textContent = hostname; 24 | const td = tr.querySelector('td:nth-child(2)'); 25 | td.textContent = style; 26 | td.title = style; 27 | tr.css = style; 28 | }; 29 | 30 | document.getElementById('custom').addEventListener('submit', e => { 31 | e.preventDefault(); 32 | 33 | const eh = e.target.querySelector('[name=hostname]'); 34 | const hostname = eh.value.toLowerCase(); 35 | eh.value = ''; 36 | const es = e.target.querySelector('[name=style]'); 37 | const style = es.value; 38 | es.value = ''; 39 | 40 | let tr = document.getElementById('style.' + hostname) || add('style.' + hostname); 41 | update(tr, hostname, style); 42 | }); 43 | 44 | Object.keys(localStorage).filter(s => s.startsWith('style.')).forEach(s => { 45 | update(add(s), s.substr(6), atob(localStorage.getItem(s))); 46 | }); 47 | 48 | document.getElementById('save').addEventListener('click', () => { 49 | // save blacklist 50 | Object.keys(localStorage).filter(s => s.startsWith('blacklist.')).forEach(s => localStorage.removeItem(s)); 51 | document.getElementById('blacklist').value.split(/\s*,\s*/) 52 | .map(s => s.toLowerCase()) 53 | .filter((s, i, l) => s && l.indexOf(s) === i).forEach(s => localStorage.setItem('blacklist.' + s, 1)); 54 | // save user-styles 55 | Object.keys(localStorage).filter(s => s.startsWith('style.')).forEach(s => localStorage.removeItem(s)); 56 | [...document.querySelectorAll('tbody tr')].forEach(tr => localStorage.setItem( 57 | 'style.' + tr.querySelector('td').textContent, 58 | btoa(tr.css) 59 | )); 60 | // global styles 61 | localStorage.setItem('styles', btoa(document.getElementById('styles').value)); 62 | // info 63 | const info = document.getElementById('info'); 64 | info.textContent = 'Options saved'; 65 | window.setTimeout(() => info.textContent = '', 750); 66 | }); 67 | 68 | // fill the form 69 | document.addEventListener('click', e => { 70 | if (e.target.tagName === 'TD') { 71 | const tr = e.target.closest('tr'); 72 | if (tr && tr.css) { 73 | document.querySelector('form [name=hostname]').value = tr.querySelector('td').textContent; 74 | document.querySelector('form [name=style]').value = tr.css; 75 | } 76 | } 77 | }); 78 | // reset 79 | document.getElementById('reset').addEventListener('click', e => { 80 | if (e.detail === 1) { 81 | const info = document.getElementById('info'); 82 | window.setTimeout(() => info.textContent = '', 750); 83 | info.textContent = 'Double-click to reset!'; 84 | } 85 | else { 86 | localStorage.clear(); 87 | chrome.storage.local.clear(() => { 88 | chrome.runtime.reload(); 89 | window.close(); 90 | }); 91 | } 92 | }); 93 | // support 94 | document.getElementById('support').addEventListener('click', () => chrome.tabs.create({ 95 | url: chrome.runtime.getManifest().homepage_url + '?rd=donate' 96 | })); 97 | -------------------------------------------------------------------------------- /data/themes/global-dark-style.css: -------------------------------------------------------------------------------- 1 | html 2 | { 3 | background: /***** COPY AND PASTE THE URL OF YOUR BACKROUND-IMAGE INSIDE THE url("") *****/url("data:image/png;base64,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") 4 | 5 | /***** FOR A SIMPLE BLACK BACKGROUND JUST REMOVE THE URL LINE ABOVE *****/ 6 | /***** Some background-images (you can also use your own url): 7 | 8 | default: https://abload.de/img/bg_digital94uzx.png 9 | old default1: https://abload.de/img/b1fgs11.png 10 | old default2: https://abload.de/img/ultra_x2vm9k.jpg 11 | https://abload.de/img/b2w4shd.png 12 | https://abload.de/img/b3qrs99.png 13 | https://abload.de/img/b4zcse8.png 14 | https://abload.de/img/b5b1s7x.png 15 | https://abload.de/img/b6umsmy.png 16 | https://abload.de/img/b7ars8c.png 17 | https://abload.de/img/kubrickbgcolor2darkr8skc.png 18 | https://abload.de/img/xpattern_darkq8s3i.png 19 | https://abload.de/img/mainpatternolxcq.png 20 | 21 | */ #1A1A1A /* fixed */ !important; 22 | } 23 | 24 | 25 | /*----- DEFAULT TEXT, BORDER & BACKGROUND COLORS -----*/ 26 | * 27 | { 28 | color: #999 !important; 29 | text-shadow: 0 0 3px #000 !important; 30 | box-shadow: none !important; 31 | background-color: transparent !important; 32 | border-color: #444 !important; 33 | border-top-color: #444 !important; 34 | border-bottom-color: #444 !important; 35 | border-left-color: #444 !important; 36 | border-right-color: #444 !important; 37 | } 38 | 39 | body 40 | { 41 | background: transparent !important; 42 | } 43 | 44 | *:before, *:after 45 | { 46 | background-color: transparent !important; 47 | border-color: #444 !important; 48 | } 49 | 50 | a, a * 51 | { 52 | color: #409B9B !important; 53 | text-decoration: none !important; 54 | } 55 | 56 | a:hover, a:hover *, a:visited:hover, a:visited:hover *, span[onclick]:hover, div[onclick]:hover, [role="link"]:hover, [role="link"]:hover *, [role="button"]:hover *, [role="menuitem"]:hover, [role="menuitem"]:hover *, .link:hover, .link:hover * 57 | { 58 | color: #F0F0F0 !important; 59 | text-shadow: 0 0 5px rgba(255,255,200,0.9) !important; 60 | } 61 | 62 | a:visited, a:visited * 63 | { 64 | color: #607069 !important; 65 | } 66 | 67 | a.highlight, a.highlight *, a.active, a.active *, .selected, .selected *, [href="#"] 68 | { 69 | color: #DDD !important; 70 | font-weight: bold !important; 71 | } 72 | 73 | h1, h2, h3, h4, h5, h6, h1 *, h2 *, h3 *, strong, [id*="headline"], [class*="headline"], [id*="header"], [class*="header"], [class*="header"] td 74 | { 75 | color: #DDD !important; 76 | } 77 | 78 | a h1, a h2, a h3, a h4, a h5, a h6, h1 a, h2 a, h3 a, a strong, a[id*="headline"], a[class*="headline"], a[id*="header"], a[class*="header"] 79 | { 80 | text-decoration: underline !important; 81 | } 82 | 83 | [class*="error"], [class*="alert"], code, span[onclick], div[onclick] 84 | { 85 | color: #900 !important; 86 | } 87 | 88 | ::-moz-selection 89 | { 90 | background: #377 !important; 91 | color: #000 !important; 92 | } 93 | 94 | ::selection 95 | { 96 | background: #377 !important; 97 | color: #000 !important; 98 | } 99 | 100 | :focus 101 | { 102 | outline: none !important; 103 | } 104 | 105 | 106 | /*----- MENU & CO BACKGROUND-COLORS -----*/ 107 | div[style="display: block;"], div[role="navigation"] 108 | { 109 | background: rgba(0,0,0,.5) !important; 110 | } 111 | 112 | table 113 | { 114 | background: rgba(40,30,30,.6) !important; 115 | border-radius: 6px !important; 116 | } 117 | 118 | table > tbody > tr:nth-child(even), table > tbody > tr > td:nth-child(even) 119 | { 120 | background-color: rgba(0,0,0,.2) !important; 121 | } 122 | 123 | iframe, embed, nav, label [onclick], nav ul, div[style*="position:"][style*="left:"][style*="visible"], div[style*="z-index:"][style*="left:"][style*="visible"], div[style*="-moz-user-select"], div[role="menu"], div[role="dialog"], span[class*="script"] div, [id*="menu"], [id*="Menu"], [class*="dropdown"], [class*="popup"], [class="title"], ul[style*="display:"], ul[style*="visibility:"] ul, [id*="nav"] ul, [class*="nav"] ul, ul[class*="menu"], a[onclick][style*="display"], a[id*="ghosteryfirefox"], #ghostery-purple-bubble, #translator-popup, .menu, .tooltip, .hovercard, .vbmenu_popup 124 | { 125 | background: rgba(5,5,5,.9) !important; 126 | border-radius: 5px; 127 | box-shadow: 1px 1px 5px #000 !important; 128 | } 129 | 130 | header, #header, footer, #footer 131 | { 132 | background: rgba(19,19,19,.9) !important; 133 | box-shadow: 0 0 5px #000 !important; 134 | } 135 | 136 | body > #dialog, body > .xenOverlay 137 | { 138 | background: rgba(19,19,19,.96) !important; 139 | background-clip: padding-box !important; 140 | box-shadow: 0 0 15px #000, inset 0 0 0 1px rgba(200,200,200,.5), inset 0 0 5px #111 !important; 141 | border: 10px solid rgba(99,99,99,.7) !important; 142 | border-radius: 0 !important; 143 | } 144 | 145 | [id*="overlay"], [id*="lightbox"], blockquote 146 | { 147 | background-color: rgba(35,35,35,.9) !important; 148 | border-radius: 5px; 149 | } 150 | 151 | pre, dl, .Message code 152 | { 153 | background-color: rgba(5,5,5,.5) !important; 154 | } 155 | 156 | 157 | /*----- DEFAULT BUTTONS, SEARCHBOXES & CO -----*/ 158 | input, select, button, [role="button"], a.button, a.submit, a.BigButton, a.TabLink, .install[onclick] 159 | { 160 | -moz-appearance: none !important; 161 | -webkit-appearance: none !important; 162 | transition: border-color 0.3s !important; 163 | background: #060606 !important; 164 | color: #BBB !important; 165 | text-shadow: 0 1px #000 !important; 166 | border: 2px solid #333 !important; 167 | border-radius: 4px !important; 168 | box-shadow: 0 0 2px rgba(0,0,0,.9) !important; 169 | } 170 | 171 | a[href="javascript:;"], a[class*="button"]:not(:empty), a[id*="button"]:not(:empty), a[id*="Button"]:not(:empty), div[class*="button"][onclick] 172 | { 173 | transition: border-color 0.3s !important; 174 | background: #060606 !important; 175 | color: #BBB !important; 176 | text-shadow: 0 1px #000 !important; 177 | border-color: #333 !important; 178 | box-shadow: 0 0 2px rgba(0,0,0,.9) !important; 179 | } 180 | 181 | a[href="javascript:;"]:hover, a[class*="button"]:not(:empty):hover, a[id*="button"]:hover, a[id*="Button"]:not(:empty):hover, div[class*="button"][onclick]:hover 182 | { 183 | background: #151515 !important; 184 | color: #FFF !important; 185 | } 186 | 187 | input *, select *, button *, a.button *, a.submit * 188 | { 189 | color: #BBB !important; 190 | text-shadow: none !important; 191 | } 192 | 193 | input:hover, input[type="button"]:hover, select:hover, button:hover, [role="button"]:hover, a.button:hover, a.submit:hover, a.BigButton:hover, a.TabLink:hover 194 | { 195 | border: 2px solid #555 !important; 196 | border-top-color: #555 !important; 197 | border-bottom-color: #555 !important; 198 | border-left-color: #555 !important; 199 | border-right-color: #555 !important; 200 | } 201 | 202 | input:focus, select:focus 203 | { 204 | box-shadow: 0 0 5px #077 !important; 205 | } 206 | 207 | input *:hover * 208 | { 209 | color: #F0F0F0 !important; 210 | text-shadow: 0 0 2px #FFF !important; 211 | } 212 | 213 | input[disabled], select[disabled], button[disabled], input[disabled]:hover, select[disabled]:hover, button[disabled]:hover, input[disabled]:focus, select[disabled]:focus, button[disabled]:focus 214 | { 215 | opacity: 0.5 !important; 216 | border-color: #333 !important; 217 | } 218 | 219 | /* 220 | input[type="checkbox"], input[type="radio"] { 221 | box-shadow: 0 0 0 2px #444, 0 0 2px 2px #000 !important; 222 | opacity: 0.7; 223 | transition: box-shadow 0.2s, opacity 0.2s !important} 224 | input[type="checkbox"]:not([disabled]):hover, input[type="radio"]:not([disabled]):hover { 225 | opacity: 0.9} 226 | input[type="checkbox"]:not([disabled]):active, input[type="radio"]:not([disabled]):active { 227 | box-shadow: 0 0 0 2px #999, 0 0 2px 2px #000 !important} 228 | input[type="checkbox"]:checked, input[type="radio"]:checked { 229 | box-shadow: 0 0 0 2px #077, 0 0 2px 2px #000 !important} 230 | input[type="checkbox"][disabled], input[type="radio"][disabled] { 231 | opacity: 0.35} 232 | */ 233 | input[type="checkbox"] 234 | { 235 | border-radius: 1px !important; 236 | } 237 | 238 | input[type="radio"], input[type="radio"]:focus 239 | { 240 | border-radius: 100% !important; 241 | } 242 | 243 | input[type="checkbox"], input[type="radio"] 244 | { 245 | min-width: 12px; 246 | min-height: 12px; 247 | } 248 | 249 | input[type="checkbox"]:checked, input[type="radio"]:checked 250 | { 251 | border-color: #077 !important; 252 | box-shadow: 0 0 5px #077 !important; 253 | } 254 | 255 | select 256 | { 257 | padding-right: 15px !important; 258 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAECAYAAABCxiV9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAeSURBVBhXY5g5c+Z/BiwALo6uAEMDTACXSWgSDAwA4jATh950E30AAAAASUVORK5CYII=) no-repeat right 4px center #060606 !important; 259 | transition: border-color 0.3s, background-position 0.3s !important; 260 | } 261 | 262 | button:active, input[type="submit"]:active, input[type="button"]:active, a.button:active, a[class*="button"]:not(:empty):active, a.submit:active, a.BigButton:active, a.TabLink:active, .Active .TabLink 263 | { 264 | background: #292929 !important; 265 | color: #FFF !important; 266 | } 267 | 268 | textarea 269 | { 270 | -moz-appearance: none !important; 271 | -webkit-appearance: none !important; 272 | background: rgba(0,0,0,.3) !important; 273 | border-radius: 3px !important; 274 | border: 1px solid #000 !important; 275 | box-shadow: inset 0 0 8px #000 !important; 276 | transition: border-color, background, 0.3s !important; 277 | } 278 | 279 | textarea, textarea * 280 | { 281 | color: #C8C8C8 !important; 282 | text-shadow: 0 0 1px gray !important; 283 | } 284 | 285 | textarea:hover, textarea:focus:hover 286 | { 287 | border-color: #333 !important; 288 | } 289 | 290 | textarea:focus 291 | { 292 | background: rgba(0,0,0,.5) !important; 293 | border-color: #222 !important; 294 | } 295 | 296 | textarea:focus, textarea:focus > * 297 | { 298 | text-shadow: none !important; 299 | box-shadow: none !important; 300 | } 301 | 302 | option, optgroup 303 | { 304 | -moz-appearance: none !important; 305 | -webkit-appearance: none !important; 306 | background: none !important; 307 | color: #666 !important; 308 | } 309 | 310 | optgroup 311 | { 312 | background: #222 !important; 313 | color: #DDD !important; 314 | } 315 | 316 | option:not([disabled]):hover, option:focus, option:checked 317 | { 318 | background: linear-gradient(#333, #292929) !important; 319 | color: #DDD !important; 320 | } 321 | 322 | 323 | /*----- IMAGE CHANGES -----*/ 324 | body, *:not(:empty):not(html):not(span):not(a):not(b):not(option):not(select):not(img):not([style="display: block;"]):not([onclick*="open"]):not([onclick*="s_objectID"]):not([class*="stars"]):not([id*="stars"]):not([id="rating"]):not([class="rating"]):not([class*="SPRITE"]):not([id*="SPRITE"]):not([class*="item"]):not([id*="item"]):not([class*="thumb"]):not([class*="icon"]):not([class*="photo"]):not(.view):not(.text):not([id*="lbImage"]):not([class*="cc-in"]):not([class*="gr-body"]):not([id*="watch"]):not(#globalsearch), 325 | .r3_hm, .gmbutton2 b, .gtab-i, .ph, .bstab-iLft, .csb, #pagination div, [style*="sprite2.png"], #mw-head-base, #mw-page-base 326 | { 327 | background-image: none !important; 328 | } 329 | 330 | img 331 | { 332 | opacity: .7 !important; 333 | transition: opacity .2s; 334 | } 335 | 336 | img:hover, a:hover img, #mpiv-popup 337 | { 338 | opacity: 1 !important; 339 | } 340 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "version": "0.1.0", 4 | "name": "Global Dark Style", 5 | "description": "A configure dark theme with exception list to change everything to real dark", 6 | 7 | "icons": { 8 | "16": "data/icons/16.png", 9 | "19": "data/icons/19.png", 10 | "32": "data/icons/32.png", 11 | "38": "data/icons/38.png", 12 | "48": "data/icons/48.png", 13 | "64": "data/icons/64.png", 14 | "128": "data/icons/128.png", 15 | "256": "data/icons/256.png" 16 | }, 17 | 18 | "permissions": [ 19 | "*://*/*", 20 | "webNavigation", 21 | "storage", 22 | "contextMenus", 23 | "notifications", 24 | "tabs" 25 | ], 26 | 27 | "homepage_url": "http://add0n.com/global-dark-style.html", 28 | 29 | "browser_action":{ 30 | "default_icon": { 31 | "16": "data/icons/16.png", 32 | "19": "data/icons/19.png", 33 | "32": "data/icons/32.png", 34 | "38": "data/icons/38.png", 35 | "48": "data/icons/48.png", 36 | "64": "data/icons/64.png", 37 | "128": "data/icons/128.png" 38 | } 39 | }, 40 | 41 | "background": { 42 | "persistent": false, 43 | "scripts": [ 44 | "background.js" 45 | ] 46 | }, 47 | 48 | "options_ui": { 49 | "page": "data/options/index.html", 50 | "chrome_style": true 51 | } 52 | } 53 | --------------------------------------------------------------------------------