Skip to content

Instantly share code, notes, and snippets.

@RickyMarou
Created October 29, 2020 08:58
Show Gist options
  • Select an option

  • Save RickyMarou/2996d857309d29a43bab186e1dcbd275 to your computer and use it in GitHub Desktop.

Select an option

Save RickyMarou/2996d857309d29a43bab186e1dcbd275 to your computer and use it in GitHub Desktop.
Mark offline cache files as viewed in GH PR
Array.from(document.querySelectorAll("a[title^='offline-cache/']")).forEach(linkElt => {
const fileElt = linkElt.closest("[data-details-container-group='file']");
const viewedLabel = fileElt.querySelector("input[name='viewed']").closest("label");
viewedLabel.click();
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment