贴吧查水表

查看百度贴吧某用户名在全网的发言

  1. // ==UserScript==
  2. // @name 贴吧查水表
  3. // @namespace www.tjsky.net
  4. // @include http://tieba.baidu.com/p/*
  5. // @include http://tieba.baidu.com/f?ct*
  6. // @include https://tieba.baidu.com/p/*
  7. // @include https://tieba.baidu.com/f?ct*
  8. // @version 1.5
  9. // @run-at document-end
  10. // @description 查看百度贴吧某用户名在全网的发言
  11. // ==/UserScript==
  12. var $ = unsafeWindow.$;
  13.  
  14. function getUserHistoryB(e){
  15. var userName = (JSON.parse(e.target.getAttribute('data'))).un;
  16. window.open("https://www.baidu.com/s?wd=\"" + encodeURIComponent(userName) + "\" site:tieba.baidu.com");
  17. }
  18. function getUserHistoryG(e){
  19. var userName = (JSON.parse(e.target.getAttribute('data'))).un;
  20. window.open("https://www.google.com/search?q=\"" + encodeURIComponent(userName) + "\" site:tieba.baidu.com&safe=off&hl=zh-CN&lr=lang_zh-CN");
  21. }
  22. function getUserHistoryM(e){
  23. var userName = (JSON.parse(e.target.getAttribute('data'))).un;
  24. window.open("https://www.bing.com/search?q=\"" + encodeURIComponent(userName) + "\" site:tieba.baidu.com&safe=off&hl=zh-CN&lr=lang_zh-CN");
  25. }
  26.  
  27.  
  28. (function addBtn(){
  29. $('.d_author .p_author').each(function(){
  30. var data = this.querySelector('.p_author_name').getAttribute('data-field');
  31. $(this).append('<li class="user_post_list" style="margin-top:4px"><a style="cursor: pointer;color:#FF6600;" data='+data+'>百度全网发言</a></li>')
  32. $(this).append('<li class="user_post_list" style="margin-top:4px"><a style="cursor: pointer;color:#FF6600;" data='+data+'>谷歌全网发言</a></li>')
  33. $(this).append('<li class="user_post_list" style="margin-top:4px"><a style="cursor: pointer;color:#FF6600;" data='+data+'>必应全网发言</a></li>')
  34. this.querySelectorAll('.user_post_list a')[0].addEventListener('click',getUserHistoryB)
  35. this.querySelectorAll('.user_post_list a')[1].addEventListener('click',getUserHistoryG)
  36. this.querySelectorAll('.user_post_list a')[2].addEventListener('click',getUserHistoryM)
  37. });
  38. })();

QingJ © 2025

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