Skip to content

Instantly share code, notes, and snippets.

@jose-neta
Forked from webaware/bitbucket.js
Created October 6, 2016 23:49
Show Gist options
  • Save jose-neta/d9384138056c5172af765e2c77e0f4e2 to your computer and use it in GitHub Desktop.
Save jose-neta/d9384138056c5172af765e2c77e0f4e2 to your computer and use it in GitHub Desktop.
Some bookmarklets for setting tab-size to 4 on GitHub, Gist, and Bitbucket. NB: they all work in Chrome, but the GitHub and Gist ones don't work in Firefox (as at v31) because of its implementation for honouring CSP headers.
javascript:(function(){var style=document.createElement('style'),css=document.createTextNode('.refract-container .source{-moz-tab-size:4;tab-size:4;}');style.appendChild(css);document.getElementsByTagName('head')[0].appendChild(style);})();
javascript:(function(){var style=document.createElement('style'),css=document.createTextNode('.file-data{-moz-tab-size:4;tab-size:4;}');style.appendChild(css);document.getElementsByTagName('head')[0].appendChild(style);})();
javascript:(function(){var style=document.createElement('style'),css=document.createTextNode('.tab-size-8 .blob-code{-moz-tab-size:4;tab-size:4;}');style.appendChild(css);document.getElementsByTagName('head')[0].appendChild(style);})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment