26th 3月
2009
bashを書いたりとかしていたので、SyntaxHighlighterにsh用のjsファイル読み込み設定を追加した。
で、ついでに他のコード対応用設定も追加。
■修正ファイル
archive.php index.php page.php search.php single.php
■追加する対応コード
Bash/shell Diff Perl Plain Text VB Script
■追加コード
HTML
<!-- SyntaxHighlighter Start -->
<script type="text/javascript" src="<?php echo get_option('home'); ?>/wp-content/plugins/syntax-highlighter/js/shCore.js"></script>
<script type="text/javascript" src="<?php echo get_option('home'); ?>/wp-content/plugins/syntax-highlighter/js/shBrushRuby.js"></script>
<script type="text/javascript" src="<?php echo get_option('home'); ?>/wp-content/plugins/syntax-highlighter/js/shBrushCss.js"></script>
<script type="text/javascript" src="<?php echo get_option('home'); ?>/wp-content/plugins/syntax-highlighter/js/shBrushJScript.js"></script>
<script type="text/javascript" src="<?php echo get_option('home'); ?>/wp-content/plugins/syntax-highlighter/js/shBrushPhp.js"></script>
<script type="text/javascript" src="<?php echo get_option('home'); ?>/wp-content/plugins/syntax-highlighter/js/shBrushSql.js"></script>
<script type="text/javascript" src="<?php echo get_option('home'); ?>/wp-content/plugins/syntax-highlighter/js/shBrushXml.js"></script>
<script type="text/javascript" src="<?php echo get_option('home'); ?>/wp-content/plugins/syntax-highlighter/js/shBrushBash.js"></script>
<script type="text/javascript" src="<?php echo get_option('home'); ?>/wp-content/plugins/syntax-highlighter/js/shBrushDiff.js"></script>
<script type="text/javascript" src="<?php echo get_option('home'); ?>/wp-content/plugins/syntax-highlighter/js/shBrushPerl.js"></script>
<script type="text/javascript" src="<?php echo get_option('home'); ?>/wp-content/plugins/syntax-highlighter/js/shBrushPlain.js"></script>
<script type="text/javascript" src="<?php echo get_option('home'); ?>/wp-content/plugins/syntax-highlighter/js/shBrushVB.js"></script>
<script type="text/javascript">//<![CDATA[
with(SyntaxHighlighter.config.strings){expandSource="+ ソースを表示";viewSource="プレインテキスト";copyToClipboard="クリップボードにコピー";copyToClipboardConfirmation="クリップボードにコピーされました";print="印刷";help="?";noBrush="Can't find brush for: ";brushNotHtmlScript="Brush wasn't made for html-script option: ";}SyntaxHighlighter.clipboardSwf="<?php echo get_option('home'); ?>/wp-content/plugins/syntax-highlighter/js/clipboard.swf";
SyntaxHighlighter.all();
//]]></script>
<!-- SyntaxHighlighter End -->
画面表示が重くなるかと思ったけど、体感ではあまり変わらないので、このままの設定でしばらく更新してみようと思う。