'
});
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
@@ -13720,7 +13729,7 @@
}
if (previousversion) {
el = $.el('span', {
- innerHTML: '4chan X has been updated to version 1.7.45.'
+ innerHTML: '4chan X has been updated to version 1.7.46.'
});
new Notice('info', el, 15);
} else {
diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip
index b93554e7a..204d8a77c 100644
Binary files a/builds/4chan-X.zip and b/builds/4chan-X.zip differ
diff --git a/builds/crx.crx b/builds/crx.crx
index 8a4a4bcc0..121aa4e82 100644
Binary files a/builds/crx.crx and b/builds/crx.crx differ
diff --git a/builds/crx/manifest.json b/builds/crx/manifest.json
index 1bbbd674e..df4302fe7 100755
--- a/builds/crx/manifest.json
+++ b/builds/crx/manifest.json
@@ -1,6 +1,6 @@
{
"name": "4chan X",
- "version": "1.7.45",
+ "version": "1.7.46",
"manifest_version": 2,
"description": "Cross-browser userscript for maximum lurking on 4chan.",
"icons": {
diff --git a/builds/crx/script.js b/builds/crx/script.js
index 0120eb876..b0b5d834e 100644
--- a/builds/crx/script.js
+++ b/builds/crx/script.js
@@ -1,6 +1,6 @@
// Generated by CoffeeScript
/*
-* 4chan X - Version 1.7.45 - 2014-05-24
+* 4chan X - Version 1.7.46 - 2014-05-24
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
@@ -348,7 +348,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.7.45',
+ VERSION: '1.7.46',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -3549,6 +3549,7 @@
$.cache(url, function() {
return Get.archivedPost(this, boardID, postID, root, context);
}, {
+ responseType: 'json',
withCredentials: url.archive.withCredentials
});
} else {
@@ -11602,7 +11603,7 @@
});
}
if (board === 'sci') {
- $.globalEval('window.addEventListener(\'jsmath\', function(e) {\n if (jsMath.loaded) {\n // process one post\n jsMath.ProcessBeforeShowing(e.detail);\n } else {\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.detail);\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);');
return Post.callbacks.push({
name: 'Parse /sci/ math',
cb: this.math
@@ -11626,10 +11627,18 @@
$.off(window, 'prettyprint:cb', apply);
},
math: function() {
- if (this.isClone || !$('.math', this.nodes.comment)) {
+ if ((this.isClone && doc.contains(this.origin.nodes.root)) || !$('.math', this.nodes.comment)) {
return;
}
- return $.event('jsmath', this.nodes.post, window);
+ return $.asap(((function(_this) {
+ return function() {
+ return doc.contains(_this.nodes.post);
+ };
+ })(this)), (function(_this) {
+ return function() {
+ return $.event('jsmath', _this.nodes.post, window);
+ };
+ })(this));
},
parseThread: function(threadID, offset, limit) {
return $.event('4chanParsingDone', {
@@ -12881,7 +12890,7 @@
Settings.dialog = dialog = $.el('div', {
id: 'fourchanx-settings',
className: 'dialog',
- innerHTML: '
'
+ innerHTML: '
'
});
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
@@ -13713,7 +13722,7 @@
}
if (previousversion) {
el = $.el('span', {
- innerHTML: '4chan X has been updated to version 1.7.45.'
+ innerHTML: '4chan X has been updated to version 1.7.46.'
});
new Notice('info', el, 15);
} else {
diff --git a/builds/updates.xml b/builds/updates.xml
index 61fb1738b..845ab389d 100644
--- a/builds/updates.xml
+++ b/builds/updates.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/builds/wcrx/manifest.json b/builds/wcrx/manifest.json
index eb327396e..d0e80aa03 100644
--- a/builds/wcrx/manifest.json
+++ b/builds/wcrx/manifest.json
@@ -1,6 +1,6 @@
{
"name": "4chan X",
- "version": "1.7.45",
+ "version": "1.7.46",
"manifest_version": 2,
"description": "Cross-browser userscript for maximum lurking on 4chan.",
"icons": {
diff --git a/builds/wcrx/script.js b/builds/wcrx/script.js
index 0120eb876..b0b5d834e 100644
--- a/builds/wcrx/script.js
+++ b/builds/wcrx/script.js
@@ -1,6 +1,6 @@
// Generated by CoffeeScript
/*
-* 4chan X - Version 1.7.45 - 2014-05-24
+* 4chan X - Version 1.7.46 - 2014-05-24
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
@@ -348,7 +348,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.7.45',
+ VERSION: '1.7.46',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -3549,6 +3549,7 @@
$.cache(url, function() {
return Get.archivedPost(this, boardID, postID, root, context);
}, {
+ responseType: 'json',
withCredentials: url.archive.withCredentials
});
} else {
@@ -11602,7 +11603,7 @@
});
}
if (board === 'sci') {
- $.globalEval('window.addEventListener(\'jsmath\', function(e) {\n if (jsMath.loaded) {\n // process one post\n jsMath.ProcessBeforeShowing(e.detail);\n } else {\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.detail);\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);');
return Post.callbacks.push({
name: 'Parse /sci/ math',
cb: this.math
@@ -11626,10 +11627,18 @@
$.off(window, 'prettyprint:cb', apply);
},
math: function() {
- if (this.isClone || !$('.math', this.nodes.comment)) {
+ if ((this.isClone && doc.contains(this.origin.nodes.root)) || !$('.math', this.nodes.comment)) {
return;
}
- return $.event('jsmath', this.nodes.post, window);
+ return $.asap(((function(_this) {
+ return function() {
+ return doc.contains(_this.nodes.post);
+ };
+ })(this)), (function(_this) {
+ return function() {
+ return $.event('jsmath', _this.nodes.post, window);
+ };
+ })(this));
},
parseThread: function(threadID, offset, limit) {
return $.event('4chanParsingDone', {
@@ -12881,7 +12890,7 @@
Settings.dialog = dialog = $.el('div', {
id: 'fourchanx-settings',
className: 'dialog',
- innerHTML: '
'
+ innerHTML: '
'
});
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
@@ -13713,7 +13722,7 @@
}
if (previousversion) {
el = $.el('span', {
- innerHTML: '4chan X has been updated to version 1.7.45.'
+ innerHTML: '4chan X has been updated to version 1.7.46.'
});
new Notice('info', el, 15);
} else {
diff --git a/package.json b/package.json
index 45f57490f..a3cc9ce8e 100755
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "4chan-X",
- "version": "1.7.45",
+ "version": "1.7.46",
"description": "Cross-browser userscript for maximum lurking on 4chan.",
"meta": {
"name": "4chan X",