reddit.com - Ensure 'old.reddit.com' URL.

Always redirect to 'old.reddit.com'.

当前为 2022-01-01 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name reddit.com - Ensure 'old.reddit.com' URL.
  3. // @namespace a-pav
  4. // @description Always redirect to 'old.reddit.com'.
  5. // @match *://*.reddit.com/*
  6. // @match *://reddit.com/*
  7. // @version 0.1
  8. // @run-at document-start
  9. // @author a-pav
  10. // @grant none
  11. // @icon https://www.redditstatic.com/desktop2x/img/favicon/apple-icon-76x76.png
  12. // ==/UserScript==
  13.  
  14. if(window.location.hostname === "old.reddit.com" ) { // already on old.reddit.com
  15. // script matches any reddit.com url, including 'old.reddit.com'.
  16. // this gives the option for quick enabling/disabling through script manager's icon, anywhere on reddit, wether using new or old design.
  17. return
  18. }
  19.  
  20. window.location.replace("https://old.reddit.com" + window.location.pathname + window.location.search + window.location.hash);