diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2017-01-31 16:45:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-31 16:45:07 +0100 |
commit | dc159f2825feb50ae4c0cee085ff1d91084c0760 (patch) | |
tree | b40d04884c095ffb1f3d1ac7b2394425fad63171 /js | |
parent | 7daa0e04de7d0ab2bae3159faae0b18d4eb3c8d3 (diff) | |
parent | a652e0a8ea3ecb904a9be77a266a5e84b8a9ab3a (diff) | |
download | perl-software-in-gnu-guix-dc159f2825feb50ae4c0cee085ff1d91084c0760.tar perl-software-in-gnu-guix-dc159f2825feb50ae4c0cee085ff1d91084c0760.tar.gz |
Merge pull request #1644 from rajgoel/dev
Turn off preview links locally
Diffstat (limited to 'js')
-rw-r--r-- | js/reveal.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/js/reveal.js b/js/reveal.js index c2888e8..7a561a1 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1031,10 +1031,11 @@ // Iframe link previews if( config.previewLinks ) { enablePreviewLinks(); + disablePreviewLinks( '[data-preview-link=false]' ); } else { disablePreviewLinks(); - enablePreviewLinks( '[data-preview-link]' ); + enablePreviewLinks( '[data-preview-link]:not([data-preview-link=false])' ); } // Remove existing auto-slide controls @@ -1570,9 +1571,9 @@ /** * Unbind preview frame links. */ - function disablePreviewLinks() { + function disablePreviewLinks( selector ) { - var anchors = toArray( document.querySelectorAll( 'a' ) ); + var anchors = toArray( document.querySelectorAll( selector ? selector : 'a' ) ); anchors.forEach( function( element ) { if( /^(http|www)/gi.test( element.getAttribute( 'href' ) ) ) { |