Skip to content

Instantly share code, notes, and snippets.

@jsit
Created December 20, 2018 19:35
Show Gist options
  • Save jsit/f82f45c648e83c18771d909ab536d45d to your computer and use it in GitHub Desktop.
Save jsit/f82f45c648e83c18771d909ab536d45d to your computer and use it in GitHub Desktop.
GitHub File View Bookmarklets

GitHub File View Bookmarklets

Collapse JS

javascript:var%20files%20=%20document.querySelectorAll('.file-header[data-path$=".js"]%20.js-details-target[aria-expanded=true]');%20for%20(i%20=%200;%20i%20<%20files.length;%20i++)%20{%20files[i].click();%20}

Expand JS

javascript:var%20files%20=%20document.querySelectorAll('.file-header[data-path$=".js"]%20.js-details-target[aria-expanded=false]');%20for%20(i%20=%200;%20i%20<%20files.length;%20i++)%20{%20files[i].click();%20}

Show all comments

javascript:var%20files%20=%20document.querySelectorAll('.js-toggle-file-notes:not(:checked)');%20for%20(i%20=%200;%20i%20<%20files.length;%20i++)%20{%20files[i].click();%20}

Hide all comments

javascript:var%20files%20=%20document.querySelectorAll('.js-toggle-file-notes:checked');%20for%20(i%20=%200;%20i%20<%20files.length;%20i++)%20{%20files[i].click();%20}

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