Codeskulptor AddOn

If the first lines of code have the comment #title=New Title, the page title is renamed to New Title. If the comment is #autorun, the code is automatically run.

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         Codeskulptor AddOn
// @namespace    https://greasyfork.org/users/4756
// @author       saibotshamtul (Michael Cimino)
// @version      0.3.3
// @description  If the first lines of code have the comment #title=New Title, the page title is renamed to New Title. If the comment is #autorun, the code is automatically run.
// @match        http://www.codeskulptor.org/*
// @copyright    2012+, Saibotshamtul
// @grant        none
// ==/UserScript==
// previous version available at http://userscripts-mirror.org/scripts/source/179891.user.js

function ParseCode(){
   	for (z=1;z<4;z++) {
        t = document.querySelector(".CodeMirror-code div:nth-child("+z+") pre span span").innerHTML;
    	if (t.substring(0,7)=="#title=") {
        	document.title=t.substring(7,t.length);
    	}
    	if (t.substring(0,8)=="#autorun"){
        	document.querySelector("#run").click()
	    }
	}
    delete t
    delete z
}

window.setTimeout(ParseCode,1000);