Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8816471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:37:46+00:00 2026-06-14T04:37:46+00:00

I have a greasemonkey script to run in a specific website. The objective is

  • 0

I have a greasemonkey script to run in a specific website.
The objective is make click in a specific button,
remove the cookie (Tthe website sets the cookie on click, i have to remove the cookie before to make the new click, but the trouble is the cookie is not sets with jquery click
)
then reload the page.
And repeat the process.

But, jquery click method don’t sets the cookie but the human click yes

here is the code:

// ==UserScript==
// @name        name
// @namespace   someName
// @include     http://www.example.com/*
// @version     0.1
// @grant       all
// @require     http://code.jquery.com/jquery-1.8.2.min.js
// ==/UserScript==


function del_cookie(name) {
    document.cookie = name +
    '=; expires=Thu, 01-Jan-70 00:00:01 GMT;path=/;';
} 


function fnc(){

 try{
   $("#elemenID").click();
   del_cookie("elemID");
   location.reload();
  }catch(e){
        alert(e.toString());
   }
}


$(document).ready(function(){

    window.setTimeout(fnc, 10000);   

})
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T04:37:47+00:00Added an answer on June 14, 2026 at 4:37 am

    I have solved this, and the problem was the time factor.
    here is the final greasemonkey script.

    // ==UserScript==
    // @name        name
    // @namespace   someName
    // @include     http://www.example.com/*
    // @version     0.1
    // @grant       all
    // @require     http://code.jquery.com/jquery-1.8.2.min.js
    // ==/UserScript==
    
    function del_cookie(name) {
                document.cookie = name +
                '=; expires=Thu, 01-Jan-70 00:00:01 GMT;path=/;';
      } 
    
    
    function fnc(){
     $("#id").click();
    }
    
    function fnc2(){
     del_cookie("cookieID");
    }
    
    function fnc3(){
        location.reload();
    }
    
    $(function(){
    
    
            window.setTimeout(fnc2, 10000);   
            window.setTimeout(fnc, 20000);   
            window.setTimeout(fnc3, 30000);
    })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So, I have GreaseMonkey Script that does some operations with integers and then sets
I have a basic greasemonkey script shown below, in which I want to run
Is it possible to have Greasemonkey scripts run before anything else on the page?
I have my greasemonkey script scanning every page i visit for a specific string.
I have created a greasemonkey script for the purpose of: Add print receipt button
I have a Greasemonkey script that dynamically inserts an HTML form into some web
I have created a Greasemonkey script that runs fine in the firebug editor, with
I'm building a greasemonkey script to make posting to craigslist a lot easier for
I have a simple greasemonkey script that makes some simple dom manipulation. The greasemonkey
I have two greasemonkey scripts loading on a particular url. How do I make

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.