aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2017-01-31 16:45:07 +0100
committerGitHub <noreply@github.com>2017-01-31 16:45:07 +0100
commitdc159f2825feb50ae4c0cee085ff1d91084c0760 (patch)
treeb40d04884c095ffb1f3d1ac7b2394425fad63171
parent7daa0e04de7d0ab2bae3159faae0b18d4eb3c8d3 (diff)
parenta652e0a8ea3ecb904a9be77a266a5e84b8a9ab3a (diff)
downloadfosdem-2018-presentation-dc159f2825feb50ae4c0cee085ff1d91084c0760.tar
fosdem-2018-presentation-dc159f2825feb50ae4c0cee085ff1d91084c0760.tar.gz
Merge pull request #1644 from rajgoel/dev
Turn off preview links locally
-rw-r--r--js/reveal.js7
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' ) ) ) {