mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
web2image
This commit is contained in:
parent
440874d436
commit
21dd69706d
@ -50,14 +50,6 @@ if (type_graph_pdf == "combined") {
|
|||||||
|
|
||||||
var page = require("webpage").create();
|
var page = require("webpage").create();
|
||||||
|
|
||||||
page.settings.resourceTimeout = 3600000; // 1 hour
|
|
||||||
page.onResourceTimeout = function(e) {
|
|
||||||
console.log(e.errorCode);
|
|
||||||
console.log(e.errorString);
|
|
||||||
console.log(e.url);
|
|
||||||
phantom.exit(1);
|
|
||||||
};
|
|
||||||
|
|
||||||
page.onResourceError = function(resourceError) {
|
page.onResourceError = function(resourceError) {
|
||||||
console.log(
|
console.log(
|
||||||
"Unable to load resource (#" +
|
"Unable to load resource (#" +
|
||||||
@ -75,13 +67,6 @@ page.onResourceError = function(resourceError) {
|
|||||||
phantom.exit(1);
|
phantom.exit(1);
|
||||||
};
|
};
|
||||||
|
|
||||||
page.onUrlChanged = function(targetUrl) {
|
|
||||||
if (url == targetUrl) {
|
|
||||||
phantom.exit(1);
|
|
||||||
}
|
|
||||||
url = targetUrl;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Not supposed to be prompted messages.
|
// Not supposed to be prompted messages.
|
||||||
page.onPrompt = function() {
|
page.onPrompt = function() {
|
||||||
console.log("Prompt message detected.");
|
console.log("Prompt message detected.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user