diff options
Diffstat (limited to '.config/qutebrowser/greasemonkey')
15 files changed, 249 insertions, 0 deletions
diff --git a/.config/qutebrowser/greasemonkey/boursorama-css.js b/.config/qutebrowser/greasemonkey/boursorama-css.js new file mode 100755 index 0000000..4d1c29e --- /dev/null +++ b/.config/qutebrowser/greasemonkey/boursorama-css.js @@ -0,0 +1,18 @@ +// ==UserScript== +// @name boursorama css +// @match *://*.boursorama.com/* +// @grant none +// ==/UserScript== + +GM_addStyle(` + .chatbot, + .c-promotional-cards-wrapper, + .c-articles-wrapper, + .c-offers__entry-card { + width: 0px !important; + height: 0px !important; + visibility: hidden; + margin: 0px; + padding: 0px; + } +`) diff --git a/.config/qutebrowser/greasemonkey/duckduckgo.js b/.config/qutebrowser/greasemonkey/duckduckgo.js new file mode 100755 index 0000000..d4d971f --- /dev/null +++ b/.config/qutebrowser/greasemonkey/duckduckgo.js @@ -0,0 +1,12 @@ +// ==UserScript== +// @name custom duckduckgo +// @match https://duckduckgo.com/* +// @grant none +// ==/UserScript== + +GM_addStyle(` + .result--ads { + visibility: hidden !important; + height: 0px !important; + } +`) diff --git a/.config/qutebrowser/greasemonkey/github-css.js b/.config/qutebrowser/greasemonkey/github-css.js new file mode 100755 index 0000000..7b32636 --- /dev/null +++ b/.config/qutebrowser/greasemonkey/github-css.js @@ -0,0 +1,12 @@ +// ==UserScript== +// @name github css +// @match *://github.com/* +// @match *://gist.github.com/* +// @grant none +// ==/UserScript== + +GM_addStyle(` + *, .BtnGroup-item { + border-radius: 0px !important; + } +`) diff --git a/.config/qutebrowser/greasemonkey/imgur-to-imgin.js b/.config/qutebrowser/greasemonkey/imgur-to-imgin.js new file mode 100755 index 0000000..d4ac434 --- /dev/null +++ b/.config/qutebrowser/greasemonkey/imgur-to-imgin.js @@ -0,0 +1,8 @@ +// ==UserScript== +// @name imgur to imgin +// @match *://imgur.com/* +// @grant none +// @run-at document-start +// ==/UserScript== + +top.location.hostname = "imgin.voidnet.tech"; diff --git a/.config/qutebrowser/greasemonkey/instagram-to-bibliogram.js b/.config/qutebrowser/greasemonkey/instagram-to-bibliogram.js new file mode 100755 index 0000000..a608059 --- /dev/null +++ b/.config/qutebrowser/greasemonkey/instagram-to-bibliogram.js @@ -0,0 +1,8 @@ +// ==UserScript== +// @name instagram to biliogram +// @match *://*.instagram.com/* +// @grant none +// @run-at document-start +// ==/UserScript== + +top.location.hostname = "bibliogram.art"; diff --git a/.config/qutebrowser/greasemonkey/medium-to-scribe.js b/.config/qutebrowser/greasemonkey/medium-to-scribe.js new file mode 100755 index 0000000..5a94ab0 --- /dev/null +++ b/.config/qutebrowser/greasemonkey/medium-to-scribe.js @@ -0,0 +1,8 @@ +// ==UserScript== +// @name medium to scribe +// @match *://*.medium.com/* +// @grant none +// @run-at document-start +// ==/UserScript== + +top.location.hostname = "scribe.rip"; diff --git a/.config/qutebrowser/greasemonkey/miniflux.js b/.config/qutebrowser/greasemonkey/miniflux.js new file mode 100755 index 0000000..4b17b17 --- /dev/null +++ b/.config/qutebrowser/greasemonkey/miniflux.js @@ -0,0 +1,83 @@ +// ==UserScript== +// @name custom miniflux +// @match *://miniflux.rgoncalves.se/*NONE +// @grant none +// ==/UserScript== + +function get_img_content(content) { + var object = document.createElement("div"); + object.innerHTML = content; + + try { + url = object.getElementsByTagName("img")[0].src; + } catch (error) { + url = undefined; + } + + return url; +} + +function add_entry_images(article) { + var article_meta = article.getElementsByClassName("item-meta")[0]; + var article_frame = document.createElement("div"); + var article_id = article.getElementsByClassName("item-title")[0] + .getElementsByTagName("a")[0] + .href + .split("/") + .splice(-1, 1); + + article_meta.appendChild(article_frame); + + fetch(`/v1/entries/${article_id}`) + .then(res => res.json()) + .then((res) => { + var url; + + try { + url = res["enclosures"][0]["url"]; + } catch (error) { + url = get_img_content(res["content"]); + } + + if (typeof url === 'undefined') { + return; + } + + console.log(url); + + img = document.createElement("img"); + img.src = url; + img.style.width = "100%"; + img.style.minHeight = "100px"; + img.loading = "lazy"; + + article_frame.appendChild(img); + }) +} + +function has_displayable_image(article) { + category = article.getElementsByClassName("category")[0] + .getElementsByTagName("a")[0] + .innerText; + + return category === "blog" + || category === "hn" + || category === "social" + || category === "yt"; +} + +details = document.getElementsByTagName("details"); + +for (let detail of details) { + detail.open = true; +} + +articles = document.getElementsByTagName("article"); + +for (let article of articles) { + if (! has_displayable_image(article)) { + continue; + } + + add_entry_images(article); +} diff --git a/.config/qutebrowser/greasemonkey/minimal-css.js b/.config/qutebrowser/greasemonkey/minimal-css.js new file mode 100755 index 0000000..1fe1414 --- /dev/null +++ b/.config/qutebrowser/greasemonkey/minimal-css.js @@ -0,0 +1,16 @@ +// ==UserScript== +// @name minimal css +// @match *://www.google.com +// @match *://www.google.com/search* +// @match *://cliq.zoho.eu/chats/* +// @match *://www.pinterest.com/* +// @grant none +// ==/UserScript== + +GM_addStyle(` + * { + border-radius: 0px !important; + transition: none !important; + animation: none !important; + } +`) diff --git a/.config/qutebrowser/greasemonkey/no-sticky-headers.js b/.config/qutebrowser/greasemonkey/no-sticky-headers.js new file mode 100755 index 0000000..e5eefa1 --- /dev/null +++ b/.config/qutebrowser/greasemonkey/no-sticky-headers.js @@ -0,0 +1,15 @@ +// ==UserScript== +// @name no sticky header +// @match *://*.substack.com/* +// @grant none +// ==/UserScript== + +(function () { + var i, elements = document.querySelectorAll('body *'); + + for (i = 0; i < elements.length; i++) { + if (getComputedStyle(elements[i]).position === 'fixed') { + elements[i].parentNode.removeChild(elements[i]); + } + } +})(); diff --git a/.config/qutebrowser/greasemonkey/reddit-to-teddit.js b/.config/qutebrowser/greasemonkey/reddit-to-teddit.js new file mode 100755 index 0000000..8c1ee6b --- /dev/null +++ b/.config/qutebrowser/greasemonkey/reddit-to-teddit.js @@ -0,0 +1,9 @@ +// ==UserScript== +// @name reddit to teddit +// @match *://*.reddit.com/* +// @match *://reddit.com/* +// @grant none +// @run-at document-start +// ==/UserScript== + +top.location.hostname = "teddit.net"; diff --git a/.config/qutebrowser/greasemonkey/scaleway-css.js b/.config/qutebrowser/greasemonkey/scaleway-css.js new file mode 100755 index 0000000..99955ca --- /dev/null +++ b/.config/qutebrowser/greasemonkey/scaleway-css.js @@ -0,0 +1,11 @@ +// ==UserScript== +// @name scaleway css +// @match *://*.scaleway.com/* +// @grant none +// ==/UserScript== + +GM_addStyle(` + #outdated { + visibility: hidden; + } +`) diff --git a/.config/qutebrowser/greasemonkey/scribe-css.js b/.config/qutebrowser/greasemonkey/scribe-css.js new file mode 100755 index 0000000..60fc0e2 --- /dev/null +++ b/.config/qutebrowser/greasemonkey/scribe-css.js @@ -0,0 +1,16 @@ +// ==UserScript== +// @name scribe css +// @match *://scribe.rip/* +// @grant none +// ==/UserScript== + +GM_addStyle(` + body { + background-color: #ffffff; + font-family: monospace, monospace; + } + img { + border: 1px solid #000000; + } +`) + diff --git a/.config/qutebrowser/greasemonkey/stackoverflow-css.js b/.config/qutebrowser/greasemonkey/stackoverflow-css.js new file mode 100755 index 0000000..6c98466 --- /dev/null +++ b/.config/qutebrowser/greasemonkey/stackoverflow-css.js @@ -0,0 +1,15 @@ +// ==UserScript== +// @name stackoverflow css +// @match *://*.stackoverflow.com/* +// @match *://*.stackexchange.com/* +// @match *://*.superuser.com/* +// @match *://*.serverfault.com/* +// @grant none +// ==/UserScript== + +GM_addStyle(` + .js-consent-banner, + .js-freemium-cta { + visibility: hidden; + } +`) diff --git a/.config/qutebrowser/greasemonkey/twitter-to-nitter.js b/.config/qutebrowser/greasemonkey/twitter-to-nitter.js new file mode 100755 index 0000000..f4c3518 --- /dev/null +++ b/.config/qutebrowser/greasemonkey/twitter-to-nitter.js @@ -0,0 +1,9 @@ +// ==UserScript== +// @name twitter to nitter +// @match *://*.twitter.com/* +// @match *://twitter.com/* +// @grant none +// @run-at document-start +// ==/UserScript== + +top.location.hostname = "nitter.net"; diff --git a/.config/qutebrowser/greasemonkey/youtube-to-yewtube.js b/.config/qutebrowser/greasemonkey/youtube-to-yewtube.js new file mode 100755 index 0000000..c8f73f1 --- /dev/null +++ b/.config/qutebrowser/greasemonkey/youtube-to-yewtube.js @@ -0,0 +1,9 @@ +// ==UserScript== +// @name youtube to yewtube +// @match *://*.youtube.com/* +// @match *://youtube.com/* +// @grant none +// @run-at document-start +// ==/UserScript== + +top.location.hostname = "yewtu.be"; |