Skip to content

Instantly share code, notes, and snippets.

@kiran-machhewar
Created August 21, 2018 10:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kiran-machhewar/ed326d8da83545a81bf83a4f73b99116 to your computer and use it in GitHub Desktop.
Save kiran-machhewar/ed326d8da83545a81bf83a4f73b99116 to your computer and use it in GitHub Desktop.
This will cache the query via workbench.
function cacheQuery(){
//check if the result came or not
if(!document.getElementById('query_results') && document.getElementsByClassName('displayWarning').length == 0 ){//no results found
//check if system is not waiting for the result i.e query is processing
if(!document.getElementsByClassName('disableWhileAsyncLoading')[0].disabled){ //button is not disabled so try again
document.getElementsByClassName('disableWhileAsyncLoading')[0].click();
}
}
}
setInterval(cacheQuery , 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment