토론 » 개발

How to remove tag by tag content?

§
게시: 2015-01-08
수정: 2015-01-08

How to remove tag by tag content?

I was trying to make a script that will delete a widget social networking from all sites, but my script does not work.
Here's the code to be deleted:


§
게시: 2015-01-08

This will work if run in a loop several times
I tried to use this script:

$(function() {
$('script').each(function() {
var curreScriptTagCode = $(this).html()
if (curreScriptTagCode.indexOf("vk_group") != -1) {
$(this).remove()
}
});
});

But for some reason it does not work

woxxom관리자
§
게시: 2015-01-09

@anlima, if it's a userscript then it must have a metablock header where you add a reference for jQueery, something liek this // @require http://code.jquery.com/jquery-latest.js

답글 게시

답글을 게시하려면 로그인하세요.

长期地址
遇到问题?请前往 GitHub 提 Issues。