Source Viewer

View Page Source of any Website.

Від 30.10.2020. Дивіться остання версія.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(У мене вже є менеджер скриптів, дайте мені встановити його!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @version 6.7.2.3
// @name Source Viewer
// @name:de Seitenquelltext anzeiger
// @description  View Page Source of any Website.
// @description:de Schauen Sie sich den Seitenquelltext von jeder beliebigen Website an.
// @author wack.3gp
// @copyright 2019+ , wack.3gp (https://greasyfork.org/users/4792)
// @grant unsafeWindow
// @grant GM_registerMenuCommand
// @noframes
// @include *
// @license CC BY-NC-ND 4.0; http://creativecommons.org/licenses/by-nc-nd/4.0/
// @namespace https://greasyfork.org/users/4792
// @supportURL https://greasyfork.org/scripts/4611/feedback
// @compatible Chrome tested with Tampermonkey
// @contributionURL https://www.paypal.com/donate?hosted_button_id=9JEGCDFJJHWU8
// @contributionAmount €1.00
// ==/UserScript==

GM_registerMenuCommand("view-source:"+window.location, function () {
    var source = "<html>";
    source += document.getElementsByTagName('html')[0].innerHTML;
    source += "</html>";
    source = source.replace(/</g, "&lt;").replace(/>/g, "&gt;");
    source = "<pre>" + source + "</pre>";
    var sourceWindow = window.open();
    sourceWindow.document.write(source);
    sourceWindow.document.close();
    if (window.focus) sourceWindow.focus();
});
// ==============