Greasemonkey, delete element

后端 未结 2 1393
不知归路
不知归路 2021-01-27 07:57

I have this Greasemonkey script, I originally wanted to get all the

elements and search through those for but I couldn\'t get that to work. So I tri
2条回答
  •  礼貌的吻别
    2021-01-27 08:56

    try using getAttribute instead of directly accessing the property href:

    if ( results[i].getAttribute("href").indexOf("http://www.unwantedsites.com") == 0 ) {
    

提交回复
热议问题