Browse Source

make sure remotes works without notes plugin being loaded #607

master
Hakim El Hattab 11 years ago
parent
commit
a3f10e0b0f
  1. 6
      plugin/remotes/remotes.js

6
plugin/remotes/remotes.js

@ -17,11 +17,11 @@
* Detects if notes are enable and the current page is opened inside an /iframe * Detects if notes are enable and the current page is opened inside an /iframe
* this prevents loading Remotes.io several times * this prevents loading Remotes.io several times
*/ */
var remotesAndIsNotes = (function(){ var isNotesAndIframe = (function(){
return !(window.RevealNotes && self == top); return window.RevealNotes && !(self == top);
})(); })();
if(!hasTouch && !remotesAndIsNotes){ if(!hasTouch && !isNotesAndIframe){
head.ready( 'remotes.ne.min.js', function() { head.ready( 'remotes.ne.min.js', function() {
new Remotes("preview") new Remotes("preview")
.on("swipe-left", function(e){ Reveal.right(); }) .on("swipe-left", function(e){ Reveal.right(); })

Loading…
Cancel
Save