Error in code. "contains"
contains()
is a jQuery selector so it doesn't work in standard DOM method like querySelector.
You need to include jquery.js in your usercsript metablock (example) and switch to $
function:
location = $("A.zmW.tdNone[href*='battle']:contains('LinkName')").attr("href")
Tell me, please, how to include jquery.js
See the linked example in my post above.
Error in code. "contains"
document.location = document.querySelector("A.zmW.tdNone[href*='battle']:contains('LinkName')").href;
This code isnt work, but this work
document.location = document.querySelector("A.zmW.tdNone[href*='battle']").href;
how to use to work together with
:contains('LinkName')
where is the mistake? Tell me please. If that I'm a novice and do not understand much. Thank you in advance for your help!