如果页面在代码中具有此元素,则TAMPERMONKEY脚本将关闭选项卡
我有一个带有列的页面,如果第一列具有此src =“ imgs/newmail.gif”,则需要关闭选项卡
I have a page with columns and I need to close the tab if the first column has this src="imgs/newmail.gif"
I will send you a screenshot of part of the code.<tr> <td align="center" bgcolor="#FFFFFF">1</td> <td bgcolor="#FFFFFF" align="center"> <img src="imgs/newmail.gif" border="0"> </td>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
@vlad您没有给我们太多使用的工作,并且以下脚本未经测试,但请尝试以此作为起点:
您将需要更改
// match
line,并且您可能有调整观察正确图像标签的行。给我们更多信息,我们可以尝试为您进行更多调整。
PS-上面的代码不是jQuery-仔细查看。
参考:
https://www.tampermonkey.net/documentation.php#_grant
@Vlad you haven't given us much to work with, and the below script is untested, but try this as a starting point:
You will need to change the
//match
line, and you might have to tweak the line that watches for the correct image tag.Give us more information and we can try to tweak it a little more for you.
PS - The above code is not jQuery - look carefully.
Reference:
https://www.tampermonkey.net/documentation.php#_grant