disable 3d links in ie, reorder script loading in index for readability (closes #95)
This commit is contained in:
parent
75546e8962
commit
2c3a494eaa
3 changed files with 46 additions and 42 deletions
|
@ -204,6 +204,7 @@ You can change the appearance of the speaker notes by editing the file at `plugi
|
||||||
- Added EOT font for IE support
|
- Added EOT font for IE support
|
||||||
- IE8 support
|
- IE8 support
|
||||||
- Fixed bug where hovering 3D links in Chrome caused them to disappear
|
- Fixed bug where hovering 3D links in Chrome caused them to disappear
|
||||||
|
- Disable 3D links in IE and more accurate CSS feature detection
|
||||||
|
|
||||||
#### 1.4
|
#### 1.4
|
||||||
- Main ```#reveal container``` is now selected via a class instead of ID
|
- Main ```#reveal container``` is now selected via a class instead of ID
|
||||||
|
|
57
index.html
57
index.html
|
@ -278,31 +278,7 @@ function linkify( selector ) {
|
||||||
<script src="lib/js/head.min.js"></script>
|
<script src="lib/js/head.min.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// Scripts that should be loaded before initializing
|
head.ready( function() {
|
||||||
var scripts = [];
|
|
||||||
|
|
||||||
// If the browser doesn't support classList, load a polyfill
|
|
||||||
if( !document.body.classList ) {
|
|
||||||
scripts.push( 'lib/js/classList.js' );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Load markdown parser if there are slides defined using markdown
|
|
||||||
if( document.querySelector( '[data-markdown]' ) ) {
|
|
||||||
scripts.push( 'lib/js/showdown.js' );
|
|
||||||
scripts.push( 'lib/js/data-markdown.js' );
|
|
||||||
}
|
|
||||||
|
|
||||||
// If we're runnning the notes server we need to include some additional JS
|
|
||||||
// TODO Is there a better way to determine if we're running the notes server?
|
|
||||||
if( window.location.host === 'localhost:1947' ) {
|
|
||||||
scripts.push( 'socket.io/socket.io.js' );
|
|
||||||
scripts.push( 'plugin/speakernotes/client.js' );
|
|
||||||
}
|
|
||||||
|
|
||||||
scripts.push( 'js/reveal.js' );
|
|
||||||
|
|
||||||
// Load the scripts and, when completed, initialize reveal.js
|
|
||||||
head.js.apply( null, scripts.concat([function() {
|
|
||||||
|
|
||||||
// Fires when a slide with data-state=customevent is activated
|
// Fires when a slide with data-state=customevent is activated
|
||||||
Reveal.addEventListener( 'customevent', function() {
|
Reveal.addEventListener( 'customevent', function() {
|
||||||
|
@ -325,12 +301,39 @@ function linkify( selector ) {
|
||||||
transition: Reveal.getQueryHash().transition || 'default' // default/cube/page/concave/linear(2d)
|
transition: Reveal.getQueryHash().transition || 'default' // default/cube/page/concave/linear(2d)
|
||||||
});
|
});
|
||||||
|
|
||||||
}]));
|
|
||||||
|
|
||||||
// Load highlight.js for syntax highlighting of code samples
|
// Load highlight.js for syntax highlighting of code samples
|
||||||
head.js( 'lib/js/highlight.js', function() {
|
head.js( 'lib/js/highlight.js', function() {
|
||||||
hljs.initHighlightingOnLoad();
|
hljs.initHighlightingOnLoad();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Scripts that should be loaded before initializing
|
||||||
|
var scripts = [];
|
||||||
|
|
||||||
|
// If the browser doesn't support classList, load a polyfill
|
||||||
|
if( !document.body.classList ) {
|
||||||
|
head.js( 'lib/js/classList.js' );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load markdown parser if there are slides defined using markdown
|
||||||
|
if( document.querySelector( '[data-markdown]' ) ) {
|
||||||
|
scripts.push( 'lib/js/showdown.js' );
|
||||||
|
scripts.push( 'lib/js/data-markdown.js' );
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we're runnning the notes server we need to include some additional JS
|
||||||
|
// TODO Is there a better way to determine if we're running the notes server?
|
||||||
|
if( window.location.host === 'localhost:1947' ) {
|
||||||
|
scripts.push( 'socket.io/socket.io.js' );
|
||||||
|
scripts.push( 'plugin/speakernotes/client.js' );
|
||||||
|
}
|
||||||
|
|
||||||
|
scripts.push( 'js/reveal.js' );
|
||||||
|
|
||||||
|
// Load the scripts and, when completed, initialize reveal.js
|
||||||
|
head.js.apply( null, scripts );
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
24
js/reveal.js
24
js/reveal.js
|
@ -1,5 +1,5 @@
|
||||||
/*!
|
/*!
|
||||||
* reveal.js 1.5 r10
|
* reveal.js 1.5 r11
|
||||||
* http://lab.hakim.se/reveal-js
|
* http://lab.hakim.se/reveal-js
|
||||||
* MIT licensed
|
* MIT licensed
|
||||||
*
|
*
|
||||||
|
@ -63,17 +63,17 @@ var Reveal = (function(){
|
||||||
dom = {},
|
dom = {},
|
||||||
|
|
||||||
// Detect support for CSS 3D transforms
|
// Detect support for CSS 3D transforms
|
||||||
supports3DTransforms = document.body.style['WebkitPerspective'] !== undefined ||
|
supports3DTransforms = 'WebkitPerspective' in document.body.style ||
|
||||||
document.body.style['MozPerspective'] !== undefined ||
|
'MozPerspective' in document.body.style ||
|
||||||
document.body.style['msPerspective'] !== undefined ||
|
'msPerspective' in document.body.style ||
|
||||||
document.body.style['OPerspective'] !== undefined ||
|
'OPerspective' in document.body.style ||
|
||||||
document.body.style['perspective'] !== undefined,
|
'perspective' in document.body.style,
|
||||||
|
|
||||||
supports2DTransforms = document.body.style['WebkitTransform'] !== undefined ||
|
supports2DTransforms = 'WebkitTransform' in document.body.style ||
|
||||||
document.body.style['MozTransform'] !== undefined ||
|
'MozTransform' in document.body.style ||
|
||||||
document.body.style['msTransform'] !== undefined ||
|
'msTransform' in document.body.style ||
|
||||||
document.body.style['OTransform'] !== undefined ||
|
'OTransform' in document.body.style ||
|
||||||
document.body.style['transform'] !== undefined,
|
'transform' in document.body.style,
|
||||||
|
|
||||||
// Detect support for elem.classList
|
// Detect support for elem.classList
|
||||||
supportsClassList = !!document.body.classList;
|
supportsClassList = !!document.body.classList;
|
||||||
|
@ -444,7 +444,7 @@ var Reveal = (function(){
|
||||||
* Wrap all links in 3D goodness.
|
* Wrap all links in 3D goodness.
|
||||||
*/
|
*/
|
||||||
function linkify() {
|
function linkify() {
|
||||||
if( supports3DTransforms ) {
|
if( supports3DTransforms && !( 'msPerspective' in document.body.style ) ) {
|
||||||
var nodes = document.querySelectorAll( '.reveal .slides section a:not(.image)' );
|
var nodes = document.querySelectorAll( '.reveal .slides section a:not(.image)' );
|
||||||
|
|
||||||
for( var i = 0, len = nodes.length; i < len; i++ ) {
|
for( var i = 0, len = nodes.length; i < len; i++ ) {
|
||||||
|
|
Loading…
Reference in a new issue