Skip to content

Commit

Permalink
find correct path to open html file from the notes.js path
Browse files Browse the repository at this point in the history
  • Loading branch information
gdamjan committed Feb 6, 2013
1 parent cf8708f commit fd7d09f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugin/notes/notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit fd7d09f

Please sign in to comment.