Forked from yuya-takeyama/paste_your_code_your_color.user.js
Created
March 8, 2012 07:29
-
-
Save monsat/1999398 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 code_highlighter_for_gist.user.js | |
// @namespace http://www.direct-serarch.jp/ | |
// @description Changes style of Gist's syntax highlight | |
// @include https://gist.github.com/* | |
// ==/UserScript== | |
// forked from https://gist.github.com/1254056 | |
(function () { | |
var styles = { | |
// className: 'css', | |
a: 'color: rgb(200, 200, 200);', | |
o: 'color: rgb(200, 200, 200);', | |
p: 'color: rgb(255, 255, 255);', | |
k: 'color: rgb(222, 49, 103);', | |
n: 'color: rgb(155, 41, 36);', | |
x: 'color: rgb(255, 255, 255);', | |
err: 'color: rgb(233, 180, 200); background: none;', | |
gd: 'color: rgb(255, 0, 0); background: none;', | |
gi: 'color: rgb(0, 168, 0); background: none;', | |
nc: 'color: rgb(168, 247, 141);', | |
nf: 'color: rgb(233, 180, 200);', | |
nv: 'color: rgb(109, 184, 255);', | |
nx: 'color: rgb(229, 133, 38);', | |
na: 'color: rgb( 66, 255, 135);', | |
nb: 'color: rgb( 66, 255, 135);', | |
kc: 'color: rgb(222, 49, 103);', | |
kd: 'color: rgb(163, 216, 121);', | |
kp: 'color: rgb(252, 241, 141);', | |
sd: 'color: rgb(202, 248, 180);', | |
s1: 'color: rgb(250, 208, 100);', | |
highlight: 'background: rgb(0, 0, 0); color: rgb(255, 255, 255)', | |
}; | |
for (var key in styles) { | |
var elements = document.getElementsByClassName(key); | |
for (var i = 0; i < elements.length; i++) { | |
elements[i].setAttribute('style', styles[key]); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
インストール方法が変わってしまったみたいです
http://support.google.com/chrome_webstore/bin/answer.py?hl=ja&answer=2664769&p=crx_warning
他のウェブサイトから拡張機能を追加する手順
信頼できるウェブサイトからのみ拡張機能を追加することをおすすめします。Chrome に他のウェブサイトの拡張機能を追加する手順は次のとおりです:
そのウェブサイトから拡張機能ファイルをダウンロードし、パソコンに保存します。
ブラウザのツールバーにあるレンチ アイコンをクリックします。
[ツール] > [拡張機能] を選択します。
パソコンに保存した拡張機能ファイルを探し、[拡張機能] ページにファイルをドラッグします。
表示されるダイアログで、拡張機能への許可のリストを確認します。インストールする場合は、[インストール] をクリックします。