Fanfiction.net: Redirect to Desktop Site

Redirect from moblie site to desktop site.

  1. // ==UserScript==
  2. // @name Fanfiction.net: Redirect to Desktop Site
  3. // @namespace https://greasyfork.org/en/users/163551-vannius
  4. // @version 1.2
  5. // @license MIT
  6. // @description Redirect from moblie site to desktop site.
  7. // @author Vannius
  8. // @match https://m.fanfiction.net/*
  9. // @match https://www.fanfiction.net/*
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. // config
  14. const REVERSE = false;
  15.  
  16. if (window.location.origin === 'https://www.fanfiction.net' && REVERSE) {
  17. console.log('https://m.fanfiction.net' + window.location.pathname)
  18. window.location.href = 'https://m.fanfiction.net' + window.location.pathname;
  19. } else if (window.location.origin === 'https://m.fanfiction.net' && !REVERSE) {
  20. console.log('https://www.fanfiction.net' + window.location.pathname)
  21. window.location.href = 'https://www.fanfiction.net' + window.location.pathname;
  22. }
  23. })();