Why Nostr? What is Njump?
2024-10-02 10:00:43
in reply to

zirias (on snac) on Nostr: Ok, simplified and improved my script a bit, now looks like this, including a hack to ...

Ok, simplified and improved my script a bit, now looks like this, including a hack to prevent the default style from showing:

// ==UserScript==
// @name snaccss
// @namespace http://tampermonkey.net/
// @version 2024-10-02
// @description custom snac styling
// @author zirias
// @match https://snac.bsd.cafe/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=bsd.cafe
// @grant GM_xmlhttpRequest
// @connect codeberg.org
// @run-at document-start
// ==/UserScript==

(function() {
document.getElementsByTagName("body")[0].style.display = "none";
GM.xmlHttpRequest({
method: "GET",
url: "https://codeberg.org/voron/snac-style/raw/branch/master/next.css";,
onload: function(response) {
if (response.readyState == 4 && response.status == 200) {
document.getElementsByTagName("style")[0].innerHTML = response.responseText;
document.getElementsByTagName("body")[0].style.display = "inherit";
}
}
});
})();
I found I prefer the "next" theme 🙂 It features media-selectors for dark/light ...

CC:


Author Public Key
npub1w96l7dwwzzmd6taq8qzhgh80hdsad2y0shrank8whyrksa2fkwasz99l6c