Example UserScript

An example script with a proper license

Stan na 06-11-2024. 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         Example UserScript
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  An example script with a proper license
// @author       Your Name
// @match        https://www.example.com/*
// @grant        none
// @license      MIT
// ==/UserScript==

// ==UserScript==
// @name         Example UserScript
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  An example script using @match annotation
// @author       You
// @match        https://www.example.com/*
// @match        https://anotherwebsite.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // This code will run on pages that match the above @match URLs

    console.log("Hello, world! This script is running on:", window.location.href);

    // Example action: Change background color of the page
    document.body.style.backgroundColor = "lightblue";
})();

// ==UserScript==
// @name         Example UserScript with @include
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  An example script using @include annotation
// @author       You
// @include      https://www.example.com/*
// @include      https://anotherwebsite.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // This code will run on pages that match the above @include URLs

    console.log("Hello, world! This script is running on:", window.location.href);

    // Example action: Change background color of the page
    document.body.style.backgroundColor = "lightgreen";
})();