diff --git a/CHANGELOG.md b/CHANGELOG.md
index 228736a03..d875fff52 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,13 @@
+### v1.7.37
+*2014-05-14*
+
+**DamonGant**
+- Innovandalism Archive is now Deniable Plausibility.
+
+**ccd0**
+- Disable HTML both in custom board titles and file info formatting. This shuts down a means for a malicious script injected into the page to permanently install itself, to be run each time you browse 4chan. I expect few or no people were actually using their own HTML in these fields; if you want it back, make a request on the [issues](https://github.com/ccd0/4chan-x/issues) page, and I will consider working on a secure implementation.
+- Bug fixes.
+
### v1.7.36
*2014-05-13*
diff --git a/LICENSE b/LICENSE
index 677d0a23a..c238b3cf5 100755
--- a/LICENSE
+++ b/LICENSE
@@ -1,5 +1,5 @@
/*
-* 4chan X - Version 1.7.36 - 2014-05-13
+* 4chan X - Version 1.7.37 - 2014-05-14
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
diff --git a/builds/4chan-X.meta.js b/builds/4chan-X.meta.js
index 91ed62ed5..a0097752c 100755
--- a/builds/4chan-X.meta.js
+++ b/builds/4chan-X.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.7.36
+// @version 1.7.37
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js
index 246e6b39d..5d0f0fb86 100644
--- a/builds/4chan-X.user.js
+++ b/builds/4chan-X.user.js
@@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
-// @version 1.7.36
+// @version 1.7.37
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -24,7 +24,7 @@
// ==/UserScript==
/*
-* 4chan X - Version 1.7.36 - 2014-05-13
+* 4chan X - Version 1.7.37 - 2014-05-14
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
@@ -154,7 +154,7 @@
'Color User IDs': [false, 'Assign unique colors to user IDs on boards that use them'],
'Remove Spoilers': [false, 'Remove all spoilers in text.'],
'Reveal Spoilers': [false, 'Indicate spoilers if Remove Spoilers is enabled, or make the text appear hovered if Remove Spoiler is disabled.'],
- 'Show Support Message': [true, 'Warn if your browser is unsupported. 4chan X may not operate correctly on unsupported browser versions.']
+ 'Show Support Message': [true, 'Warn if your browser or configuration is unsupported and may cause 4chan X to not operate correctly.']
},
'Linkification': {
'Linkify': [true, 'Convert text into links where applicable.'],
@@ -372,7 +372,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.7.36',
+ VERSION: '1.7.37',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -552,15 +552,21 @@
};
$.addClass = function() {
- var className, el, _ref;
- el = arguments[0], className = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
- return (_ref = el.classList).add.apply(_ref, className);
+ var className, classNames, el, _i, _len;
+ el = arguments[0], classNames = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
+ for (_i = 0, _len = classNames.length; _i < _len; _i++) {
+ className = classNames[_i];
+ el.classList.add(className);
+ }
};
$.rmClass = function() {
- var className, el, _ref;
- el = arguments[0], className = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
- return (_ref = el.classList).remove.apply(_ref, className);
+ var className, classNames, el, _i, _len;
+ el = arguments[0], classNames = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
+ for (_i = 0, _len = classNames.length; _i < _len; _i++) {
+ className = classNames[_i];
+ el.classList.remove(className);
+ }
};
$.toggleClass = function(el, className) {
@@ -2284,7 +2290,7 @@
return;
}
el = $.el('span', {
- innerHTML: "Desktop notification permissions are not granted.\n[FAQ]
\n or "
+ innerHTML: '4chan X needs your permission to show desktop notifications.\n[FAQ]
\n or '
});
_ref = $$('button', el), authorize = _ref[0], disable = _ref[1];
$.on(authorize, 'click', function() {
@@ -3092,7 +3098,7 @@
o.file = {
name: data.filename + data.ext,
timestamp: "" + data.tim + data.ext,
- url: boardID === 'f' ? ("//i.4cdn.org/" + boardID + "/" + data.filename + data.ext).replace(/'/g, ''') : "//i.4cdn.org/" + boardID + "/" + data.tim + data.ext,
+ url: boardID === 'f' ? ("//i.4cdn.org/" + boardID + "/" + (encodeURIComponent(data.filename)) + data.ext).replace(/'/g, ''') : "//i.4cdn.org/" + boardID + "/" + data.tim + data.ext,
height: data.h,
width: data.w,
MD5: data.md5,
@@ -3172,7 +3178,7 @@
a.textContent = Build.shortFilename(filename);
shortFilename = a.innerHTML;
a.textContent = filename;
- filename = a.innerHTML.replace(/'/g, ''');
+ filename = a.innerHTML.replace(/'/g, ''');
fileDims = file.name.slice(-3) === 'pdf' ? 'PDF' : "" + file.width + "x" + file.height;
fileInfo = ("
File:
" + file.timestamp + "") + ("-(" + fileSize + ", " + fileDims + (file.isSpoiler ? '' : ",
" + shortFilename + "")) + ")
";
fileHTML = "" + fileInfo + imgSrc + "
";
@@ -3521,13 +3527,13 @@
UI = (function() {
var Menu, dialog, drag, dragend, dragstart, hover, hoverend, hoverstart, touchend, touchmove;
- dialog = function(id, position, html) {
+ dialog = function(id, position, properties) {
var child, el, move, _i, _len, _ref;
el = $.el('div', {
className: 'dialog',
- innerHTML: html,
id: id
});
+ $.extend(el, properties);
el.style.cssText = position;
$.get("" + id + ".position", position, function(item) {
return el.style.cssText = item["" + id + ".position"];
@@ -6207,7 +6213,9 @@
dialog: function() {
var dialog, elm, event, i, items, name, node, nodes, prop, rules, save, setNode, _, _i, _len, _ref, _ref1, _ref2;
QR.nodes = nodes = {
- el: dialog = UI.dialog('qr', 'top:0;right:0;', " ")
+ el: dialog = UI.dialog('qr', 'top:0;right:0;', {
+ innerHTML: " "
+ })
};
setNode = function(name, query) {
return nodes[name] = $(query, dialog);
@@ -6263,7 +6271,7 @@
if (g.BOARD.ID === 'f') {
nodes.flashTag = $.el('select', {
name: 'filetag',
- innerHTML: "\n\n\n\n\n\n"
+ innerHTML: '\n\n\n\n\n\n'
});
nodes.flashTag.dataset["default"] = '4';
$.add(nodes.form, nodes.flashTag);
@@ -6456,7 +6464,7 @@
QR.cooldown.auto = false;
QR.status();
return QR.error($.el('span', {
- innerHTML: "4chan X encountered an error while posting. \n[Banned?] [More info]"
+ innerHTML: '4chan X encountered an error while posting. \n[Banned?] [More info]'
}));
}
};
@@ -7519,7 +7527,7 @@
nodes = Gallery.nodes = {};
nodes.el = dialog = $.el('div', {
id: 'a-gallery',
- innerHTML: "\n
\n \n ×\n \n
\n
/ \n
\n
\n
![]()
\n
\n
\n
\n"
+ innerHTML: '\n
\n \n ×\n \n
\n
/ \n
\n
\n
![]()
\n
\n
\n
\n'
});
_ref = {
frame: '.gal-image',
@@ -9428,7 +9436,7 @@
}
if (Conf['Updater and Stats in Header']) {
this.dialog = sc = $.el('span', {
- innerHTML: "0 / 0" + (Conf["Page Count in Stats"] ? " / 0" : ""),
+ innerHTML: "0 / 0" + (Conf['Page Count in Stats'] ? ' / 0' : ''),
id: 'thread-stats',
title: 'Post Count / File Count' + (Conf["Page Count in Stats"] ? " / Page Count" : "")
});
@@ -9436,7 +9444,9 @@
return Header.addShortcut(sc);
});
} else {
- this.dialog = sc = UI.dialog('thread-stats', 'bottom: 0px; right: 0px;', "0 / 0" + (Conf["Page Count in Stats"] ? " / 0" : "") + "
");
+ this.dialog = sc = UI.dialog('thread-stats', 'bottom: 0px; right: 0px;', {
+ innerHTML: "0 / 0" + (Conf['Page Count in Stats'] ? ' / 0' : '') + "
"
+ });
$.ready((function(_this) {
return function() {
return $.add(d.body, sc);
@@ -9547,14 +9557,16 @@
}
if (Conf['Updater and Stats in Header']) {
this.dialog = sc = $.el('span', {
- innerHTML: "",
+ innerHTML: '',
id: 'updater'
});
$.ready(function() {
return Header.addShortcut(sc);
});
} else {
- this.dialog = sc = UI.dialog('updater', 'bottom: 0px; left: 0px;', "");
+ this.dialog = sc = UI.dialog('updater', 'bottom: 0px; left: 0px;', {
+ innerHTML: ''
+ });
$.addClass(doc, 'float');
$.ready((function(_this) {
return function() {
@@ -9956,7 +9968,9 @@
className: 'disabled fa fa-eye'
});
this.db = new DataBoard('watchedThreads', this.refresh, true);
- this.dialog = UI.dialog('thread-watcher', 'top: 50px; left: 0px;', "");
+ this.dialog = UI.dialog('thread-watcher', 'top: 50px; left: 0px;', {
+ innerHTML: ""
+ });
this.status = $('#watcher-status', this.dialog);
this.list = this.dialog.lastElementChild;
$.on(d, 'QRPostSuccessful', this.cb.post);
@@ -10767,7 +10781,7 @@
}
return Redirect.data = o;
},
- archives: [{"uid":0,"name":"Foolz","domain":"archive.foolz.us","http":true,"https":true,"software":"foolfuuka","boards":["a","biz","co","diy","gd","jp","m","sci","sp","tg","tv","vg","vp","vr","wsg"],"files":["a","biz","diy","gd","jp","m","sci","tg","vg","vp","vr","wsg"]},{"uid":1,"name":"NSFW Foolz","domain":"nsfw.foolz.us","http":true,"https":true,"software":"foolfuuka","boards":["u"],"files":["u"]},{"uid":2,"name":"The Dark Cave","domain":"archive.thedarkcave.org","http":true,"https":true,"software":"foolfuuka","boards":["c","int","out","po"],"files":["c","po"]},{"uid":3,"name":"4plebs Archive","domain":"archive.4plebs.org","http":true,"https":true,"software":"foolfuuka","boards":["adv","hr","o","pol","s4s","tg","trv","tv","x"],"files":["adv","hr","o","pol","s4s","tg","trv","tv","x"]},{"uid":18,"name":"4plebs Flash Archive","domain":"flash.4plebs.org","http":true,"https":true,"software":"foolfuuka","boards":["f"],"files":["f"]},{"uid":4,"name":"Nyafuu","domain":"archive.nyafuu.org","http":true,"https":true,"software":"foolfuuka","boards":["c","e","w","wg"],"files":["c","e","w","wg"]},{"uid":5,"name":"Love is Over","domain":"archive.loveisover.me","http":true,"https":true,"software":"foolfuuka","boards":["d","i","lgbt"],"files":["d","i","lgbt"]},{"uid":8,"name":"Rebecca Black Tech","domain":"rbt.asia","http":false,"https":true,"software":"fuuka","boards":["cgl","g","mu","w"],"files":["cgl","g","mu","w"]},{"uid":9,"name":"Heinessen","domain":"archive.heinessen.com","http":true,"https":false,"software":"fuuka","boards":["an","fit","k","mlp","r9k","toy"],"files":["an","fit","k","mlp","r9k","toy"]},{"uid":10,"name":"warosu","domain":"fuuka.warosu.org","http":false,"https":true,"software":"fuuka","boards":["3","biz","cgl","ck","diy","fa","g","ic","jp","lit","sci","tg","vr"],"files":["3","biz","cgl","ck","diy","fa","ic","jp","lit","sci","tg","vr"]},{"uid":15,"name":"fgts","domain":"fgts.eu","http":true,"https":true,"software":"foolfuuka","boards":["asp","b","cm","h","hc","hm","n","p","r","s","soc","y"],"files":["asp","cm","h","hc","hm","n","p","r","s","soc","y"]},{"uid":16,"name":"maware","domain":"archive.mawa.re","http":true,"https":false,"software":"foolfuuka","boards":["t"],"files":["t"]},{"uid":17,"name":"installgentoo.com","domain":"chan.installgentoo.com","http":true,"https":false,"software":"foolfuuka","boards":["g","t"],"files":["g","t"]},{"uid":19,"name":"Innovandalism Archive","domain":"boards.innovandalism.eu","http":true,"https":false,"software":"foolfuuka","boards":["v"],"files":[]},{"uid":13,"name":"Foolz Beta","domain":"beta.foolz.us","http":true,"https":true,"withCredentials":true,"software":"foolfuuka","boards":["a","biz","co","d","diy","gd","h","i","jp","m","mlp","s4s","sci","sp","tg","tv","u","v","vg","vp","vr","wsg"],"files":[]}],
+ archives: [{"uid":0,"name":"Foolz","domain":"archive.foolz.us","http":true,"https":true,"software":"foolfuuka","boards":["a","biz","co","diy","gd","jp","m","sci","sp","tg","tv","vg","vp","vr","wsg"],"files":["a","biz","diy","gd","jp","m","sci","tg","vg","vp","vr","wsg"]},{"uid":1,"name":"NSFW Foolz","domain":"nsfw.foolz.us","http":true,"https":true,"software":"foolfuuka","boards":["u"],"files":["u"]},{"uid":2,"name":"The Dark Cave","domain":"archive.thedarkcave.org","http":true,"https":true,"software":"foolfuuka","boards":["c","int","out","po"],"files":["c","po"]},{"uid":3,"name":"4plebs Archive","domain":"archive.4plebs.org","http":true,"https":true,"software":"foolfuuka","boards":["adv","hr","o","pol","s4s","tg","trv","tv","x"],"files":["adv","hr","o","pol","s4s","tg","trv","tv","x"]},{"uid":18,"name":"4plebs Flash Archive","domain":"flash.4plebs.org","http":true,"https":true,"software":"foolfuuka","boards":["f"],"files":["f"]},{"uid":4,"name":"Nyafuu","domain":"archive.nyafuu.org","http":true,"https":true,"software":"foolfuuka","boards":["c","e","w","wg"],"files":["c","e","w","wg"]},{"uid":5,"name":"Love is Over","domain":"archive.loveisover.me","http":true,"https":true,"software":"foolfuuka","boards":["d","i","lgbt"],"files":["d","i","lgbt"]},{"uid":8,"name":"Rebecca Black Tech","domain":"rbt.asia","http":false,"https":true,"software":"fuuka","boards":["cgl","g","mu","w"],"files":["cgl","g","mu","w"]},{"uid":9,"name":"Heinessen","domain":"archive.heinessen.com","http":true,"https":false,"software":"fuuka","boards":["an","fit","k","mlp","r9k","toy"],"files":["an","fit","k","mlp","r9k","toy"]},{"uid":10,"name":"warosu","domain":"fuuka.warosu.org","http":false,"https":true,"software":"fuuka","boards":["3","biz","cgl","ck","diy","fa","g","ic","jp","lit","sci","tg","vr"],"files":["3","biz","cgl","ck","diy","fa","ic","jp","lit","sci","tg","vr"]},{"uid":15,"name":"fgts","domain":"fgts.eu","http":true,"https":true,"software":"foolfuuka","boards":["asp","b","cm","h","hc","hm","n","p","r","s","soc","y"],"files":["asp","cm","h","hc","hm","n","p","r","s","soc","y"]},{"uid":16,"name":"maware","domain":"archive.mawa.re","http":true,"https":false,"software":"foolfuuka","boards":["t"],"files":["t"]},{"uid":17,"name":"installgentoo.com","domain":"chan.installgentoo.com","http":true,"https":false,"software":"foolfuuka","boards":["g","t"],"files":["g","t"]},{"uid":13,"name":"Foolz Beta","domain":"beta.foolz.us","http":true,"https":true,"withCredentials":true,"software":"foolfuuka","boards":["a","biz","co","d","diy","gd","h","i","jp","m","mlp","s4s","sci","sp","tg","tv","u","v","vg","vp","vr","wsg"],"files":[]},{"uid":19,"name":"Deniable Plausibility","domain":"boards.deniableplausibility.net","http":true,"https":false,"software":"foolfuuka","boards":["v"],"files":["v"]}],
to: function(dest, data) {
var archive;
archive = (dest === 'search' ? Redirect.data.thread : Redirect.data[dest])[data.boardID];
@@ -10940,11 +10954,10 @@
},
focus: function() {
var items, string, string2;
- this.textContent = this.innerHTML;
string = "" + g.BOARD + "." + this.className;
string2 = "" + string + ".orig";
items = {
- title: this.innerHTML
+ title: this.textContent
};
items[string] = '';
items[string2] = false;
@@ -10955,14 +10968,13 @@
});
},
blur: function() {
- this.innerHTML = this.textContent;
this.contentEditable = false;
return $.set("" + g.BOARD + "." + this.className, this.textContent);
}
},
custom: function(child) {
var cachedTest, string;
- cachedTest = child.innerHTML;
+ cachedTest = child.textContent;
string = "" + g.BOARD + "." + child.className;
$.on(child, 'click keydown focus blur', function(e) {
return Banner.cb[e.type].apply(this, [e]);
@@ -10973,12 +10985,12 @@
return;
}
if (Conf['Persistent Custom Board Titles']) {
- return child.innerHTML = title;
+ return child.textContent = title;
}
string2 = "" + string + ".orig";
return $.get(string2, cachedTest, function(itemb) {
if (cachedTest === itemb[string2]) {
- return child.innerHTML = title;
+ return child.textContent = title;
} else {
$.set(string, cachedTest);
return $.set(string2, cachedTest);
@@ -11427,11 +11439,11 @@
return this.file.text.innerHTML = "" + (FileInfo.format(Conf['fileInfo'], this)) + "";
},
format: function(formatString, post) {
- return formatString.replace(/%([A-Za-z])/g, function(s, c) {
+ return formatString.replace(/%([A-Za-z])|[^%]+/g, function(s, c) {
if (c in FileInfo.formatters) {
return FileInfo.formatters[c].call(post);
} else {
- return s;
+ return FileInfo.escape(s);
}
});
},
@@ -11451,7 +11463,7 @@
return name.replace(/[&"'<>]/g, function(c) {
return {
'&': '&',
- "'": ''',
+ "'": ''',
'"': '"',
'<': '<',
'>': '>'
@@ -13521,7 +13533,7 @@
});
},
initReady: function() {
- var GMver, err, href, i, passLink, styleSelector, test, v, _i, _len, _ref, _ref1;
+ var GMver, err, href, i, passLink, styleSelector, v, _i, _len, _ref, _ref1;
if ((_ref = d.title) === '4chan - Temporarily Offline' || _ref === '4chan - 404 Not Found') {
if (Conf['404 Redirect'] && g.VIEW === 'thread') {
href = Redirect.to('thread', {
@@ -13549,10 +13561,8 @@
} else {
$.event('4chanXInitFinished');
}
- test = $.el('span');
- test.classList.add('a', 'b');
- if (test.className !== 'a b' && Conf['Show Support Message']) {
- new Notice('warning', "Your version of Firefox is outdated (v26 minimum) and 4chan X may not operate correctly.", 30);
+ if (!Conf['Show Support Message']) {
+ return;
}
GMver = GM_info.version.split('.');
_ref1 = "1.14".split('.');
diff --git a/builds/crx.crx b/builds/crx.crx
index f348a1ecf..f935000c9 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 a8fa40d46..dcf1d0a4a 100755
--- a/builds/crx/manifest.json
+++ b/builds/crx/manifest.json
@@ -1,6 +1,6 @@
{
"name": "4chan X",
- "version": "1.7.36",
+ "version": "1.7.37",
"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 8a7df64a3..3a7d5cf7d 100644
--- a/builds/crx/script.js
+++ b/builds/crx/script.js
@@ -1,6 +1,6 @@
// Generated by CoffeeScript
/*
-* 4chan X - Version 1.7.36 - 2014-05-13
+* 4chan X - Version 1.7.37 - 2014-05-14
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
@@ -130,7 +130,7 @@
'Color User IDs': [false, 'Assign unique colors to user IDs on boards that use them'],
'Remove Spoilers': [false, 'Remove all spoilers in text.'],
'Reveal Spoilers': [false, 'Indicate spoilers if Remove Spoilers is enabled, or make the text appear hovered if Remove Spoiler is disabled.'],
- 'Show Support Message': [true, 'Warn if your browser is unsupported. 4chan X may not operate correctly on unsupported browser versions.']
+ 'Show Support Message': [true, 'Warn if your browser or configuration is unsupported and may cause 4chan X to not operate correctly.']
},
'Linkification': {
'Linkify': [true, 'Convert text into links where applicable.'],
@@ -348,7 +348,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.7.36',
+ VERSION: '1.7.37',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -528,15 +528,21 @@
};
$.addClass = function() {
- var className, el, _ref;
- el = arguments[0], className = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
- return (_ref = el.classList).add.apply(_ref, className);
+ var className, classNames, el, _i, _len;
+ el = arguments[0], classNames = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
+ for (_i = 0, _len = classNames.length; _i < _len; _i++) {
+ className = classNames[_i];
+ el.classList.add(className);
+ }
};
$.rmClass = function() {
- var className, el, _ref;
- el = arguments[0], className = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
- return (_ref = el.classList).remove.apply(_ref, className);
+ var className, classNames, el, _i, _len;
+ el = arguments[0], classNames = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
+ for (_i = 0, _len = classNames.length; _i < _len; _i++) {
+ className = classNames[_i];
+ el.classList.remove(className);
+ }
};
$.toggleClass = function(el, className) {
@@ -2325,7 +2331,7 @@
return;
}
el = $.el('span', {
- innerHTML: "Desktop notification permissions are not granted.\n[FAQ]
\n or "
+ innerHTML: '4chan X needs your permission to show desktop notifications.\n[FAQ]
\n or '
});
_ref = $$('button', el), authorize = _ref[0], disable = _ref[1];
$.on(authorize, 'click', function() {
@@ -3133,7 +3139,7 @@
o.file = {
name: data.filename + data.ext,
timestamp: "" + data.tim + data.ext,
- url: boardID === 'f' ? ("//i.4cdn.org/" + boardID + "/" + data.filename + data.ext).replace(/'/g, ''') : "//i.4cdn.org/" + boardID + "/" + data.tim + data.ext,
+ url: boardID === 'f' ? ("//i.4cdn.org/" + boardID + "/" + (encodeURIComponent(data.filename)) + data.ext).replace(/'/g, ''') : "//i.4cdn.org/" + boardID + "/" + data.tim + data.ext,
height: data.h,
width: data.w,
MD5: data.md5,
@@ -3213,7 +3219,7 @@
a.textContent = Build.shortFilename(filename);
shortFilename = a.innerHTML;
a.textContent = filename;
- filename = a.innerHTML.replace(/'/g, ''');
+ filename = a.innerHTML.replace(/'/g, ''');
fileDims = file.name.slice(-3) === 'pdf' ? 'PDF' : "" + file.width + "x" + file.height;
fileInfo = ("File:
" + file.timestamp + "") + ("-(" + fileSize + ", " + fileDims + (file.isSpoiler ? '' : ",
" + shortFilename + "")) + ")
";
fileHTML = "" + fileInfo + imgSrc + "
";
@@ -3562,13 +3568,13 @@
UI = (function() {
var Menu, dialog, drag, dragend, dragstart, hover, hoverend, hoverstart, touchend, touchmove;
- dialog = function(id, position, html) {
+ dialog = function(id, position, properties) {
var child, el, move, _i, _len, _ref;
el = $.el('div', {
className: 'dialog',
- innerHTML: html,
id: id
});
+ $.extend(el, properties);
el.style.cssText = position;
$.get("" + id + ".position", position, function(item) {
return el.style.cssText = item["" + id + ".position"];
@@ -6243,7 +6249,9 @@
dialog: function() {
var dialog, elm, event, i, items, name, node, nodes, prop, rules, save, setNode, _, _i, _len, _ref, _ref1, _ref2;
QR.nodes = nodes = {
- el: dialog = UI.dialog('qr', 'top:0;right:0;', " ")
+ el: dialog = UI.dialog('qr', 'top:0;right:0;', {
+ innerHTML: " "
+ })
};
setNode = function(name, query) {
return nodes[name] = $(query, dialog);
@@ -6299,7 +6307,7 @@
if (g.BOARD.ID === 'f') {
nodes.flashTag = $.el('select', {
name: 'filetag',
- innerHTML: "\n\n\n\n\n\n"
+ innerHTML: '\n\n\n\n\n\n'
});
nodes.flashTag.dataset["default"] = '4';
$.add(nodes.form, nodes.flashTag);
@@ -6481,7 +6489,7 @@
QR.cooldown.auto = false;
QR.status();
return QR.error($.el('span', {
- innerHTML: "4chan X encountered an error while posting. \n[Banned?] [More info]"
+ innerHTML: '4chan X encountered an error while posting. \n[Banned?] [More info]'
}));
}
};
@@ -7538,7 +7546,7 @@
nodes = Gallery.nodes = {};
nodes.el = dialog = $.el('div', {
id: 'a-gallery',
- innerHTML: "\n
\n \n ×\n \n
\n
/ \n
\n
\n
![]()
\n
\n
\n
\n"
+ innerHTML: '\n
\n \n ×\n \n
\n
/ \n
\n
\n
![]()
\n
\n
\n
\n'
});
_ref = {
frame: '.gal-image',
@@ -9425,7 +9433,7 @@
}
if (Conf['Updater and Stats in Header']) {
this.dialog = sc = $.el('span', {
- innerHTML: "0 / 0" + (Conf["Page Count in Stats"] ? " / 0" : ""),
+ innerHTML: "0 / 0" + (Conf['Page Count in Stats'] ? ' / 0' : ''),
id: 'thread-stats',
title: 'Post Count / File Count' + (Conf["Page Count in Stats"] ? " / Page Count" : "")
});
@@ -9433,7 +9441,9 @@
return Header.addShortcut(sc);
});
} else {
- this.dialog = sc = UI.dialog('thread-stats', 'bottom: 0px; right: 0px;', "0 / 0" + (Conf["Page Count in Stats"] ? " / 0" : "") + "
");
+ this.dialog = sc = UI.dialog('thread-stats', 'bottom: 0px; right: 0px;', {
+ innerHTML: "0 / 0" + (Conf['Page Count in Stats'] ? ' / 0' : '') + "
"
+ });
$.ready((function(_this) {
return function() {
return $.add(d.body, sc);
@@ -9544,14 +9554,16 @@
}
if (Conf['Updater and Stats in Header']) {
this.dialog = sc = $.el('span', {
- innerHTML: "",
+ innerHTML: '',
id: 'updater'
});
$.ready(function() {
return Header.addShortcut(sc);
});
} else {
- this.dialog = sc = UI.dialog('updater', 'bottom: 0px; left: 0px;', "");
+ this.dialog = sc = UI.dialog('updater', 'bottom: 0px; left: 0px;', {
+ innerHTML: ''
+ });
$.addClass(doc, 'float');
$.ready((function(_this) {
return function() {
@@ -9953,7 +9965,9 @@
className: 'disabled fa fa-eye'
});
this.db = new DataBoard('watchedThreads', this.refresh, true);
- this.dialog = UI.dialog('thread-watcher', 'top: 50px; left: 0px;', "");
+ this.dialog = UI.dialog('thread-watcher', 'top: 50px; left: 0px;', {
+ innerHTML: ""
+ });
this.status = $('#watcher-status', this.dialog);
this.list = this.dialog.lastElementChild;
$.on(d, 'QRPostSuccessful', this.cb.post);
@@ -10770,7 +10784,7 @@
}
return Redirect.data = o;
},
- archives: [{"uid":0,"name":"Foolz","domain":"archive.foolz.us","http":true,"https":true,"software":"foolfuuka","boards":["a","biz","co","diy","gd","jp","m","sci","sp","tg","tv","vg","vp","vr","wsg"],"files":["a","biz","diy","gd","jp","m","sci","tg","vg","vp","vr","wsg"]},{"uid":1,"name":"NSFW Foolz","domain":"nsfw.foolz.us","http":true,"https":true,"software":"foolfuuka","boards":["u"],"files":["u"]},{"uid":2,"name":"The Dark Cave","domain":"archive.thedarkcave.org","http":true,"https":true,"software":"foolfuuka","boards":["c","int","out","po"],"files":["c","po"]},{"uid":3,"name":"4plebs Archive","domain":"archive.4plebs.org","http":true,"https":true,"software":"foolfuuka","boards":["adv","hr","o","pol","s4s","tg","trv","tv","x"],"files":["adv","hr","o","pol","s4s","tg","trv","tv","x"]},{"uid":18,"name":"4plebs Flash Archive","domain":"flash.4plebs.org","http":true,"https":true,"software":"foolfuuka","boards":["f"],"files":["f"]},{"uid":4,"name":"Nyafuu","domain":"archive.nyafuu.org","http":true,"https":true,"software":"foolfuuka","boards":["c","e","w","wg"],"files":["c","e","w","wg"]},{"uid":5,"name":"Love is Over","domain":"archive.loveisover.me","http":true,"https":true,"software":"foolfuuka","boards":["d","i","lgbt"],"files":["d","i","lgbt"]},{"uid":8,"name":"Rebecca Black Tech","domain":"rbt.asia","http":false,"https":true,"software":"fuuka","boards":["cgl","g","mu","w"],"files":["cgl","g","mu","w"]},{"uid":9,"name":"Heinessen","domain":"archive.heinessen.com","http":true,"https":false,"software":"fuuka","boards":["an","fit","k","mlp","r9k","toy"],"files":["an","fit","k","mlp","r9k","toy"]},{"uid":10,"name":"warosu","domain":"fuuka.warosu.org","http":false,"https":true,"software":"fuuka","boards":["3","biz","cgl","ck","diy","fa","g","ic","jp","lit","sci","tg","vr"],"files":["3","biz","cgl","ck","diy","fa","ic","jp","lit","sci","tg","vr"]},{"uid":15,"name":"fgts","domain":"fgts.eu","http":true,"https":true,"software":"foolfuuka","boards":["asp","b","cm","h","hc","hm","n","p","r","s","soc","y"],"files":["asp","cm","h","hc","hm","n","p","r","s","soc","y"]},{"uid":16,"name":"maware","domain":"archive.mawa.re","http":true,"https":false,"software":"foolfuuka","boards":["t"],"files":["t"]},{"uid":17,"name":"installgentoo.com","domain":"chan.installgentoo.com","http":true,"https":false,"software":"foolfuuka","boards":["g","t"],"files":["g","t"]},{"uid":19,"name":"Innovandalism Archive","domain":"boards.innovandalism.eu","http":true,"https":false,"software":"foolfuuka","boards":["v"],"files":[]},{"uid":13,"name":"Foolz Beta","domain":"beta.foolz.us","http":true,"https":true,"withCredentials":true,"software":"foolfuuka","boards":["a","biz","co","d","diy","gd","h","i","jp","m","mlp","s4s","sci","sp","tg","tv","u","v","vg","vp","vr","wsg"],"files":[]}],
+ archives: [{"uid":0,"name":"Foolz","domain":"archive.foolz.us","http":true,"https":true,"software":"foolfuuka","boards":["a","biz","co","diy","gd","jp","m","sci","sp","tg","tv","vg","vp","vr","wsg"],"files":["a","biz","diy","gd","jp","m","sci","tg","vg","vp","vr","wsg"]},{"uid":1,"name":"NSFW Foolz","domain":"nsfw.foolz.us","http":true,"https":true,"software":"foolfuuka","boards":["u"],"files":["u"]},{"uid":2,"name":"The Dark Cave","domain":"archive.thedarkcave.org","http":true,"https":true,"software":"foolfuuka","boards":["c","int","out","po"],"files":["c","po"]},{"uid":3,"name":"4plebs Archive","domain":"archive.4plebs.org","http":true,"https":true,"software":"foolfuuka","boards":["adv","hr","o","pol","s4s","tg","trv","tv","x"],"files":["adv","hr","o","pol","s4s","tg","trv","tv","x"]},{"uid":18,"name":"4plebs Flash Archive","domain":"flash.4plebs.org","http":true,"https":true,"software":"foolfuuka","boards":["f"],"files":["f"]},{"uid":4,"name":"Nyafuu","domain":"archive.nyafuu.org","http":true,"https":true,"software":"foolfuuka","boards":["c","e","w","wg"],"files":["c","e","w","wg"]},{"uid":5,"name":"Love is Over","domain":"archive.loveisover.me","http":true,"https":true,"software":"foolfuuka","boards":["d","i","lgbt"],"files":["d","i","lgbt"]},{"uid":8,"name":"Rebecca Black Tech","domain":"rbt.asia","http":false,"https":true,"software":"fuuka","boards":["cgl","g","mu","w"],"files":["cgl","g","mu","w"]},{"uid":9,"name":"Heinessen","domain":"archive.heinessen.com","http":true,"https":false,"software":"fuuka","boards":["an","fit","k","mlp","r9k","toy"],"files":["an","fit","k","mlp","r9k","toy"]},{"uid":10,"name":"warosu","domain":"fuuka.warosu.org","http":false,"https":true,"software":"fuuka","boards":["3","biz","cgl","ck","diy","fa","g","ic","jp","lit","sci","tg","vr"],"files":["3","biz","cgl","ck","diy","fa","ic","jp","lit","sci","tg","vr"]},{"uid":15,"name":"fgts","domain":"fgts.eu","http":true,"https":true,"software":"foolfuuka","boards":["asp","b","cm","h","hc","hm","n","p","r","s","soc","y"],"files":["asp","cm","h","hc","hm","n","p","r","s","soc","y"]},{"uid":16,"name":"maware","domain":"archive.mawa.re","http":true,"https":false,"software":"foolfuuka","boards":["t"],"files":["t"]},{"uid":17,"name":"installgentoo.com","domain":"chan.installgentoo.com","http":true,"https":false,"software":"foolfuuka","boards":["g","t"],"files":["g","t"]},{"uid":13,"name":"Foolz Beta","domain":"beta.foolz.us","http":true,"https":true,"withCredentials":true,"software":"foolfuuka","boards":["a","biz","co","d","diy","gd","h","i","jp","m","mlp","s4s","sci","sp","tg","tv","u","v","vg","vp","vr","wsg"],"files":[]},{"uid":19,"name":"Deniable Plausibility","domain":"boards.deniableplausibility.net","http":true,"https":false,"software":"foolfuuka","boards":["v"],"files":["v"]}],
to: function(dest, data) {
var archive;
archive = (dest === 'search' ? Redirect.data.thread : Redirect.data[dest])[data.boardID];
@@ -10943,11 +10957,10 @@
},
focus: function() {
var items, string, string2;
- this.textContent = this.innerHTML;
string = "" + g.BOARD + "." + this.className;
string2 = "" + string + ".orig";
items = {
- title: this.innerHTML
+ title: this.textContent
};
items[string] = '';
items[string2] = false;
@@ -10958,14 +10971,13 @@
});
},
blur: function() {
- this.innerHTML = this.textContent;
this.contentEditable = false;
return $.set("" + g.BOARD + "." + this.className, this.textContent);
}
},
custom: function(child) {
var cachedTest, string;
- cachedTest = child.innerHTML;
+ cachedTest = child.textContent;
string = "" + g.BOARD + "." + child.className;
$.on(child, 'click keydown focus blur', function(e) {
return Banner.cb[e.type].apply(this, [e]);
@@ -10976,12 +10988,12 @@
return;
}
if (Conf['Persistent Custom Board Titles']) {
- return child.innerHTML = title;
+ return child.textContent = title;
}
string2 = "" + string + ".orig";
return $.get(string2, cachedTest, function(itemb) {
if (cachedTest === itemb[string2]) {
- return child.innerHTML = title;
+ return child.textContent = title;
} else {
$.set(string, cachedTest);
return $.set(string2, cachedTest);
@@ -11430,11 +11442,11 @@
return this.file.text.innerHTML = "" + (FileInfo.format(Conf['fileInfo'], this)) + "";
},
format: function(formatString, post) {
- return formatString.replace(/%([A-Za-z])/g, function(s, c) {
+ return formatString.replace(/%([A-Za-z])|[^%]+/g, function(s, c) {
if (c in FileInfo.formatters) {
return FileInfo.formatters[c].call(post);
} else {
- return s;
+ return FileInfo.escape(s);
}
});
},
@@ -11454,7 +11466,7 @@
return name.replace(/[&"'<>]/g, function(c) {
return {
'&': '&',
- "'": ''',
+ "'": ''',
'"': '"',
'<': '<',
'>': '>'
@@ -13554,6 +13566,9 @@
} else {
$.event('4chanXInitFinished');
}
+ if (!Conf['Show Support Message']) {
+ return;
+ }
try {
return localStorage.getItem('4chan-settings');
} catch (_error) {
diff --git a/builds/updates.xml b/builds/updates.xml
index ccd0456f1..452cf7b03 100644
--- a/builds/updates.xml
+++ b/builds/updates.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/package.json b/package.json
index a4d5ddee6..4669a9db4 100755
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "4chan-X",
- "version": "1.7.36",
+ "version": "1.7.37",
"description": "Cross-browser userscript for maximum lurking on 4chan.",
"meta": {
"name": "4chan X",