Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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