From 0dc2b82646d40af67d295356e7607706624c63d6 Mon Sep 17 00:00:00 2001 From: anaklayangan <54343550+anaklayangan@users.noreply.github.com> Date: Sat, 24 Aug 2019 10:24:34 +0700 Subject: [PATCH] Improve ChikaRuraSafe Wordpress Plugin bypass `.ajaxStop()` to detect if any ajax call is complete --- content_script.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/content_script.js b/content_script.js index f881308..2a52e6b 100644 --- a/content_script.js +++ b/content_script.js @@ -861,15 +861,17 @@ if(document instanceof HTMLDocument) bukalink() return finish() } + if(document.querySelector(".rurasafesubmit")){ + document.querySelector(".rurasafesubmit").click() + return finish() + } if(typeof changeLink=="function") { ifElement("#showlink",()=>{ let _open=window.open window.open=l=>_open(l,"_self") - setTimeout(()=>{ - document.querySelector("a[href='#generate']").click() - setTimeout(()=>document.querySelector("#showlink").click(),500) - },500) + $(document).ajaxStop(()=>document.querySelector("#showlink").click()) + document.querySelector("a[href='#generate']").click() },()=>{ let cLT=setInterval(()=>{ if((document.querySelector("img#pleasewait")&&document.querySelector(".wait"))