CSSreloader

That allows you to reload all the CSS files of any site or local HTML file without you have to reload the page itself. Just press F8.

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

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 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         CSSreloader
// @namespace    DuKaT
// @version      0.8
// @description  That allows you to reload all the CSS files of any site or local HTML file without you have to reload the page itself. Just press F8.
// @author       DuKaT
// @match        file:///*
// @match        http://*/*
// @match        https://*/*
// @grant        none
// ==/UserScript==

(function () {
	'use strict';

	const eventCode = 'F8';
	// @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode
	const keyCode = 119; // F8

	function reload() {
		const hrefSuffix = 'cssreloader=' + Date.now();

		document.querySelectorAll('link[rel="stylesheet"][href]').forEach((linkEl) => {
			const href = linkEl.href.replace(/[?&]cssreloader=\d+$/, '');
			linkEl.href = href + (href.indexOf('?') === -1 ? '?' : '&') + hrefSuffix;
		});
    }

	document.addEventListener('keyup', (evt) => {
		if (evt.code !== undefined) {
			if (evt.code === eventCode) {
				reload();
			}
		} else if (evt.keyCode === keyCode) {
			reload();
        }
	});

})();