Fix jsmath listener.

This commit is contained in:
ccd0 2015-01-24 02:03:02 -08:00
parent dccf88cf13
commit 95bd98d5c9
4 changed files with 6 additions and 5 deletions

View File

@ -1,5 +1,5 @@
/*
* appchan x - Version 2.10.4 - 2015-01-23
* appchan x - Version 2.10.4 - 2015-01-24
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE

View File

@ -28,7 +28,7 @@
// ==/UserScript==
/*
* appchan x - Version 2.10.4 - 2015-01-23
* appchan x - Version 2.10.4 - 2015-01-24
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
@ -16140,7 +16140,7 @@
});
}
if (id === 'sci') {
$.globalEval('window.addEventListener(\'jsmath\', function(e) {\n if (!jsMath) return;\n // process one post\n jsMath.ProcessBeforeShowing(e.target);\n } else if (jsMath.Autoload && jsMath.Autoload.checked) {\n // load jsMath and process whole document\n jsMath.Autoload.Script.Push(\'ProcessBeforeShowing\', [null]);\n jsMath.Autoload.LoadJsMath();\n }\n}, false);');
$.globalEval('window.addEventListener(\'jsmath\', function(e) {\n if (!jsMath) return;\n if (jsMath.loaded) {\n // process one post\n jsMath.ProcessBeforeShowing(e.target);\n } else if (jsMath.Autoload && jsMath.Autoload.checked) {\n // load jsMath and process whole document\n jsMath.Autoload.Script.Push(\'ProcessBeforeShowing\', [null]);\n jsMath.Autoload.LoadJsMath();\n }\n}, false);');
Post.callbacks.push({
name: 'Parse /sci/ math',
cb: this.math

View File

@ -1,6 +1,6 @@
// Generated by CoffeeScript
/*
* appchan x - Version 2.10.4 - 2015-01-23
* appchan x - Version 2.10.4 - 2015-01-24
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
@ -16162,7 +16162,7 @@
});
}
if (id === 'sci') {
$.globalEval('window.addEventListener(\'jsmath\', function(e) {\n if (!jsMath) return;\n // process one post\n jsMath.ProcessBeforeShowing(e.target);\n } else if (jsMath.Autoload && jsMath.Autoload.checked) {\n // load jsMath and process whole document\n jsMath.Autoload.Script.Push(\'ProcessBeforeShowing\', [null]);\n jsMath.Autoload.LoadJsMath();\n }\n}, false);');
$.globalEval('window.addEventListener(\'jsmath\', function(e) {\n if (!jsMath) return;\n if (jsMath.loaded) {\n // process one post\n jsMath.ProcessBeforeShowing(e.target);\n } else if (jsMath.Autoload && jsMath.Autoload.checked) {\n // load jsMath and process whole document\n jsMath.Autoload.Script.Push(\'ProcessBeforeShowing\', [null]);\n jsMath.Autoload.LoadJsMath();\n }\n}, false);');
Post.callbacks.push({
name: 'Parse /sci/ math',
cb: this.math

View File

@ -19,6 +19,7 @@ Fourchan =
$.globalEval '''
window.addEventListener('jsmath', function(e) {
if (!jsMath) return;
if (jsMath.loaded) {
// process one post
jsMath.ProcessBeforeShowing(e.target);
} else if (jsMath.Autoload && jsMath.Autoload.checked) {