// ==UserScript== // @name copy.ai automatic generate // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author ensky // @supportURL https://ensky.tech/automatic-click-copy-ai/ // @match *://app.copy.ai/* // @require https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js // @icon https://www.google.com/s2/favicons?sz=64&domain=google.com // @grant none // ==/UserScript== (function() { 'use strict'; /***********************config code********************************/ //define how many second you want to click the "Create Copy" button var autmatic_click_delay=5; /**********************config stop**********************************/ const google_next_serp_wait=ms=>new Promise(resolve=>setTimeout(resolve, ms)); var if_click_generate=true; async function automatic_generate() { while(if_click_generate) { console.log("while loop start"); var make_more=$('[data-testid="make-more"]').text(); if(make_more=='') { console.log("make more is null"); } if(make_more=="Make More") { console.log("make more button:"+make_more); console.log("Data Is Coming, Stop Automatic Click"); if_click_generate=false; } if(if_click_generate==true) { var create_copy=$('[data-testid="create-copy"]').text(); console.log("value is:"+create_copy); $('[data-testid="create-copy"]').click(); } //delay 5 seconds await google_next_serp_wait(autmatic_click_delay*1000); } console.log("exit while loop"); } automatic_generate(); //show the click button let Container = document.createElement('div'); Container.id = "sp-ac-container"; Container.style.position="fixed" Container.style.left="5px" Container.style.top="5px" Container.style['z-index']="999999" Container.innerHTML =` ` document.body.appendChild(Container); //bind the button on the HTML copy_ai_start_button.onclick = function (){ console.log("Automatic Click Start"); if_click_generate=true; automatic_generate(); }; })();