TrocaHTTPporHTTPS

[PT] Troca o protocolo 'http' por 'https' (seguro) para TODOS os sites (se este nao tiver uma versao segura, causa erro)

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name           TrocaHTTPporHTTPS
// @namespace      http://userscripts.org/scripts/show/77703
// @author         RASG
// @description    [PT] Troca o protocolo 'http' por 'https' (seguro) para TODOS os sites (se este nao tiver uma versao segura, causa erro)
// @include        http://*
// @version        2012.01.01
// ==/UserScript==

(function() {
    var url = window.location.href;

    if (url.indexOf("http:")==0) {
        window.location.replace(location.href.replace(location.protocol, "https:"));
    }

    if (url.indexOf("https:")==0) {
        for (var i=0,link; (link=document.links[i]); i++) {
            if (link.href.indexOf("http:")==0) link.href = link.href.replace(location.protocol, "https:");
        }
    }

}
)();