Skip to content

Commit fd7d09f

Browse files
committed
find correct path to open html file from the notes.js path
1 parent cf8708f commit fd7d09f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugin/notes/notes.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
var RevealNotes = (function() {
66

77
function openNotes() {
8-
var notesPopup = window.open( 'plugin/notes/notes.html', 'reveal.js - Notes', 'width=1120,height=850' );
8+
var jsFileLocation = document.querySelector('script[src*=notes]').src; // this js file path
9+
jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path
10+
var notesPopup = window.open( jsFileLocation + 'notes.html', 'reveal.js - Notes', 'width=1120,height=850' );
911

1012
// Fires when slide is changed
1113
Reveal.addEventListener( 'slidechanged', function( event ) {

0 commit comments

Comments
 (0)