Simple HTTPS Anywhere

自动强制安全链接!

  1. // ==UserScript==
  2. // @name Simple HTTPS Anywhere
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1.0
  5. // @description try to take over the world!
  6. // @description:zh-CN 自动强制安全链接!
  7. // @author Gear
  8. // @match http://*/*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. if(window.location.href.replaceAll('http://','https://')!=window.location.href)
  15. window.location.href = window.location.href.replaceAll('http://','https://');
  16. // Your code here...
  17. })();