0
以下是我需要做的事情。我正在使用Google Chrome。我有一页使用脚本每5秒自动重新加载一次:以各种时间间隔自动加载特定链接
javascript: timeout=prompt("Set timeout [s]");
current=location.href;
if(timeout>0)
setTimeout('reload()',1000*timeout);
else
location.replace(current);
function reload()
{
setTimeout('reload()',1000*timeout);
fr4me='<frameset cols=\'*\'>\n<frame src=\''+current+'\'/>'; fr4me+='</frameset>';
with(document){write(fr4me);void(close())};
}
我发现该脚本通过谷歌搜索。
页面每5秒自动重新加载的原因是我等待一个特定的链接或网址出现在页面中。它随机出现。一旦我看到我正在等待的链接,我立即点击链接。没关系。
但我想要更多。我想要的是该页面将自动重新加载,我希望它能够自动检测我正在等待的链接。一旦脚本找到我正在等待的链接,它会自动在新标签或页面上加载该链接。
例如,我正在自动重新加载www.example.com。我正在等待一个特定的网址“立即购买”。当页面自动重新加载时,它会检查是否有网址“立即购买”。如果它看到一个,它应该自动打开该链接。
谢谢。