Greasemonkey - 删除 div class(绝对初学者)
Greasemonkey - removing div class(absolute beginner)
有人告诉我,如果我想要更改特定 link 的提示,我应该在这里询问。我已经查看了一些主题,但我无法使那里的建议对我有用。
我想删除:<div class="validation_ticker">
及其中的所有内容(代码框中的所有代码):
<div class="validation_ticker">
<div class="validation_ticker_align">
<div class="validation_ticker_icon"></div>
<div class="validation_ticker_msg" style="line-height:1.1em">
Is <a href="/account/editprofile">mymail@gmail.com</a> still your email address? Please <form action="/account/revalidate_email" method="post" id="revalidate_email" style="display: inline; margin: 0; padding: 0;"><button style="display: inline; border: 0; border-style: none; background: none repeat scroll 0 0 transparent; background-image: none; margin: 0; padding: 0; line-height: normal; list-style: none outside none; text-decoration: none; width: auto; height: auto; font-size: 13px; color: #ffff00" type="submit" value="click here">click here</button></form> to re-validate your account or <a href="/account/editprofile">change your address</a>.<br>
Not seeing email? Check your SPAM folder and mark as "NOT SPAM"!
<script type="text/javascript">
jQuery(function($) {
$('#revalidate_email').submit(function() {
$(this).ajaxSubmit(true);
return false;
});
});
它是屏幕顶部的验证横幅。该站点需要定期进行电子邮件验证,但我不太喜欢,我也经常将其误认为是网络钓鱼。
EDIT2:代码更新到工作版本
这是我根据 Ashkan 的建议得出的结论:
// ==UserScript==
// @name Script Name
// @namespace namespace
// @include http://www.X.com/
// @version 1
// @grant none
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// ==/UserScript==
$('.validation_ticker').remove();
感谢所有回答的人。
确保在脚本顶部将 jQuery 添加到您的脚本中:
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
使用jQueryremove
函数:
$('.validation_ticker').remove();
CSS 示例:
.validation_ticker {visibility: hidden; }
有人告诉我,如果我想要更改特定 link 的提示,我应该在这里询问。我已经查看了一些主题,但我无法使那里的建议对我有用。
我想删除:<div class="validation_ticker">
及其中的所有内容(代码框中的所有代码):
<div class="validation_ticker">
<div class="validation_ticker_align">
<div class="validation_ticker_icon"></div>
<div class="validation_ticker_msg" style="line-height:1.1em">
Is <a href="/account/editprofile">mymail@gmail.com</a> still your email address? Please <form action="/account/revalidate_email" method="post" id="revalidate_email" style="display: inline; margin: 0; padding: 0;"><button style="display: inline; border: 0; border-style: none; background: none repeat scroll 0 0 transparent; background-image: none; margin: 0; padding: 0; line-height: normal; list-style: none outside none; text-decoration: none; width: auto; height: auto; font-size: 13px; color: #ffff00" type="submit" value="click here">click here</button></form> to re-validate your account or <a href="/account/editprofile">change your address</a>.<br>
Not seeing email? Check your SPAM folder and mark as "NOT SPAM"!
<script type="text/javascript">
jQuery(function($) {
$('#revalidate_email').submit(function() {
$(this).ajaxSubmit(true);
return false;
});
});
它是屏幕顶部的验证横幅。该站点需要定期进行电子邮件验证,但我不太喜欢,我也经常将其误认为是网络钓鱼。
EDIT2:代码更新到工作版本
这是我根据 Ashkan 的建议得出的结论:
// ==UserScript==
// @name Script Name
// @namespace namespace
// @include http://www.X.com/
// @version 1
// @grant none
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// ==/UserScript==
$('.validation_ticker').remove();
感谢所有回答的人。
确保在脚本顶部将 jQuery 添加到您的脚本中:
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
使用jQueryremove
函数:
$('.validation_ticker').remove();
CSS 示例:
.validation_ticker {visibility: hidden; }