Sha256: bc4cc156c78893202bbb502ec26dac925d10fa63ecdbe680713e6ef763e8a355

Contents?: true

Size: 773 Bytes

Versions: 7

Compression:

Stored size: 773 Bytes

Contents

# prettify.rb

if /\A(?:latest|day|month|nyear)\z/ =~ @mode then
	add_header_proc do
		<<-HTML
		<script type="text/javascript" src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
		<script type="text/javascript"><!--
			var initPrettyPrint = function() {
				var pres = document.querySelectorAll("div.body > div.section > pre");
				Array.prototype.slice.call(pres).forEach(function(pre) {
					pre.setAttribute("class", "prettyprint");
				});
				PR.prettyPrint();
			};
			if(window.addEventListener){
				window.addEventListener("load", initPrettyPrint, false);
			}else if(window.attachEvent){
				window.attachEvent("onload", initPrettyPrint);
			}else{
				window.onload=initPrettyPrint;
			}
		// --></script>
		HTML
	end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
tdiary-contrib-5.0.10 plugin/prettify.rb
tdiary-contrib-5.0.9 plugin/prettify.rb
tdiary-contrib-5.0.8 plugin/prettify.rb
tdiary-contrib-5.0.7 plugin/prettify.rb
tdiary-contrib-5.0.6 plugin/prettify.rb
tdiary-contrib-5.0.5 plugin/prettify.rb
tdiary-5.0.5 vendor/bundle/bundler/gems/tdiary-contrib-a3c5f37278c4/plugin/prettify.rb