bgm.tv redirect to https

班固米既没有 rewrite 也没有 hsts,只有自己跳了

  1. // ==UserScript==
  2. // @name bgm.tv redirect to https
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2
  5. // @description 班固米既没有 rewrite 也没有 hsts,只有自己跳了
  6. // @author Nyan Kusanagi <gnwzkd@gmail.com>
  7. // @match http://bgm.tv/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function(window) {
  12. 'use strict';
  13.  
  14. // Your code here...
  15. if ('http:' === window.location.protocol) window.location.protocol = 'https:';
  16. })(window);