diff options
author | Daniel Teixeira <daniel.t.dt@gmail.com> | 2015-03-05 18:48:26 -0300 |
---|---|---|
committer | Daniel Teixeira <daniel.t.dt@gmail.com> | 2015-03-05 18:54:34 -0300 |
commit | f79210c6c1451bb4ae2942068de6c7d543f58d89 (patch) | |
tree | db26149751a320ad89b5fe5b64d442078e27170a /plugin | |
parent | 46777415681e6e3622046d175491c4af7b65e363 (diff) | |
download | fosdem-2018-presentation-f79210c6c1451bb4ae2942068de6c7d543f58d89.tar fosdem-2018-presentation-f79210c6c1451bb4ae2942068de6c7d543f58d89.tar.gz |
Add support for custom notes.html file
It would be nice if we could define a custom notes.html file.
Actually, I'm used to compile my js files before releasing my app and, using selectors like `script[src$="notes.js"]`, doesn't work :(
So, what do you think about it?
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/notes/notes.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/plugin/notes/notes.js b/plugin/notes/notes.js index 27199af..f353a8d 100644 --- a/plugin/notes/notes.js +++ b/plugin/notes/notes.js @@ -11,10 +11,14 @@ */ var RevealNotes = (function() { - function openNotes() { - var jsFileLocation = document.querySelector('script[src$="notes.js"]').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=1100,height=700' ); + function openNotes(notes_html_file_path) { + if (!notes_html_file_path) { + var jsFileLocation = document.querySelector('script[src$="notes.js"]').src; // this js file path + jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path + notes_html_file_path = jsFileLocation + 'notes.html'; + } + + var notesPopup = window.open(notes_html_file_path, 'reveal.js - Notes', 'width=1100,height=700' ); /** * Connect to the notes window through a postmessage handshake. |