Skip to content

Instantly share code, notes, and snippets.

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