admin管理员组

文章数量:1296884

I've been told that if I want tips to alterations of a specific link I should ask here. I've already viewed a few topics, but I couldn't make the suggestions there work for me.

I wish to remove: <div class="validation_ticker"> and everything within it(all the code in the code box):

<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">[email protected]</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;
        });
   });

It is a verification banner at the top of the screen. The site wants E-mail verification regularly, but I'm not too keen on that, I often mistake it for phishing too.

EDIT2: Code updated to working version

This is what I've e up with from the advise I was given by Ashkan:

// ==UserScript==
// @name        Script Name
// @namespace   namespace
// @include     /
// @version     1
// @grant       none
// @require .9.1/jquery.min.js
// ==/UserScript==
$('.validation_ticker').remove();

Thanks to everyone who answered.

I've been told that if I want tips to alterations of a specific link I should ask here. I've already viewed a few topics, but I couldn't make the suggestions there work for me.

I wish to remove: <div class="validation_ticker"> and everything within it(all the code in the code box):

<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">[email protected]</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;
        });
   });

It is a verification banner at the top of the screen. The site wants E-mail verification regularly, but I'm not too keen on that, I often mistake it for phishing too.

EDIT2: Code updated to working version

This is what I've e up with from the advise I was given by Ashkan:

// ==UserScript==
// @name        Script Name
// @namespace   namespace
// @include     http://www.X./
// @version     1
// @grant       none
// @require http://ajax.googleapis./ajax/libs/jquery/1.9.1/jquery.min.js
// ==/UserScript==
$('.validation_ticker').remove();

Thanks to everyone who answered.

Share Improve this question edited Oct 22, 2018 at 19:16 Ashkan Mobayen Khiabani 34.2k35 gold badges111 silver badges184 bronze badges asked Jul 20, 2016 at 19:58 AtotehZAtotehZ 431 gold badge1 silver badge4 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 5

Make sure that jQuery is added to your script at the top of the script:

// @require http://ajax.googleapis./ajax/libs/jquery/1.9.1/jquery.min.js

Use the jQuery remove function:

$('.validation_ticker').remove();

CSS example: .validation_ticker {visibility: hidden; }

本文标签: javascriptGreasemonkeyremoving div class(absolute beginner)Stack Overflow