Improve reveal.js plugin detection message for reveal.js version < 2.3.0

This commit is contained in:
astefanutti 2015-06-03 11:14:04 +02:00
parent 199401a4cc
commit d48327b916
2 changed files with 15 additions and 2 deletions

View File

@ -61,6 +61,11 @@ page.onLoadFinished = function(status) {
console.log("Loading page finished with status: " + status);
};
// Must be set before the page is opened
page.onConsoleMessage = function(msg) {
console.log(msg);
};
page.open(opts.url, function(status) {
if (status !== "success") {
console.log("Unable to load the address: " + opts.url);
@ -69,7 +74,7 @@ page.open(opts.url, function(status) {
var plugin = detectActivePlugin();
if (!plugin) {
// TODO: backend fallback manual support
console.log("No DeckTape plugin supported for the address:" + opts.url);
console.log("No DeckTape plugin supported for the address: " + opts.url);
phantom.exit(1);
}
console.log(plugin.getName() + " DeckTape plugin activated");

View File

@ -8,7 +8,15 @@ Reveal.prototype = {
},
isActive : function() {
return typeof Reveal !== "undefined";
if (typeof Reveal === "undefined")
return false;
if (!(typeof Reveal.isLastSlide === "function")) {
console.log("Reveal JS plugin isn't compatible with reveal.js version < 2.3.0");
return false;
}
return true;
},
configure : function() {