diff --git a/CHANGELOG.md b/CHANGELOG.md
index bd43b102a..67d3b3976 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,9 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor
### v1.11.9
+**v1.11.9.1** *(2015-08-16)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.9.1/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.9.1/builds/4chan-X-noupdate.crx "Chromium version")]
+- Add more info and a reporting link to error messages.
+
**v1.11.9.0** *(2015-08-15)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.9.0/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.9.0/builds/4chan-X-noupdate.crx "Chromium version")]
- Based on v1.11.8.8.
- Add `Randomize Filename` option: Replaces filenames with a random timestamp from the past year.
diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx
index a6728ac5a..791708d25 100644
Binary files a/builds/4chan-X-beta.crx and b/builds/4chan-X-beta.crx differ
diff --git a/builds/4chan-X-beta.meta.js b/builds/4chan-X-beta.meta.js
index 9ff1be434..edb53bab2 100644
--- a/builds/4chan-X-beta.meta.js
+++ b/builds/4chan-X-beta.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X beta
-// @version 1.11.9.0
+// @version 1.11.9.1
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X-beta.user.js b/builds/4chan-X-beta.user.js
index d419f1761..18e85de7b 100644
--- a/builds/4chan-X-beta.user.js
+++ b/builds/4chan-X-beta.user.js
@@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X beta
-// @version 1.11.9.0
+// @version 1.11.9.1
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -412,7 +412,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.11.9.0',
+ VERSION: '1.11.9.1',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -4620,9 +4620,18 @@
};
Menu.prototype.insertEntry = function(entry, parent, data) {
- var k, len1, ref, subEntry, submenu;
+ var err, k, len1, ref, subEntry, submenu;
if (typeof entry.open === 'function') {
- if (!entry.open(data)) {
+ try {
+ if (!entry.open(data)) {
+ return;
+ }
+ } catch (_error) {
+ err = _error;
+ Main.handleErrors({
+ message: "Error in building the " + this.type + " menu.",
+ error: err
+ });
return;
}
}
@@ -12430,10 +12439,10 @@
return DeleteLink.nodes.links[+fileOnly].textContent = DeleteLink.linkText(fileOnly);
}
} else {
+ if (!fileOnly) {
+ QR.cooldown["delete"](post);
+ }
if (resDoc.title === 'Updating index...') {
- if (!fileOnly) {
- QR.cooldown["delete"](post);
- }
(post.origin || post).kill(fileOnly);
}
if (post.fullID === DeleteLink.post.fullID) {
@@ -17461,11 +17470,11 @@
error = errors[0];
}
if (error) {
- new Notice('error', Main.parseError(error), 15);
+ new Notice('error', Main.parseError(error, Main.reportLink([error])), 15);
return;
}
div = $.el('div', {
- innerHTML: E(errors.length) + " errors occurred. [show]"
+ innerHTML: E(errors.length) + " errors occurred." + Main.reportLink(errors).innerHTML + " [show]"
});
$.on(div.lastElementChild, 'click', function() {
var ref;
@@ -17480,16 +17489,34 @@
}
return new Notice('error', [div, logs], 30);
},
- parseError: function(data) {
- var error, message;
+ parseError: function(data, reportLink) {
+ var context, error, lines, message, ref, ref1;
c.error(data.message, data.error.stack);
message = $.el('div', {
- textContent: data.message
+ innerHTML: E(data.message) + (reportLink ? reportLink.innerHTML : "")
});
error = $.el('div', {
textContent: (data.error.name || 'Error') + ": " + (data.error.message || 'see console for details')
});
- return [message, error];
+ lines = ((ref = data.error.stack) != null ? (ref1 = ref.match(/\d+(?=:\d+\)?$)/mg)) != null ? ref1.join().replace(/^/, ' at ') : void 0 : void 0) || '';
+ context = $.el('div', {
+ textContent: "(4chan X ccd0 v" + g.VERSION + " userscript on " + $.engine + lines + ")"
+ });
+ return [message, error, context];
+ },
+ reportLink: function(errors) {
+ var data, details, ref, title, url;
+ data = errors[0];
+ title = data.message;
+ if (errors.length > 1) {
+ title += " (+" + (errors.length - 1) + " other errors)";
+ }
+ details = "[Please describe the steps needed to reproduce this error.]\n\nScript: 4chan X ccd0 v" + g.VERSION + " userscript\nUser agent: " + navigator.userAgent + "\nURL: " + location.href + "\n\n" + data.error + "\n" + (((ref = data.error.stack) != null ? ref.replace(data.error.toString(), '').trim() : void 0) || '');
+ details = details.replace(/file:\/{3}.+\//g, '');
+ url = "https://gitreports.com/issue/ccd0/4chan-x?issue_title=" + (encodeURIComponent(title)) + "&details=" + (encodeURIComponent(details));
+ return {
+ innerHTML: " [report]"
+ };
},
isThisPageLegit: function() {
var ref;
diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx
index 962c651a8..dfef53718 100644
Binary files a/builds/4chan-X-noupdate.crx and b/builds/4chan-X-noupdate.crx differ
diff --git a/builds/4chan-X-noupdate.user.js b/builds/4chan-X-noupdate.user.js
index ec627cb54..5c39f10e6 100644
--- a/builds/4chan-X-noupdate.user.js
+++ b/builds/4chan-X-noupdate.user.js
@@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
-// @version 1.11.9.0
+// @version 1.11.9.1
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -411,7 +411,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.11.9.0',
+ VERSION: '1.11.9.1',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -4619,9 +4619,18 @@
};
Menu.prototype.insertEntry = function(entry, parent, data) {
- var k, len1, ref, subEntry, submenu;
+ var err, k, len1, ref, subEntry, submenu;
if (typeof entry.open === 'function') {
- if (!entry.open(data)) {
+ try {
+ if (!entry.open(data)) {
+ return;
+ }
+ } catch (_error) {
+ err = _error;
+ Main.handleErrors({
+ message: "Error in building the " + this.type + " menu.",
+ error: err
+ });
return;
}
}
@@ -12429,10 +12438,10 @@
return DeleteLink.nodes.links[+fileOnly].textContent = DeleteLink.linkText(fileOnly);
}
} else {
+ if (!fileOnly) {
+ QR.cooldown["delete"](post);
+ }
if (resDoc.title === 'Updating index...') {
- if (!fileOnly) {
- QR.cooldown["delete"](post);
- }
(post.origin || post).kill(fileOnly);
}
if (post.fullID === DeleteLink.post.fullID) {
@@ -17460,11 +17469,11 @@
error = errors[0];
}
if (error) {
- new Notice('error', Main.parseError(error), 15);
+ new Notice('error', Main.parseError(error, Main.reportLink([error])), 15);
return;
}
div = $.el('div', {
- innerHTML: E(errors.length) + " errors occurred. [show]"
+ innerHTML: E(errors.length) + " errors occurred." + Main.reportLink(errors).innerHTML + " [show]"
});
$.on(div.lastElementChild, 'click', function() {
var ref;
@@ -17479,16 +17488,34 @@
}
return new Notice('error', [div, logs], 30);
},
- parseError: function(data) {
- var error, message;
+ parseError: function(data, reportLink) {
+ var context, error, lines, message, ref, ref1;
c.error(data.message, data.error.stack);
message = $.el('div', {
- textContent: data.message
+ innerHTML: E(data.message) + (reportLink ? reportLink.innerHTML : "")
});
error = $.el('div', {
textContent: (data.error.name || 'Error') + ": " + (data.error.message || 'see console for details')
});
- return [message, error];
+ lines = ((ref = data.error.stack) != null ? (ref1 = ref.match(/\d+(?=:\d+\)?$)/mg)) != null ? ref1.join().replace(/^/, ' at ') : void 0 : void 0) || '';
+ context = $.el('div', {
+ textContent: "(4chan X ccd0 v" + g.VERSION + " userscript on " + $.engine + lines + ")"
+ });
+ return [message, error, context];
+ },
+ reportLink: function(errors) {
+ var data, details, ref, title, url;
+ data = errors[0];
+ title = data.message;
+ if (errors.length > 1) {
+ title += " (+" + (errors.length - 1) + " other errors)";
+ }
+ details = "[Please describe the steps needed to reproduce this error.]\n\nScript: 4chan X ccd0 v" + g.VERSION + " userscript\nUser agent: " + navigator.userAgent + "\nURL: " + location.href + "\n\n" + data.error + "\n" + (((ref = data.error.stack) != null ? ref.replace(data.error.toString(), '').trim() : void 0) || '');
+ details = details.replace(/file:\/{3}.+\//g, '');
+ url = "https://gitreports.com/issue/ccd0/4chan-x?issue_title=" + (encodeURIComponent(title)) + "&details=" + (encodeURIComponent(details));
+ return {
+ innerHTML: " [report]"
+ };
},
isThisPageLegit: function() {
var ref;
diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx
index 838a67d51..f4eb487f3 100644
Binary files a/builds/4chan-X.crx and b/builds/4chan-X.crx differ
diff --git a/builds/4chan-X.meta.js b/builds/4chan-X.meta.js
index 930be48a2..bf6c7bce7 100644
--- a/builds/4chan-X.meta.js
+++ b/builds/4chan-X.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.11.9.0
+// @version 1.11.9.1
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js
index 59f3fa4d4..ff1c0e9af 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.11.9.0
+// @version 1.11.9.1
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -412,7 +412,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.11.9.0',
+ VERSION: '1.11.9.1',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -4620,9 +4620,18 @@
};
Menu.prototype.insertEntry = function(entry, parent, data) {
- var k, len1, ref, subEntry, submenu;
+ var err, k, len1, ref, subEntry, submenu;
if (typeof entry.open === 'function') {
- if (!entry.open(data)) {
+ try {
+ if (!entry.open(data)) {
+ return;
+ }
+ } catch (_error) {
+ err = _error;
+ Main.handleErrors({
+ message: "Error in building the " + this.type + " menu.",
+ error: err
+ });
return;
}
}
@@ -12430,10 +12439,10 @@
return DeleteLink.nodes.links[+fileOnly].textContent = DeleteLink.linkText(fileOnly);
}
} else {
+ if (!fileOnly) {
+ QR.cooldown["delete"](post);
+ }
if (resDoc.title === 'Updating index...') {
- if (!fileOnly) {
- QR.cooldown["delete"](post);
- }
(post.origin || post).kill(fileOnly);
}
if (post.fullID === DeleteLink.post.fullID) {
@@ -17461,11 +17470,11 @@
error = errors[0];
}
if (error) {
- new Notice('error', Main.parseError(error), 15);
+ new Notice('error', Main.parseError(error, Main.reportLink([error])), 15);
return;
}
div = $.el('div', {
- innerHTML: E(errors.length) + " errors occurred. [show]"
+ innerHTML: E(errors.length) + " errors occurred." + Main.reportLink(errors).innerHTML + " [show]"
});
$.on(div.lastElementChild, 'click', function() {
var ref;
@@ -17480,16 +17489,34 @@
}
return new Notice('error', [div, logs], 30);
},
- parseError: function(data) {
- var error, message;
+ parseError: function(data, reportLink) {
+ var context, error, lines, message, ref, ref1;
c.error(data.message, data.error.stack);
message = $.el('div', {
- textContent: data.message
+ innerHTML: E(data.message) + (reportLink ? reportLink.innerHTML : "")
});
error = $.el('div', {
textContent: (data.error.name || 'Error') + ": " + (data.error.message || 'see console for details')
});
- return [message, error];
+ lines = ((ref = data.error.stack) != null ? (ref1 = ref.match(/\d+(?=:\d+\)?$)/mg)) != null ? ref1.join().replace(/^/, ' at ') : void 0 : void 0) || '';
+ context = $.el('div', {
+ textContent: "(4chan X ccd0 v" + g.VERSION + " userscript on " + $.engine + lines + ")"
+ });
+ return [message, error, context];
+ },
+ reportLink: function(errors) {
+ var data, details, ref, title, url;
+ data = errors[0];
+ title = data.message;
+ if (errors.length > 1) {
+ title += " (+" + (errors.length - 1) + " other errors)";
+ }
+ details = "[Please describe the steps needed to reproduce this error.]\n\nScript: 4chan X ccd0 v" + g.VERSION + " userscript\nUser agent: " + navigator.userAgent + "\nURL: " + location.href + "\n\n" + data.error + "\n" + (((ref = data.error.stack) != null ? ref.replace(data.error.toString(), '').trim() : void 0) || '');
+ details = details.replace(/file:\/{3}.+\//g, '');
+ url = "https://gitreports.com/issue/ccd0/4chan-x?issue_title=" + (encodeURIComponent(title)) + "&details=" + (encodeURIComponent(details));
+ return {
+ innerHTML: " [report]"
+ };
},
isThisPageLegit: function() {
var ref;
diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip
index 7f679b9be..7ed93aa4b 100644
Binary files a/builds/4chan-X.zip and b/builds/4chan-X.zip differ
diff --git a/builds/updates-beta.xml b/builds/updates-beta.xml
index d2dc0e0a5..82b44f9ca 100644
--- a/builds/updates-beta.xml
+++ b/builds/updates-beta.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/builds/updates.xml b/builds/updates.xml
index fa24e1a66..3fbd64fd4 100644
--- a/builds/updates.xml
+++ b/builds/updates.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/package.json b/package.json
index 3f3837587..772aaa5a6 100644
--- a/package.json
+++ b/package.json
@@ -4,8 +4,8 @@
"meta": {
"name": "4chan X",
"fork": "ccd0",
- "version": "1.11.9.0",
- "date": "2015-08-15T18:45:44.807Z",
+ "version": "1.11.9.1",
+ "date": "2015-08-16T10:52:53.645Z",
"page": "https://www.4chan-x.net/",
"downloads": "https://www.4chan-x.net/builds/",
"oldVersions": "https://raw.githubusercontent.com/ccd0/4chan-x/",