Advertisement
Guest User

Untitled

a guest
Feb 28th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name     Redirect to Not Stupid Status because Twitter SUCKS
  3. // @match    *.twitter.com/*/status/*
  4. // @run-at   document-start
  5. // @grant    none
  6. // ==/UserScript==
  7.  
  8. //-- Only redirect if the *path* ends in .html...
  9. if (/\?s=20$/.test (location.search) ) {
  10.     var newHost     = location.host
  11.     var newSearch   = location.search.replace (/\?s=20$/, "");
  12.     var newURL      = location.protocol + "//" +
  13.         newHost                  +
  14.         location.pathname        +
  15.         newSearch                +
  16.         location.hash
  17.     ;
  18.     console.log(newURL);
  19.     location.replace (newURL);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement