Skip to content
Snippets Groups Projects
Commit 87894e55 authored by Alejandro El Informático's avatar Alejandro El Informático
Browse files

fix prevents loading remote plugin several times when notes are enabled

parent 308987ee
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,15 @@
return ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch;
})();
if(!hasTouch){
/**
* Detects if notes are enable and the current page is opened inside an /iframe
* this prevents loading Remotes.io several times
*/
var remotesAndIsNotes = (function(){
return !(window.RevealNotes && self == top);
})();
if(!hasTouch && !remotesAndIsNotes){
head.ready( 'remotes.ne.min.js', function() {
new Remotes("preview")
.on("swipe-left", function(e){ Reveal.right(); })
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment