projects
/
openx
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0683a1e
)
WIP: try-catch JavaScript-exceptions in banner-codes
master
author
Kai Moritz
<kai@juplo.de>
Thu, 7 Mar 2013 22:35:45 +0000
(23:35 +0100)
committer
Kai Moritz
<kai@juplo.de>
Thu, 7 Mar 2013 22:35:45 +0000
(23:35 +0100)
jquery.openx.js
patch
|
blob
|
history
openx.jquery.json
patch
|
blob
|
history
diff --git
a/jquery.openx.js
b/jquery.openx.js
index
4b978b3
..
d02b228
100644
(file)
--- a/
jquery.openx.js
+++ b/
jquery.openx.js
@@
-417,7
+417,13
@@
/** Remove leading HTML-comments, because IE will stumble otherwise */
inline = inline.slice(result[0].length,inline.length);
}
/** Remove leading HTML-comments, because IE will stumble otherwise */
inline = inline.slice(result[0].length,inline.length);
}
- $.globalEval(inline);
+ try {
+ $.globalEval(inline);
+ }
+ catch(e) {
+ if (console.error)
+ console.error('Error while executing inline script-code: ' + e.message);
+ }
insert_output(); // << The executed inline-code might have called document.write()!
}
else {
insert_output(); // << The executed inline-code might have called document.write()!
}
else {
diff --git
a/openx.jquery.json
b/openx.jquery.json
index
54fb3cf
..
1f84139
100644
(file)
--- a/
openx.jquery.json
+++ b/
openx.jquery.json
@@
-3,7
+3,7
@@
"title": "jQuery OpenX",
"description": "jQuery plugin, that loads banner-ads from an OpenX-server in an asynchronous and responsive way",
"keywords": [ "openx", "adserver", "banner", "asynchrone", "responsive" ],
"title": "jQuery OpenX",
"description": "jQuery plugin, that loads banner-ads from an OpenX-server in an asynchronous and responsive way",
"keywords": [ "openx", "adserver", "banner", "asynchrone", "responsive" ],
- "version": "0.2.
1
",
+ "version": "0.2.
2
",
"author": { "name": "Kai Moritz", "email": "kai@juplo.de" },
"licenses": [ { "type": "LGPLv3", "url": "http://www.gnu.org/licenses/lgpl-3.0.html" } ],
"homepage": "http://juplo.de/openx",
"author": { "name": "Kai Moritz", "email": "kai@juplo.de" },
"licenses": [ { "type": "LGPLv3", "url": "http://www.gnu.org/licenses/lgpl-3.0.html" } ],
"homepage": "http://juplo.de/openx",