init of v2 of the awesome monkey repo

This commit is contained in:
2026-06-21 03:43:53 -05:00
commit 93b40e92a3
4 changed files with 139 additions and 0 deletions
+36
View File
@@ -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);
})();