HTTP-to-HTTPS redirector

Replace http:// with https:// in the address bar, to make sure you're using the SSL-encrypted version of a page. Only enable for pages that you know are SSL enabled.

  1. // HTTP-to-HTTPS redirector script
  2. //
  3. // WARNING: Enable *only* sites and pages you *know* work the same
  4. // with or without SSL! Failure to comply *will* cause b0rkage.
  5. // (Okay, if you know what you're doing, you also know this isn't
  6. // necessarily true, but then this warning isn't for you anyway.)
  7. //
  8. // ==UserScript==
  9. // @name HTTP-to-HTTPS redirector
  10. // @namespace http://freso.dk/
  11. // @description Replace http:// with https:// in the address bar, to make sure you're using the SSL-encrypted version of a page. Only enable for pages that you know are SSL enabled.
  12. // @copyright 2006+, Frederik "Freso" S. Olesen (http://freso.dk/)
  13. // @license Creative Commons Attribution 3.0; http://creativecommons.org/licenses/by/3.0/
  14. // @include http://facebook.com/*
  15. // @include http://www.facebook.com/*
  16. // @include http://twitter.com/*
  17. // @include http://myspace.com/*
  18. // @include http://www.myspace.com/*
  19. // @include http://www.youtube.com/*
  20. // @include http://www.blogger.com/*
  21. // @include http://*.google.com/*
  22. // @include http://login.yahoo.com/*
  23. // @include http://registration.excite.com/*
  24. // @include http://login.passport.net/uilogin.srf*
  25. // @include http://mail2web.com/*
  26. // @include http://www.mail2web.com/*
  27. // @include http://fastmail.fm/*
  28. // @include http://www.fastmail.fm/*
  29. // @include http://sourceforge.net/*
  30. // @include http://bugs.gentoo.org/*
  31. // @include http://forums.gentoo.org/*
  32. // @include http://bugs.kde.org/*
  33. // @include http://drupal.org/*
  34. // @include http://archlinux.org/*
  35. // @include http://*.archlinux.org/*
  36. // @include http://duckduckgo.com/*
  37. // @include http://www.microsoft.com/*
  38. // @include http://userscripts.org/*
  39. // @include http://fronter.com/*
  40. // @include http://musicbrainz.org/*
  41. // @include http://beta.musicbrainz.org/*
  42. // @include http://test.musicbrainz.org/*
  43. // @include http://wiki.musicbrainz.org/*
  44. // @include http://*.wikipedia.org/*
  45. // @include http://*.wikimedia.org/*
  46. // @include http://*.wikispecies.org/*
  47. // @include http://*.mediawiki.org/*
  48. // @include http://*.wikinews.org/*
  49. // @include http://*.wikisource.org/*
  50. // @include http://*.wikibooks.org/*
  51. // @include http://*.wikiversity.org/*
  52. // @include http://*.wikiquote.org/*
  53. // @include http://*.wikidata.org/*
  54. // @include http://*.wiktionary.org/*
  55. // @include http://*.wikimediafoundation/*
  56. // @exclude https://*
  57. // @exclude http://mail.google.com/mail/?view=mm&at=*
  58. // @exclude http://translate.google.com/*
  59. // @exclude http://list.wikimedia.org/*
  60. // @exclude http://*musicbrainz.org/release/add*
  61. // @exclude http://*musicbrainz.org/ws/*
  62. // @version 0.0.1.20140524095724
  63. // ==/UserScript==
  64. (function(){
  65. var debug = 0;
  66. var new_location = location.href.replace(/http\:/, 'https:');
  67. if ( debug > 0 ) {
  68. alert( "Hash: "+location.hash+
  69. "\nHost: "+location.host+
  70. "\nHostname: "+location.hostname+
  71. "\nHREF: "+location.href+
  72. "\nPathname: "+location.pathname+
  73. "\nPort: "+location.port+
  74. "\nProtocol: "+location.protocol+
  75. "\n"+
  76. "\nNew Location: "+new_location);
  77. };
  78. location.href = new_location;
  79. })();

QingJ © 2025

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