TrocaHTTPporHTTPS

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

当前为 2014-06-06 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name TrocaHTTPporHTTPS
  3. // @namespace http://userscripts.org/scripts/show/77703
  4. // @description [PT] Troca o protocolo 'http' por 'https' (seguro) para TODOS os sites (se este nao tiver uma versao segura, causa erro)
  5. // @include http://*
  6. // @version 0.0.1.20140522230639
  7. // ==/UserScript==
  8.  
  9. (function() {
  10. var url = window.location.href;
  11.  
  12. if (url.indexOf("http:")==0) {
  13. window.location.replace(location.href.replace(location.protocol, "https:"));
  14. }
  15.  
  16. if (url.indexOf("https:")==0) {
  17. for (var i=0,link; (link=document.links[i]); i++) {
  18. if (link.href.indexOf("http:")==0) link.href = link.href.replace(location.protocol, "https:");
  19. }
  20. }
  21.  
  22. }
  23. )();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址