commit
dc159f2825
|
@ -1031,10 +1031,11 @@
|
||||||
// Iframe link previews
|
// Iframe link previews
|
||||||
if( config.previewLinks ) {
|
if( config.previewLinks ) {
|
||||||
enablePreviewLinks();
|
enablePreviewLinks();
|
||||||
|
disablePreviewLinks( '[data-preview-link=false]' );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
disablePreviewLinks();
|
disablePreviewLinks();
|
||||||
enablePreviewLinks( '[data-preview-link]' );
|
enablePreviewLinks( '[data-preview-link]:not([data-preview-link=false])' );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove existing auto-slide controls
|
// Remove existing auto-slide controls
|
||||||
|
@ -1570,9 +1571,9 @@
|
||||||
/**
|
/**
|
||||||
* Unbind preview frame links.
|
* 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 ) {
|
anchors.forEach( function( element ) {
|
||||||
if( /^(http|www)/gi.test( element.getAttribute( 'href' ) ) ) {
|
if( /^(http|www)/gi.test( element.getAttribute( 'href' ) ) ) {
|
||||||
|
|
Loading…
Reference in New Issue