Skip to content

Instantly share code, notes, and snippets.

@jpgninja
Last active January 16, 2022 14:47
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 jpgninja/c904a25414f001d955f2f8a8605128e7 to your computer and use it in GitHub Desktop.
Save jpgninja/c904a25414f001d955f2f8a8605128e7 to your computer and use it in GitHub Desktop.
Bulk DA Checker Bookmarklet
/*
* Grabs DA, PA, and MozRank from https://www.robingupta.com/bulk-domain-authority-checker.html
*/
let stats_str = [];
let stats = [];
let out = "";
stats_str = [];
stats = [];
out = "";
let get_ranks = () => {
$("#rankGrid tbody tr").map( (i,domain) => {
stats.push( [
$(domain).children('th:nth-child(2)').text().trim(),
$(domain).children('th:nth-child(3)').text().trim(),
$(domain).children('th:nth-child(4)').text().trim(),
$(domain).children('th:nth-child(5)').text().trim()
] )
});
stats.map( (domain) => { stats_str.push( domain.join(" ") ) } );
return stats_str.join("\r\n");
}
let copy_to_cb = () => {
let out = get_ranks();
cb_helper = document.getElementById("clipboard_helper") ? document.getElementById("clipboard_helper") : create_cb_element();
/* Select the text field */
console.log( cb_helper )
cb_helper.value = out;
cb_helper.focus();
cb_helper.select();
cb_helper.setSelectionRange(0, 99999); /*For mobile devices*/
/* Copy the text inside the text field */
document.execCommand("copy");
/* Alert the copied text */
alert("Copied the text: " + cb_helper.value);
}
let create_cb_element = () => {
let cb_helper = document.createElement("textarea");
cb_helper.id = 'clipboard_helper';
cb_helper.value = out;
document.getElementById("footer").appendChild(cb_helper);
return document.getElementById("clipboard_helper");
}
$("#pagetitle").append('<br><br><br><h2 id="cb_scraper">SCRAPE!</h2>');
$("#cb_scraper").on( 'click', copy_to_cb );
@NXPFatur
Copy link

can you share how to make this web? https://www.robingupta.com/bulk-domain-authority-checker.html :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment