巴哈姆特之手機版網頁自動轉跳電腦版

自動切換成電腦版,省去手動切換的麻煩。

  1. // ==UserScript==
  2. // @name 巴哈姆特之手機版網頁自動轉跳電腦版
  3. // @description 自動切換成電腦版,省去手動切換的麻煩。
  4. // @namespace nathan60107
  5. // @version 1.2
  6. // @author nathan60107(貝果)
  7. // @homepage https://home.gamer.com.tw/homeindex.php?owner=nathan60107
  8. // @include *//m.gamer.com.tw*
  9. // @icon https://www.google.com/s2/favicons?domain=gamer.com.tw
  10. // @grant none
  11. // @run-at document-end
  12. // @noframes
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. var target = document.getElementsByClassName("gtm-nav-backpc");
  17. console.log(target)
  18. if(target != null){
  19. var dest = target[0].href;
  20. window.location.href = dest;
  21. }
  22. })();