commit 93b40e92a32c614027ace94636223d3e9f195218 Author: stabosa87 Date: Sun Jun 21 03:43:53 2026 -0500 init of v2 of the awesome monkey repo diff --git a/README.md b/README.md new file mode 100644 index 0000000..c104ee1 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# My-monkey-scripts +Scripts that make the internet useable + +(mainly youtube and ebay) + +scripts descriptions + +## ebay pricer +adds the total of the shipping and price you pay if shipping exists. + +## no numpad youtube +removes the numpad for switching to points in a video (useful for laptops) + +## redirect to reddit +man because FUCK REDDIT I HATE WHEN I VIISIT A FUCKING REDDIT LINK AND I SEE "You've been blocked by network security." FUCK YOU. + +Anyways its for redirecting reddit links to redlib (not forcefully) \ No newline at end of file diff --git a/scripts/ebaypricer.user.js b/scripts/ebaypricer.user.js new file mode 100644 index 0000000..3a40e81 --- /dev/null +++ b/scripts/ebaypricer.user.js @@ -0,0 +1,46 @@ +// ==UserScript== +// @name ebay pricer +// @version 1.0 +// @author Stabosa87 +// @match https://www.ebay.com/* +// @grant none +// ==/UserScript== + +(function () { + function money(text) { + let m = text.match(/\$([\d.]+)/); + return m ? parseFloat(m[1]) : 0; + } + + function update() { + document.querySelectorAll("li.s-card").forEach(card => { + + if (card.dataset.priced) return; + + let pricel = card.querySelector(".s-card__price"); + if (!pricel) return; + + let price = money(pricel.textContent); + let shipping = 0; + + card.querySelectorAll(".s-card__attribute-row").forEach(row => { + if (row.textContent.includes("delivery") && row.textContent.includes("+$")) { + shipping = money(row.textContent); + } + }); + + if (shipping > 0) { + pricel.innerHTML += ` (or $${(price + shipping).toFixed(2)} total)`; + } + + card.dataset.priced = 1; + }); + } + + update(); + + new MutationObserver(update).observe(document.body, { + childList: true, + subtree: true + }); +})(); diff --git a/scripts/nonumpad.user.js b/scripts/nonumpad.user.js new file mode 100644 index 0000000..b1a1a61 --- /dev/null +++ b/scripts/nonumpad.user.js @@ -0,0 +1,40 @@ +// ==UserScript== +// @name No youtube numpad +// @version 1.0 +// @match https://www.youtube.com/* +// @author Stabosa87 +// @grant none +// @run-at document-start +// ==/UserScript== + +(function () { + 'use strict'; + + const keyset = new Set([ + 'Digit0','Digit1','Digit2','Digit3','Digit4', + 'Digit5','Digit6','Digit7','Digit8','Digit9', + 'Numpad0','Numpad1','Numpad2','Numpad3','Numpad4', + 'Numpad5','Numpad6','Numpad7','Numpad8','Numpad9' + ]); + + function typing(el) { + if (!el) return false; + + const tag = el.tagName; + return ( + tag === 'INPUT' || + tag === 'TEXTAREA' || + el.isContentEditable + ); + } + + function handler(e) { + if (!keyset.has(e.code)) return; + if (typing(document.activeElement)) return; + + e.preventDefault(); + e.stopImmediatePropagation(); + } + + document.addEventListener('keydown', handler, true); +})(); diff --git a/scripts/redirecttoredlib.user.js b/scripts/redirecttoredlib.user.js new file mode 100644 index 0000000..7c10563 --- /dev/null +++ b/scripts/redirecttoredlib.user.js @@ -0,0 +1,36 @@ +// ==UserScript== +// @name Redtolib +// @version 1.0 +// @match https://*.reddit.com/* +// @match https://reddit.com/* +// @author Stabosa87 +// @grant none +// @run-at document-end +// ==/UserScript== + +(function() { + 'use strict'; + + const link = document.createElement('a'); + link.innerText = 'VIEW ON REDLIB'; + + link.style.position = 'fixed'; + link.style.top = '0'; + link.style.left = '0'; + link.style.zIndex = '6969696969'; + link.style.display = 'none'; + + fetch("https://raw.githubusercontent.com/redlib-org/redlib-instances/main/instances.json") + .then(response => response.json()) + .then(data => { + if (data && data.instances && data.instances.length > 0) { + const Redliburl = data.instances[0].url; + const path = window.location.pathname + window.location.search + window.location.hash; + link.href = Redliburl + path; + link.style.display = 'inline'; + } + }) + .catch(e => console.error(e)); + + document.body.appendChild(link); +})(); \ No newline at end of file