Source Viewer

View Source Code of any homepage

Stan na 10-09-2015. 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	Source Viewer
// @namespace	http://scriptz.de.to/
// @description	View Source Code of any homepage
// @include	http://*/*
// @include	https://*/*
// @version	6.4
// @icon	http://www.chip.de/ii/8/8/3/8/0/6/0/99e7dc2dba159b09.jpg
// @icon64	http://www.chip.de/ii/8/8/3/8/0/6/0/99e7dc2dba159b09.jpg
// @author	Scriptz
// @grant   GM_addStyle
// @copyright	2013+ , Scriptz
// ==/UserScript==

GM_addStyle("#viewthesource{border: solid 1px black;position: fixed;right: 0;left: 0;bottom: 0px;background-color: #9E9E9E;z-index: 9999;height: 33px;width: 130px;margin: auto;}")

// ==Profile==
	unsafeWindow.viewthesource = function(){
    window.location="view-source:"+window.location
}
// ==============

// ==Body==
body = document.body;
if(body != null) {
	div2 = document.createElement("div");
	div2.setAttribute('id','viewthesource');
	div2.innerHTML = "<center><img alt='Hide' src='http://fs2.directupload.net/images/150909/sxcclyoz.png' onclick='javascript:hide()'></center>\n<a href='javascript:viewthesource()' onclick='javascript:viewthesource()'>Click to view source!</a> "
	body.appendChild(div2);
}
// ==============

// ==Hide/Show==
	unsafeWindow.hide = function(){
	var a = new Date();
	a = new Date(a.getTime() +1000*60*60*24*365);
	document.cookie = 'sourcefunction=hide; path=/; expires='+a.toGMTString()+';';
}
	if (document.cookie.indexOf("sourcefunction=hide") >= 0) {
    GM_addStyle("#viewthesource{border: solid 1px black;position: fixed;right: 0;left: 0;bottom: 0px;background-color: #9E9E9E;z-index: 9999;height: 15px;width: 45px;margin: auto;}")
    document.getElementById("viewthesource").innerHTML = "<center><img alt='Show' src='http://fs2.directupload.net/images/150909/7tae9l8k.png' onclick='javascript:show()'></center>";
}
	unsafeWindow.show = function(){
    document.cookie = 'sourcefunction=hide; path=/; expires=Thu, 01-Jan-70 00:00:01 GMT;';
}
// ==============