Pixmap Void theme

Refresh the website for the theme to appear.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Pixmap Void theme
// @version      1.1
// @description  Refresh the website for the theme to appear.
// @author       TrxrKnocks
// @grant 		 GM_xmlhttpRequest
// @grant 		 unsafeWindow
// @connect		 githubusercontent.com
// @connect		 github.com
// @connect		 pixmap.fun
// @match      *://pixmap.fun/*
// @namespace https://greasyfork.org/users/1293155
// ==/UserScript==

fetch('https://raw.githubusercontent.com/TouchedByDarkness/pixelplanet-void-style/main/style.css')
.then(res => res.text())
.then(css => {
	const ssv = unsafeWindow.ssv;
	const link = Array.from(document.querySelectorAll('link')).find(link => {
		const href = link.getAttribute('href');
		return (
			link.getAttribute('rel') === 'stylesheet' &&
			link.getAttribute('type') === 'text/css' &&
			href &&
			Object.values(ssv.availableStyles).some(path => href.includes(path)) &&
			!href.includes(ssv.availableStyles.default));
	});

	if(link) {
		link.parentNode.removeChild(link);
	}

	const style = document.createElement('style');
	style.innerHTML = css;
	document.head.appendChild(style);
});