From: Damjan Georgievski Date: Wed, 6 Feb 2013 11:24:04 +0000 (+0100) Subject: find correct path to open html file from the notes.js path X-Git-Tag: 2.3.0~59 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fd7d09f6972443279e7d06397b52ddd9d789f51e;p=reveal.js.git find correct path to open html file from the notes.js path --- diff --git a/plugin/notes/notes.js b/plugin/notes/notes.js index 7c83366..72f6a10 100644 --- a/plugin/notes/notes.js +++ b/plugin/notes/notes.js @@ -5,7 +5,9 @@ var RevealNotes = (function() { function openNotes() { - var notesPopup = window.open( 'plugin/notes/notes.html', 'reveal.js - Notes', 'width=1120,height=850' ); + var jsFileLocation = document.querySelector('script[src*=notes]').src; // this js file path + jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path + var notesPopup = window.open( jsFileLocation + 'notes.html', 'reveal.js - Notes', 'width=1120,height=850' ); // Fires when slide is changed Reveal.addEventListener( 'slidechanged', function( event ) {