diff --git a/src/js/2lib.js b/src/js/2lib.js new file mode 100644 index 0000000..6bdf42f --- /dev/null +++ b/src/js/2lib.js @@ -0,0 +1,21 @@ +addStyle(` + .jscommentsCommentBox, .dropdown-menu > li > a, .moreBtn > div > span { + color: #000000!important; + } + .dropdown-menu .dropdown-menu-muted { + color: #888!important; + } + #searchModeTabs li.active, #searchModeTabs li.active a, #advSearch, .cBox1 a, button span { + color: #000000!important; + } + .b-search-input .button input, .b-search-input .button button > span, { + color: #000000!important; + } + #searchResultBox { + background: #000000; + color: #ffffff!important; + } + div.resItemFuzzyMatch h3 a:link, div.resItemFuzzyMatch h3 a:visited { + color: #ffffff!important; + } +`); \ No newline at end of file diff --git a/src/js/bbc.js b/src/js/bbc.js new file mode 100644 index 0000000..8b1a897 --- /dev/null +++ b/src/js/bbc.js @@ -0,0 +1,11 @@ +addStyle(` + .article__body-content, .author-unit__container { + background-color: #000000; + } + [class$="MenuListContainer"] { + background-color: #000000!important; + } + .lx-c-sticky { + color: #000000; + } +`); \ No newline at end of file diff --git a/src/js/digi24.js b/src/js/digi24.js index 458eeca..4716503 100644 --- a/src/js/digi24.js +++ b/src/js/digi24.js @@ -7,12 +7,6 @@ for (i = 0; i < toWhite.length; i++) { var adjustPadding = document.querySelector('.footer-network-nav'); adjustPadding.style.setProperty('padding-top', '20px'); -function addStyle(styleString) { - const style = document.createElement('style'); - style.textContent = styleString; - document.head.append(style); -} - addStyle(` ::selection { color: black; diff --git a/src/js/dw.js b/src/js/dw.js new file mode 100644 index 0000000..5f3ed60 --- /dev/null +++ b/src/js/dw.js @@ -0,0 +1,16 @@ +addStyle(` + div#footerSection { + border-left: none; + border-right: none; + border-bottom: none; + } + div.adsContainer { + background-color: transparent; + } + div#navMain ul#navLevel1 li div.flyout ul.sitemap li a { + color: #000000!important; + } + div#navMain ul#navLevel1 li a:hover { + color: #000000!important; + } +`); \ No newline at end of file diff --git a/src/js/functions.js b/src/js/functions.js new file mode 100644 index 0000000..331ff9a --- /dev/null +++ b/src/js/functions.js @@ -0,0 +1,6 @@ + +function addStyle(styleString) { + const style = document.createElement('style'); + style.textContent = styleString; + document.head.append(style); +} \ No newline at end of file diff --git a/src/js/theguardian.js b/src/js/theguardian.js new file mode 100644 index 0000000..bbf22a8 --- /dev/null +++ b/src/js/theguardian.js @@ -0,0 +1,14 @@ +addStyle(` + .u-faux-block-link--hover { + background-color: rgba(255,255,255,0.2)!important; + } + .most-viewed-right ~ a { + color: #ffffff!important; + } + body { + color: #ffffff!important; + } + a:-webkit-any-link { + color: #ffffff!important; + } +`); \ No newline at end of file diff --git a/src/manifest.json b/src/manifest.json index b510efa..5071812 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,7 +2,7 @@ "name": "DarkMode News", "action": {}, "manifest_version": 3, - "version": "0.1", + "version": "0.2", "description": "News Websites will automatically go to dark mode.", "permissions": [ "activeTab", @@ -16,12 +16,28 @@ }, "content_scripts": [ { - "matches": ["*://*.digi24.ro/*", "*://*.theguardian.com/*", "*://*.reuters.com/*", "*://*.bbc.com/*", "*://*.foreignaffairs.com/*", "*://*.dw.com/*", "*://*.ft.com/*", "*://*.chicagotribune.com/*", "*://*.apnews.com/*", "*://*.europa.eu/*"], - "js": ["run.js"] + "matches": ["*://*.digi24.ro/*", "*://*.theguardian.com/*", "*://*.reuters.com/*", "*://*.bbc.com/*", "*://*.foreignaffairs.com/*", "*://*.dw.com/*", "*://*.ft.com/*", "*://*.chicagotribune.com/*", "*://*.apnews.com/*", "*://*.europa.eu/*", "*://*.2lib.org/*"], + "js": ["/js/functions.js", "run.js"] }, { "matches": ["*://*.digi24.ro/*"], "js": ["/js/digi24.js"] + }, + { + "matches": ["*://*.dw.com/*"], + "js": ["/js/dw.js"] + }, + { + "matches": ["*://*.bbc.com/*"], + "js": ["/js/bbc.js"] + }, + { + "matches": ["*://*.theguardian.com/*"], + "js": ["/js/theguardian.js"] + }, + { + "matches": ["*://*.2lib.org/*"], + "js": ["/js/2lib.js"] } ], "background": {