catch plugin JS errors
This commit is contained in:
parent
f6d2787a8e
commit
546b419f52
2 changed files with 10 additions and 5 deletions
|
@ -118,7 +118,12 @@
|
|||
|
||||
foreach (PluginHost::getInstance()->get_plugins() as $n => $p) {
|
||||
if (method_exists($p, "get_js")) {
|
||||
echo "try {";
|
||||
echo JShrink\Minifier::minify($p->get_js());
|
||||
echo "} catch (e) {
|
||||
console.warn('failed to initialize plugin JS: $n');
|
||||
console.warn(e);
|
||||
}";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
10
js/tt-rss.js
10
js/tt-rss.js
|
@ -218,10 +218,10 @@ function init() {
|
|||
try {
|
||||
//dojo.registerModulePath("fox", "../../js/");
|
||||
|
||||
require(['dojo/_base/kernel',
|
||||
'dojo/ready',
|
||||
'dojo/parser',
|
||||
'dojo/_base/loader',
|
||||
require(["dojo/_base/kernel",
|
||||
"dojo/ready",
|
||||
"dojo/parser",
|
||||
"dojo/_base/loader",
|
||||
"dijit/ProgressBar",
|
||||
"dijit/ColorPalette",
|
||||
"dijit/Dialog",
|
||||
|
@ -254,7 +254,7 @@ function init() {
|
|||
|
||||
dojo.require("fox.FeedTree");
|
||||
|
||||
dojo.parser.parse();
|
||||
parser.parse();
|
||||
|
||||
if (!genericSanityCheck())
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue