From 6ec35c3e5113718350725343bc63074d42f71fe1 Mon Sep 17 00:00:00 2001 From: Rudis Muiznieks Date: Fri, 7 Oct 2022 20:16:16 +0200 Subject: [PATCH] started adding greasemonkey scripts --- userscripts/redirect-amazon.js | 16 +++++ userscripts/redirect-reddit.js | 16 +++++ userscripts/redirect-twitter.js | 16 +++++ userscripts/style-hackernews.js | 107 ++++++++++++++++++++++++++++++++ userscripts/style-hckrnews.js | 72 +++++++++++++++++++++ 5 files changed, 227 insertions(+) create mode 100644 userscripts/redirect-amazon.js create mode 100644 userscripts/redirect-reddit.js create mode 100644 userscripts/redirect-twitter.js create mode 100644 userscripts/style-hackernews.js create mode 100644 userscripts/style-hckrnews.js diff --git a/userscripts/redirect-amazon.js b/userscripts/redirect-amazon.js new file mode 100644 index 0000000..aec6b86 --- /dev/null +++ b/userscripts/redirect-amazon.js @@ -0,0 +1,16 @@ +// ==UserScript== +// @name Redirect-Amazon +// @namespace code.sitosis.com +// @version 1.0 +// @description Rediret Amazon +// @author rudism +// @match https://www.amazon.com/* +// @match https://amazon.com/* +// @grant none +// @run-at document-start +// ==/UserScript== + +(function () { + 'use strict'; + top.location.hostname = "smile.amazon.com"; +})(); diff --git a/userscripts/redirect-reddit.js b/userscripts/redirect-reddit.js new file mode 100644 index 0000000..225ee23 --- /dev/null +++ b/userscripts/redirect-reddit.js @@ -0,0 +1,16 @@ +// ==UserScript== +// @name Redirect-Reddit +// @namespace code.sitosis.com +// @version 1.0 +// @description Rediret Reddit +// @author rudism +// @match https://www.reddit.com/* +// @match https://reddit.com/* +// @grant none +// @run-at document-start +// ==/UserScript== + +(function () { + 'use strict'; + top.location.hostname = "r.rdsm.ca"; +})(); diff --git a/userscripts/redirect-twitter.js b/userscripts/redirect-twitter.js new file mode 100644 index 0000000..5acc6c2 --- /dev/null +++ b/userscripts/redirect-twitter.js @@ -0,0 +1,16 @@ +// ==UserScript== +// @name Redirect-Twitter +// @namespace code.sitosis.com +// @version 1.0 +// @description Rediret Twitter +// @author rudism +// @match https://www.twitter.com/* +// @match https://twitter.com/* +// @grant none +// @run-at document-start +// ==/UserScript== + +(function () { + 'use strict'; + top.location.hostname = "t.rdsm.ca"; +})(); diff --git a/userscripts/style-hackernews.js b/userscripts/style-hackernews.js new file mode 100644 index 0000000..f82d13b --- /dev/null +++ b/userscripts/style-hackernews.js @@ -0,0 +1,107 @@ +// ==UserScript== +// @name Style-HackerNews +// @namespace code.sitosis.com +// @version 1.0 +// @description Style HackerNews +// @author rudism +// @match https://news.ycombinator.com/* +// @grant none +// @run-at document-end +// ==/UserScript== + +function injectStyle(css) { + var style = document.createElement('style'); + style.innerHTML = css; + var body = document.getElementsByTagName('body'); + if(body.length > 0) { + body[0].appendChild(style); + } +} + +(function () { + 'use strict'; + injectStyle(` +body { + background-color: #11111b; +} + +.fatitem td { + color: #cdd6f4; + font-size: 12pt; +} + +#hnmain { + background-color: #1e1e2e; +} + +#hnmain td[bgcolor='#ff6600'] { + background-color: #89b4fa; +} + +img[src='y18.gif'] { + filter: invert(100%); +} + +#hnmain td[bgcolor='#ff6600'] a:link { + color: #11111b; +} + +.comhead a:link, +.subtext a:visited, +.hnmore a:link, +a:visited { + color: #a6adc8; +} + +a:link { + color: #cdd6f4; +} + +a.titlelink:hover, a.storylink:hover { + color: #a6e3a1; +} + +font[color='#3c963c'] { + color: #a6e3a1; +} + +.c00, +.c00 a:link { + color: #cdd6f4; +} + +.c5a, +.c5a a:link, +.c5a a:visited, +.c73, +.c73 a:link, +.c73 a:visited, +.c82, +.c82 a:link, +.c82 a:visited, +.c88, +.c88 a:link, +.c88 a:visited, +.c9c, +.c9c a:link, +.c9c a:visited, +.cae, +.cae a:link, +.cae a:visited, +.cbe, +.cbe a:link, +.cbe a:visited, +.cce, +.cce a:link, +.cce a:visited, +.cdd, +.cdd a:link, +.cdd a:visited { + color: #f38ba8; +} + +.comment, +.title { + font-size: 12pt; +}`); +})(); diff --git a/userscripts/style-hckrnews.js b/userscripts/style-hckrnews.js new file mode 100644 index 0000000..c0dcea4 --- /dev/null +++ b/userscripts/style-hckrnews.js @@ -0,0 +1,72 @@ +// ==UserScript== +// @name Style-Hckrnews +// @namespace code.sitosis.com +// @version 1.0 +// @description Style Hckrnews +// @author rudism +// @match https://hckrnews.com/* +// @grant none +// @run-at document-end +// ==/UserScript== + +function injectStyle(css) { + var style = document.createElement('style'); + style.innerHTML = css; + var body = document.getElementsByTagName('body'); + if(body.length > 0) { + body[0].appendChild(style); + } +} + +(function () { + 'use strict'; + injectStyle(` +body, +.form-actions { + background: #1e1e2e; + color: #cdd6f4; +} + +a { + color: #a6e3a1; +} + +.entries a.link { + color: #cdd6f4; +} + +.entries a.link:visited, +.entries .source { + color: #a6adc8; +} + +.entries .homepage { + + color: #f38ba8; +} +header a, +header a:hover { + color: #89b4fa; +} + +.entries a:hover { + background-color: #080808; + color: #a6e3a1; +} + +.entries .tab, +.menu .nav-pills > .active > a, +.menu .nav-pills > .active > a:hover { + background-color: #cba6f7; + color: #11111b; +} + +.nav > li > a:hover { + background-color: #11111b; + color: #f9e2af; +} + +.entries .day { + border-color: #89b4fa; +}`); +})();