convert plugins to ES modules, transpile es5 versions backwards compatibility
This commit is contained in:
7
plugin/notes/notes.es5
Normal file
7
plugin/notes/notes.es5
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* This is used to compile a self-registering
|
||||
* es5 compatible version of the plugin.
|
||||
*/
|
||||
|
||||
import plugin from './notes.js'
|
||||
Reveal.registerPlugin( plugin );
|
@ -23,9 +23,10 @@ var RevealNotes = (function() {
|
||||
}
|
||||
|
||||
if( !notesFilePath ) {
|
||||
var jsFileLocation = document.querySelector('script[src$="notes.js"]').src; // this js file path
|
||||
jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path
|
||||
notesFilePath = jsFileLocation + 'notes.html';
|
||||
// var jsFileLocation = document.querySelector('script[src$="notes.js"]').src; // this js file path
|
||||
// jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path
|
||||
// notesFilePath = jsFileLocation + 'notes.html';
|
||||
notesFilePath = 'plugin/notes/notes.html'
|
||||
}
|
||||
|
||||
notesPopup = window.open( notesFilePath, 'reveal.js - Notes', 'width=1100,height=700' );
|
||||
@ -156,9 +157,9 @@ var RevealNotes = (function() {
|
||||
return {
|
||||
id: 'notes',
|
||||
|
||||
init: function( revealInstance ) {
|
||||
init: function( reveal ) {
|
||||
|
||||
deck = revealInstance;
|
||||
deck = reveal;
|
||||
|
||||
if( !/receiver/i.test( window.location.search ) ) {
|
||||
|
||||
@ -181,4 +182,4 @@ var RevealNotes = (function() {
|
||||
|
||||
})();
|
||||
|
||||
Reveal.registerPlugin( RevealNotes );
|
||||
export default RevealNotes;
|
||||
|
Reference in New Issue
Block a user