|
@ -184,10 +184,6 @@ |
|
|
<section> |
|
|
<section> |
|
|
<h2>Pretty Code</h2> |
|
|
<h2>Pretty Code</h2> |
|
|
<pre><code contenteditable> |
|
|
<pre><code contenteditable> |
|
|
var supports3DTransforms = document.body.style['webkitPerspective'] !== undefined || |
|
|
|
|
|
document.body.style['MozPerspective'] !== undefined || |
|
|
|
|
|
document.body.style['perspective'] !== undefined; |
|
|
|
|
|
|
|
|
|
|
|
function linkify( selector ) { |
|
|
function linkify( selector ) { |
|
|
if( supports3DTransforms ) { |
|
|
if( supports3DTransforms ) { |
|
|
|
|
|
|
|
@ -196,15 +192,12 @@ function linkify( selector ) { |
|
|
for( var i = 0, len = nodes.length; i < len; i++ ) { |
|
|
for( var i = 0, len = nodes.length; i < len; i++ ) { |
|
|
var node = nodes[i]; |
|
|
var node = nodes[i]; |
|
|
|
|
|
|
|
|
if( !node.className || !node.className.match( /roll/g ) ) { |
|
|
if( !node.className ) ) { |
|
|
node.className += ' roll'; |
|
|
node.className += ' roll'; |
|
|
node.innerHTML = '<span data-title="'+ node.text +'">' + node.innerHTML + '</span>'; |
|
|
|
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
linkify( 'a' ); |
|
|
|
|
|
</code></pre> |
|
|
</code></pre> |
|
|
<p>Courtesy of <a href="http://softwaremaniacs.org/soft/highlight/en/description/">highlight.js</a>.</p> |
|
|
<p>Courtesy of <a href="http://softwaremaniacs.org/soft/highlight/en/description/">highlight.js</a>.</p> |
|
|
</section> |
|
|
</section> |
|
|