Skip to content

Instantly share code, notes, and snippets.

@doronguttman
Last active October 20, 2022 18:20
Show Gist options
  • Save doronguttman/54b471e41d6eb3537bec3e589703d89f to your computer and use it in GitHub Desktop.
Save doronguttman/54b471e41d6eb3537bec3e589703d89f to your computer and use it in GitHub Desktop.
Bookmarklets
javascript:(function(){Array.from(document.querySelectorAll(`details[data-resolved=true].review-thread-component`)).forEach(({style}) => style.display = style.display === "none" ? "" : "none"); Array.from(document.querySelectorAll(`div.js-timeline-item .TimelineItem.js-comment-container`)).forEach(({style}) => style.display = style.display === "none" ? "" : "none")})()
javascript:(function loadAll(){console.debug("loadAll: searching for buttons");let b=Array.from(document.querySelectorAll("button.ajax-pagination-btn")),a=b.find(a=>a.innerText.includes("Load more")),c=b.find(a=>a.innerText.includes("Loading"));if(console.debug(`loadAll: found ${ a ?%20%22Load%20more%22%20:%20c%20?%20%22Loading%22%20:%20%22nothing%22%20}`),!a&&!c){console.log(%22loadAll:%20done%22);alert(%22loadAll:%20done%22);return;}a?.click(),setTimeout(loadAll,500)})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment