Skip to content

Instantly share code, notes, and snippets.

@webaware
Created September 2, 2014 22:01
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save webaware/bbc925c95856fd5e5cfe to your computer and use it in GitHub Desktop.
Save webaware/bbc925c95856fd5e5cfe 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