FB2mbasic

重整網頁就轉成mbasic.FB,避免www.FB或m.FB不定時重整讓您丟失目前網頁問題。Reload webpage to switch mbasic.FB, in order to avoid intermittent updates on www.FB or m.FB that may cause you to lose your current webpage state.

  1. // ==UserScript==
  2. // @name FB2mbasic
  3. // @author Li_Bibo
  4. // @namespace https://greasyfork.org/zh-TW/scripts/474729
  5. // @description 重整網頁就轉成mbasic.FB,避免www.FB或m.FB不定時重整讓您丟失目前網頁問題。Reload webpage to switch mbasic.FB, in order to avoid intermittent updates on www.FB or m.FB that may cause you to lose your current webpage state.
  6. // @match *://www.facebook.com/*
  7. // @match *://m.facebook.com/*
  8. // @run-at document-start
  9. // @version 0.2.1.2
  10. // @license GNU GPLv3
  11. // ==/UserScript==
  12. var utm = location.href.match("//www.", "//m.")
  13. if (utm == null)
  14. {
  15. return
  16. }
  17. else
  18. {
  19. utm = location.href.replace("//www.", "//mbasic.");
  20. location.replace (utm);
  21. }
  22. var url = location.href.match("//mbasic.")
  23. if (url == null)
  24. {
  25. return
  26. }
  27. else
  28. {
  29. url = location.href.replace("//m.", "//mbasic.");
  30. location.replace (url);
  31. };