|
@@ -1558,12 +1558,17 @@
|
|
|
*/
|
|
|
function registerPlugin( id, plugin ) {
|
|
|
|
|
|
- plugins[id] = plugin;
|
|
|
+ if( plugins[id] === undefined ) {
|
|
|
+ plugins[id] = plugin;
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- if( loaded && typeof plugin.init === 'function' ) {
|
|
|
- plugin.init();
|
|
|
+
|
|
|
+
|
|
|
+ if( loaded && typeof plugin.init === 'function' ) {
|
|
|
+ plugin.init();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ console.warn( 'reveal.js: "'+ id +'" plugin has already been registered' );
|
|
|
}
|
|
|
|
|
|
}
|