Home  >  Article  >  Web Front-end  >  在百度知道团队中快速审批新成员的js脚本_javascript技巧

在百度知道团队中快速审批新成员的js脚本_javascript技巧

WBOY
WBOYOriginal
2016-05-16 17:01:43910browse

本人热衷于解答网友的技术类问题,于是在百度知道栏目创办了“挨踢五四三”团队。
自团队创办以来,每天都有大量网友申请加入我的团队,于是审核团队新成员成了一个费力气的活儿。

在此情况下,我写了个脚本,自动计算他们的回答采纳率,采纳率低于20%的自动打勾 选中,等级太低的人也自动打勾选中。
然后只要点击一下“拒绝”按钮就可以了。

使用方法:

进入“审批新成员”的页面,再按住键盘上的shift键 并点击“审批新成员”选项卡,这样可以使新成员列表在新窗口中打开。
打开后,把下面脚本复制到浏览器地址栏,按一下回车键,即可自动勾选不合格人员,你只要点一下“拒绝”按钮就行了。
再用同样的方法审批第2页,第3页……

javascript:for(var x=1;x1*document.forms[0].getElementsByTagName("tr")[x].getElementsByTagName("td")[2].innerText/document.forms[0].getElementsByTagName("tr")[x].getElementsByTagName("td")[3].innerText)document.forms[0].getElementsByTagName("tr")[x].getElementsByTagName("input")[0].checked=true;void 0;}alert("采纳率低于20\%的都选中了")

百度知道改版了,要用如下新脚本:

javascript:for(var x=1;xdocument.forms[0].getElementsByTagName("tr")[x].getElementsByTagName("td")[2].innerText || 0.20>1*document.forms[0].getElementsByTagName("tr")[x].getElementsByTagName("td")[4].innerText/document.forms[0].getElementsByTagName("tr")[x].getElementsByTagName("td")[5].innerText)document.forms[0].getElementsByTagName("tr")[x].getElementsByTagName("input")[0].checked=true;void 0;}alert("采纳率低于20\%的都选中了")

注意,脚本不能分行,全部内容是在同一行的,这样才能被浏览器地址栏执行。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn