Forked from yuya-takeyama/paste_your_code_your_color.user.js
Created
October 17, 2011 10:31
-
-
Save mEGGrim/1292356 to your computer and use it in GitHub Desktop.
Changes style of Gist's syntax highlight to paste into some presentation tools like Keynote.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name paste_your_code_your_color.user.js | |
// @namespace http://yuyat.jp/ | |
// @description Changes style of Gist's syntax highlight | |
// @include https://gist.github.com/* | |
// ==/UserScript== | |
(function () { | |
var changeStyle = function (className, style) { | |
var | |
elements = document.getElementsByClassName(className), | |
i; | |
for (i = 0; i < elements.length; i++) { | |
elements[i].setAttribute('style', style); | |
} | |
}; | |
changeStyle('a', 'color: rgb(100, 100, 100);'); | |
changeStyle('o', 'color: rgb(100, 100, 100);'); | |
changeStyle('p', 'color: rgb(0, 0, 0);'); | |
changeStyle('k', 'color: rgb(222, 49, 103);'); | |
changeStyle('n', 'color: rgb(155, 41, 36);'); | |
changeStyle('err', 'color: rgb(213, 160, 180); background: none;'); | |
changeStyle('nc', 'color: rgb(168, 247, 141);'); | |
changeStyle('nf', 'color: rgb(233, 150, 170);'); | |
changeStyle('nv', 'color: rgb(109, 184, 255);'); | |
changeStyle('nx', 'color: rgb(229, 133, 38);'); | |
changeStyle('na', 'color: rgb( 66, 255, 135);'); | |
changeStyle('nb', 'color: rgb( 36, 230, 105);'); | |
changeStyle('kd', 'color: rgb(103, 216, 60);'); | |
changeStyle('kp', 'color: rgb(202, 201, 101);'); | |
changeStyle('sd', 'color: rgb(150, 248, 130);'); | |
changeStyle('s1', 'color: rgb(200, 158, 50);'); | |
changeStyle('highlight', 'background: rgb(255, 255, 255);'); | |
})(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment