CSSreloader

That allows you to reload all the CSS of any site without you have to reload the page itself.

Stan na 26-03-2018. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         CSSreloader
// @namespace    DuKaT
// @version      0.3
// @description  That allows you to reload all the CSS of any site without you have to reload the page itself.
// @author       DuKaT
// @include      http://*/*
// @include      https://*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

	var CSSreloader = function() {

		function reload() {
			const reloader = 'cssReloader=' + Date.now();
			let elements = document.querySelectorAll('link[rel="stylesheet"][href]'),
				elementsLen = elements.length,
				i, element, href;
			for (i = 0; i < elementsLen; ++i) {
				element = elements[i];
				href = element.href.replace(/[\?\&]cssReloader=\d+$/, '');
				element.href = href + (href.indexOf('?') === -1 ? '?' : '&') + reloader;
			}
		}

		return { reload };

	}();

	document.addEventListener('keyup', (e) => {
		if (e.keyCode === 120) { // keyCode === 120 is F9
			CSSreloader.reload();
		}
	});

})();