aboutsummaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2012-07-09 21:48:43 -0400
committerHakim El Hattab <hakim.elhattab@gmail.com>2012-07-09 21:48:43 -0400
commit74d342daf72c8ddd59dfd7b4aa11eda549a4d759 (patch)
treef1941bf0b4f9e9266ac3ff873f7c668d319099c5 /index.html
parent54f1fcf381dcf23e54f2b942268aa799969fa9ea (diff)
downloadfreenode-live-2017-presentation-74d342daf72c8ddd59dfd7b4aa11eda549a4d759.tar
freenode-live-2017-presentation-74d342daf72c8ddd59dfd7b4aa11eda549a4d759.tar.gz
larger font for code samples (closes #60)
Diffstat (limited to 'index.html')
-rw-r--r--index.html31
1 files changed, 12 insertions, 19 deletions
diff --git a/index.html b/index.html
index 253197c..c32b757 100644
--- a/index.html
+++ b/index.html
@@ -184,27 +184,20 @@
<section>
<h2>Pretty Code</h2>
<pre><code contenteditable>
-var supports3DTransforms = document.body.style['webkitPerspective'] !== undefined ||
- document.body.style['MozPerspective'] !== undefined ||
- document.body.style['perspective'] !== undefined;
-
function linkify( selector ) {
- if( supports3DTransforms ) {
-
- var nodes = document.querySelectorAll( selector );
-
- for( var i = 0, len = nodes.length; i < len; i++ ) {
- var node = nodes[i];
-
- if( !node.className || !node.className.match( /roll/g ) ) {
- node.className += ' roll';
- node.innerHTML = '<span data-title="'+ node.text +'">' + node.innerHTML + '</span>';
- }
- };
- }
+ if( supports3DTransforms ) {
+
+ var nodes = document.querySelectorAll( selector );
+
+ for( var i = 0, len = nodes.length; i < len; i++ ) {
+ var node = nodes[i];
+
+ if( !node.className ) ) {
+ node.className += ' roll';
+ }
+ };
+ }
}
-
-linkify( 'a' );
</code></pre>
<p>Courtesy of <a href="http://softwaremaniacs.org/soft/highlight/en/description/">highlight.js</a>.</p>
</section>