htmlsp_to_html

Replace 'html?sp' to 'html'

  1. // ==UserScript==
  2. // @name htmlsp_to_html
  3. // @namespace http://catherine.v0cyc1pp.com/htmlsp_to_html.user.js
  4. // @include *?sp*
  5. // @exclude *.html$
  6. // @run-at document-start
  7. // @author greg10
  8. // @license GPL 3.0
  9. // @version 1.1
  10. // @require http://code.jquery.com/jquery-3.1.1.min.js
  11. // @grant none
  12. // @description Replace 'html?sp' to 'html'
  13. // ==/UserScript==
  14.  
  15.  
  16. var str = document.location + "";
  17.  
  18. var newstr = str.replace( /\.html\?sp.*$/, ".html");
  19.  
  20. if ( newstr === str ) return;
  21.  
  22. window.location.replace( newstr );
  23.  
  24.