diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2020-04-21 13:34:40 +0200 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2020-04-21 13:34:40 +0200 |
commit | faaa79101996bf996ad3888960cfcd5303c9b5b0 (patch) | |
tree | 2deb2d31694e707dc0c018bb7f84c92b21c931da /js | |
parent | de50b4153c492c449e7645b6e8c86e484b527270 (diff) | |
download | fosdem-2021-minimalism-presentation-faaa79101996bf996ad3888960cfcd5303c9b5b0.tar fosdem-2021-minimalism-presentation-faaa79101996bf996ad3888960cfcd5303c9b5b0.tar.gz |
backwards compatibility, reveal.js 4.0 can now register ~3.9 plugins
Diffstat (limited to 'js')
-rw-r--r-- | js/controllers/plugins.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/js/controllers/plugins.js b/js/controllers/plugins.js index 9a5bb79..ebe210c 100644 --- a/js/controllers/plugins.js +++ b/js/controllers/plugins.js @@ -177,6 +177,13 @@ export default class Plugins { */ registerPlugin( plugin ) { + // Backwards compatibility to make reveal.js ~3.9.0 + // plugins work with reveal.js 4.0.0 + if( arguments.length === 2 && typeof arguments[0] === 'string' ) { + plugin = arguments[1]; + plugin.id = arguments[0]; + } + let id = plugin.id; if( typeof id !== 'string' ) { |