I have this code I want to execute it should open any links with the phrase "/ThisWord/" in it
// ==UserScript==
// @name Test
// @namespace Test
// @description Test
// @version 1
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// @grant none
// @include http://website.com/
// ==/UserScript==
setTimeout(testLinks, 10000);
function testLinks() {
var UseThisone = $("a:contains('/profile/')");
GM_openInTab(UseThisone[0].href);
}
I just wrappedd the whole thing with a timeout, but i cant get any links to open
Does the above code even work? I can't seem to get it to open the urls let alone in a new tab
One more thing, I would want it to open each Url in 10 second intervals, is that possible?
Thanks for the help!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…