tsdm no Popups

天使动漫论坛签到点击表情防弹窗处理

目前为 2017-02-27 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name tsdm no Popups
  3. // @author Ted423
  4. // @description 天使动漫论坛签到点击表情防弹窗处理
  5. // @namespace https://gf.qytechs.cn/users/85
  6. // @include http://www.tsdm.net/*
  7. // @include http://www.tsdm.me/*
  8. // @version 1.5
  9. // @grant none
  10. // ==/UserScript==
  11. var temp=document.getElementById("inner_stat");
  12. if(temp!=null){temp=temp.childNodes;
  13. for(i=0;i<temp.length;i++)
  14. {
  15. if(temp[i].href==="javascript:;")
  16. temp=temp[i]
  17. }
  18. temp.childNodes[0].textContent="签到";
  19. }
  20. else temp =document.getElementsByTagName("font")[0];
  21. temp.textContent="签到";
  22. temp.onclick = function(){
  23. if(window.navigator.userAgent.indexOf("Chrome")===-1){
  24. var temp2;
  25. temp1=temp.attributes;
  26. for(i=0;i<temp1.length;i++)
  27. if(temp1[i].value.indexOf("showWindow")!=-1){
  28. console.log(i);
  29. console.log(temp1[i].value);
  30. temp2=temp1[i].value;
  31. break;
  32. }
  33. eval(temp2);
  34. }
  35. var callback = function(records){
  36. records.map(function(record){
  37. if((record.target.id==='fwin_content_dsu_paulsign')&&(record.target.nextElementSibling)){
  38. var script = document.createElement('script');
  39. script.type = 'text/javascript';
  40. fn="function openTsRecommend(sId){};";
  41. script.textContent = fn.toString();
  42.  
  43. var de = document.documentElement;
  44. de.appendChild(script);
  45. Icon_selected("ng");
  46. mo.disconnect();
  47. }
  48. });
  49. };
  50.  
  51. var mo = new MutationObserver(callback);
  52.  
  53. var option = {
  54. 'childList': true,
  55. 'subtree': true,
  56. 'characterData' : true
  57. };
  58. var element = document.getElementById("fwin_content_dsu_paulsign");
  59. mo.observe(document.body, option);
  60.  
  61. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址