diff options
Diffstat (limited to '.config/qutebrowser/greasemonkey')
-rwxr-xr-x | .config/qutebrowser/greasemonkey/1337x.js | 12 | ||||
-rwxr-xr-x | .config/qutebrowser/greasemonkey/amazon.js | 62 | ||||
-rwxr-xr-x | .config/qutebrowser/greasemonkey/boursobank.js (renamed from .config/qutebrowser/greasemonkey/boursorama.js) | 2 | ||||
-rwxr-xr-x | .config/qutebrowser/greasemonkey/gitlab.js | 2 | ||||
-rwxr-xr-x | .config/qutebrowser/greasemonkey/imgur-to-rimgo.js | 3 | ||||
-rwxr-xr-x | .config/qutebrowser/greasemonkey/old-wiki.js | 30 | ||||
-rwxr-xr-x | .config/qutebrowser/greasemonkey/quora-to-quetre.js | 8 | ||||
-rwxr-xr-x | .config/qutebrowser/greasemonkey/reddit-to-teddit.js | 6 | ||||
-rwxr-xr-x | .config/qutebrowser/greasemonkey/unsplash.js | 9 | ||||
-rwxr-xr-x | .config/qutebrowser/greasemonkey/yewtube.js | 2 |
10 files changed, 130 insertions, 6 deletions
diff --git a/.config/qutebrowser/greasemonkey/1337x.js b/.config/qutebrowser/greasemonkey/1337x.js new file mode 100755 index 0000000..e892ba9 --- /dev/null +++ b/.config/qutebrowser/greasemonkey/1337x.js @@ -0,0 +1,12 @@ +// ==UserScript== +// @name 1337x css +// @match *://1337x.to/* +// @grant none +// ==/UserScript== + +GM_addStyle(` + body > a:nth-last-child(2), + body > a:nth-last-child(1) { + z-index: -1 !important; + } +`) diff --git a/.config/qutebrowser/greasemonkey/amazon.js b/.config/qutebrowser/greasemonkey/amazon.js new file mode 100755 index 0000000..0edf4fd --- /dev/null +++ b/.config/qutebrowser/greasemonkey/amazon.js @@ -0,0 +1,62 @@ +// ==UserScript== +// @name Amazon CamelCamelCamel + Keepa Price Charts +// @version 1.0.8 +// @description Add a CamelCamelCamel and Keepa price charts to Amazon product pages. +// @author miki.it +// @namespace null +// @homepage https://github.com/mikispag/userscripts/ +// @include https://www.amazon.*/* +// @include https://smile.amazon.*/* +// @run-at document-end +// @downloadURL https://update.greasyfork.org/scripts/416590/Amazon%20CamelCamelCamel%20%2B%20Keepa%20Price%20Charts.user.js +// @updateURL https://update.greasyfork.org/scripts/416590/Amazon%20CamelCamelCamel%20%2B%20Keepa%20Price%20Charts.meta.js +// ==/UserScript== + +function getASIN() { + var asinElement = document.getElementById("ASIN") || document.evaluate("//@data-asin", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; + if (!asinElement) { + throw new Error("Amazon CamelCamelCamel + Keepa Price Charts: unable to find ASIN!"); + } + return asinElement.value; +} + +window.addEventListener("load", function() { + var tld = document.domain.split(".").pop(); + var country = tld; + if (tld == "com") { + country = "us"; + } + + var asin = getASIN(); + if (!asin) { + throw new Error("Amazon CamelCamelCamel + Keepa Price Charts: unable to get ASIN!"); + } + + var parentElement = document.getElementById("unifiedPrice_feature_div") || document.getElementById("MediaMatrix"); + if (!parentElement) { + throw new Error("Amazon CamelCamelCamel + Keepa Price Charts: unable to get parent element!"); + } + + var camelChartContainer = document.createElement("div"); + var camelLink = document.createElement("a"); + camelLink.target = "_blank"; + camelLink.href = "https://" + country + ".camelcamelcamel.com/product/" + asin; + var camelChart = new Image(500, 400); + camelChart.src = "https://charts.camelcamelcamel.com/" + country + "/" + asin + "/amazon-new-used.png?force=1&zero=0&w=500&h=400&desired=false&legend=1&ilt=1&tp=all&fo=0"; + camelLink.appendChild(camelChart); + camelChartContainer.appendChild(camelLink); + + var keepaChartContainer = document.createElement("div"); + var keepaLink = document.createElement("a"); + keepaLink.target = "_blank"; + keepaLink.href = "https://keepa.com/#!product/8-" + asin; + var keepaChart = new Image(500, 200); + keepaChart.src = "https://graph.keepa.com/pricehistory.png?used=1&asin=" + asin + "&domain=" + tld; + keepaLink.appendChild(keepaChart); + keepaChartContainer.appendChild(keepaLink); + + var chartsContainer = document.createElement("div"); + chartsContainer.appendChild(camelChartContainer); + chartsContainer.appendChild(keepaChartContainer); + parentElement.appendChild(chartsContainer); +}, false); diff --git a/.config/qutebrowser/greasemonkey/boursorama.js b/.config/qutebrowser/greasemonkey/boursobank.js index 771bc38..6752ce3 100755 --- a/.config/qutebrowser/greasemonkey/boursorama.js +++ b/.config/qutebrowser/greasemonkey/boursobank.js @@ -1,6 +1,6 @@ // ==UserScript== // @name boursorama css -// @match *://*.boursorama.com/* +// @match *://*.boursobank.com/* // @grant none // ==/UserScript== diff --git a/.config/qutebrowser/greasemonkey/gitlab.js b/.config/qutebrowser/greasemonkey/gitlab.js index 5ebb8a3..987ca72 100755 --- a/.config/qutebrowser/greasemonkey/gitlab.js +++ b/.config/qutebrowser/greasemonkey/gitlab.js @@ -1,6 +1,6 @@ // ==UserScript== // @name gitlab -// @match *://*/* +// @match *://*gitlab*/* // @run-at document-end // @grant none // ==/UserScript== diff --git a/.config/qutebrowser/greasemonkey/imgur-to-rimgo.js b/.config/qutebrowser/greasemonkey/imgur-to-rimgo.js index d0735cb..7c0e240 100755 --- a/.config/qutebrowser/greasemonkey/imgur-to-rimgo.js +++ b/.config/qutebrowser/greasemonkey/imgur-to-rimgo.js @@ -5,4 +5,5 @@ // @run-at document-start // ==/UserScript== -top.location.hostname = "rimgo.pussthecat.org"; +// top.location.hostname = "rimgo.pussthecat.org"; +top.location.hostname = "rimgo.ducks.party"; diff --git a/.config/qutebrowser/greasemonkey/old-wiki.js b/.config/qutebrowser/greasemonkey/old-wiki.js new file mode 100755 index 0000000..d14775b --- /dev/null +++ b/.config/qutebrowser/greasemonkey/old-wiki.js @@ -0,0 +1,30 @@ +// ==UserScript== +// @name old wiki vector style +// @match *://*.wikipedia.org/* +// @match *://*.wiki.archlinux.org/* +// @grant none +// ==/UserScript== + +(function() { + const url = new URL(window.location.href); + + if(url.toString().indexOf('useskin') === -1){ + url.searchParams.set('useskin', 'vector'); + location.replace(url); + } + + const a = document.getElementsByTagName('a'); + + for (var i = 0; i < a.length; ++i){ + if(a[i].href.indexOf(window.location.host) === -1){ + continue; + } + + let href = new URL(a[i].href); + href.searchParams.set('useskin', 'vector'); + a[i].href = href; + } + + url.searchParams.delete('useskin'); + history.replaceState(null, document.title, url.href); +})(); diff --git a/.config/qutebrowser/greasemonkey/quora-to-quetre.js b/.config/qutebrowser/greasemonkey/quora-to-quetre.js new file mode 100755 index 0000000..8379119 --- /dev/null +++ b/.config/qutebrowser/greasemonkey/quora-to-quetre.js @@ -0,0 +1,8 @@ +// ==UserScript== +// @name quora to quetre +// @match *://www.quora.com/* +// @grant none +// @run-at document-start +// ==/UserScript== + +top.location.hostname = "quetre.pussthecat.org"; diff --git a/.config/qutebrowser/greasemonkey/reddit-to-teddit.js b/.config/qutebrowser/greasemonkey/reddit-to-teddit.js index 8c1ee6b..788fecd 100755 --- a/.config/qutebrowser/greasemonkey/reddit-to-teddit.js +++ b/.config/qutebrowser/greasemonkey/reddit-to-teddit.js @@ -1,9 +1,11 @@ // ==UserScript== // @name reddit to teddit -// @match *://*.reddit.com/* // @match *://reddit.com/* +// @match *://www.reddit.com/* +// @exclude *://www.reddit.com/media* // @grant none // @run-at document-start // ==/UserScript== -top.location.hostname = "teddit.net"; +// top.location.hostname = "teddit.net"; +top.location.hostname = "old.reddit.com"; diff --git a/.config/qutebrowser/greasemonkey/unsplash.js b/.config/qutebrowser/greasemonkey/unsplash.js index 7d65781..17b117b 100755 --- a/.config/qutebrowser/greasemonkey/unsplash.js +++ b/.config/qutebrowser/greasemonkey/unsplash.js @@ -12,6 +12,7 @@ console.log("AAAAAAAA"); e.remove(); }); + })(); GM_addStyle(` @@ -21,3 +22,11 @@ GM_addStyle(` height: 0; } `) + +const text = 'Unsplash+'; +for (const container of document.querySelectorAll('figure')) { + if (container.textContent.includes(text)) { + container.remove(); + } + console.log(container); +} diff --git a/.config/qutebrowser/greasemonkey/yewtube.js b/.config/qutebrowser/greasemonkey/yewtube.js index c9f592b..f67db1b 100755 --- a/.config/qutebrowser/greasemonkey/yewtube.js +++ b/.config/qutebrowser/greasemonkey/yewtube.js @@ -6,4 +6,4 @@ // @run-at document-start // ==/UserScript== -document.cookie = "PREFS=%7B%22annotations%22%3Atrue%2C%22annotations_subscribed%22%3Afalse%2C%22autoplay%22%3Atrue%2C%22automatic_instance_redirect%22%3Atrue%2C%22captions%22%3A%5B%22%22%2C%22%22%2C%22%22%5D%2C%22comments%22%3A%5B%22youtube%22%2C%22reddit%22%5D%2C%22continue%22%3Afalse%2C%22continue_autoplay%22%3Atrue%2C%22dark_mode%22%3A%22light%22%2C%22latest_only%22%3Afalse%2C%22listen%22%3Afalse%2C%22local%22%3Atrue%2C%22watch_history%22%3Afalse%2C%22vr_mode%22%3Atrue%2C%22show_nick%22%3Afalse%2C%22locale%22%3A%22en-US%22%2C%22region%22%3A%22US%22%2C%22max_results%22%3A40%2C%22notifications_only%22%3Afalse%2C%22player_style%22%3A%22invidious%22%2C%22quality%22%3A%22dash%22%2C%22quality_dash%22%3A%221080p%22%2C%22default_home%22%3A%22%22%2C%22feed_menu%22%3A%5B%22Popular%22%2C%22Trending%22%5D%2C%22related_videos%22%3Atrue%2C%22sort%22%3A%22published%22%2C%22speed%22%3A1.0%2C%22thin_mode%22%3Afalse%2C%22unseen_only%22%3Afalse%2C%22video_loop%22%3Afalse%2C%22extend_desc%22%3Afalse%2C%22volume%22%3A50%2C%22save_player_pos%22%3Afalse%7D" +// document.cookie = "PREFS=%7B%22annotations%22%3Atrue%2C%22annotations_subscribed%22%3Afalse%2C%22autoplay%22%3Atrue%2C%22automatic_instance_redirect%22%3Atrue%2C%22captions%22%3A%5B%22%22%2C%22%22%2C%22%22%5D%2C%22comments%22%3A%5B%22youtube%22%2C%22reddit%22%5D%2C%22continue%22%3Afalse%2C%22continue_autoplay%22%3Atrue%2C%22dark_mode%22%3A%22light%22%2C%22latest_only%22%3Afalse%2C%22listen%22%3Afalse%2C%22local%22%3Atrue%2C%22watch_history%22%3Afalse%2C%22vr_mode%22%3Atrue%2C%22show_nick%22%3Afalse%2C%22locale%22%3A%22en-US%22%2C%22region%22%3A%22US%22%2C%22max_results%22%3A40%2C%22notifications_only%22%3Afalse%2C%22player_style%22%3A%22invidious%22%2C%22quality%22%3A%22dash%22%2C%22quality_dash%22%3A%221080p%22%2C%22default_home%22%3A%22%22%2C%22feed_menu%22%3A%5B%22Popular%22%2C%22Trending%22%5D%2C%22related_videos%22%3Atrue%2C%22sort%22%3A%22published%22%2C%22speed%22%3A1.0%2C%22thin_mode%22%3Afalse%2C%22unseen_only%22%3Afalse%2C%22video_loop%22%3Afalse%2C%22extend_desc%22%3Afalse%2C%22volume%22%3A50%2C%22save_player_pos%22%3Afalse%7D" |