巴哈姆特之訂閱看板跳過進板圖頁面

可以直接跳過進板圖頁面,不用再等進板圖載入啦。

  1. // ==UserScript==
  2. // @name 巴哈姆特之訂閱看板跳過進板圖頁面
  3. // @description 可以直接跳過進板圖頁面,不用再等進板圖載入啦。
  4. // @namespace nathan60107
  5. // @version 2.4
  6. // @author nathan60107(貝果)
  7. // @homepage https://home.gamer.com.tw/homeindex.php?owner=nathan60107
  8. // @include *gamer.com.tw/*
  9. // @exclude *ani.gamer.com.tw*
  10. // @icon https://www.google.com/s2/favicons?domain=gamer.com.tw
  11. // @run-at document-end
  12. // @grant none
  13. // @noframes
  14. // ==/UserScript==
  15.  
  16. function Insert(){
  17. if(jQuery("#topBarMsgList_forum")[0]){
  18. let target = jQuery("#topBarMsgList_forum")[0].innerHTML;
  19. target = target.replace(/A.php\?bsn=/g, "B.php?bsn=");
  20. jQuery("#topBarMsgList_forum")[0].innerHTML = target;
  21. }else{
  22. setTimeout(function(){Insert();}, 500);
  23. }
  24. };
  25.  
  26. jQuery("#topBar_forum").on("click", Insert)