diff --git a/functions.js b/functions.js
index 713b3b46a..411c82494 100644
--- a/functions.js
+++ b/functions.js
@@ -33,13 +33,21 @@ function exception_error(location, e, ext_info) {
var content = "
" +
"
" + msg + "
";
+ content += "";
content += "
";
@@ -49,7 +57,7 @@ function exception_error(location, e, ext_info) {
"onclick=\"dijit.byId('exceptionDlg').report()\">" +
__('Report to tt-rss.org') + " ";
content += "";
content += "";
@@ -61,19 +69,14 @@ function exception_error(location, e, ext_info) {
report: function() {
if (confirm(__("Are you sure to report this exception to tt-rss.org? The report will include your browser information. Your IP would be saved in the database."))) {
- var params = $H({
- message: msg,
- xinfo: ext_info,
- stack: e.stack,
+ document.forms['exceptionForm'].params.value = $H({
browserName: navigator.appName,
browserVersion: navigator.appVersion,
browserPlatform: navigator.platform,
browserCookies: navigator.cookieEnabled,
- });
+ }).toQueryString();
- var url = "http://tt-rss.org/report.php?" + params.toQueryString();
-
- window.open(url);
+ document.forms['exceptionForm'].submit();
}
},
@@ -92,8 +95,8 @@ function format_exception_error(location, e) {
if (e.fileName) {
var base_fname = e.fileName.substring(e.fileName.lastIndexOf("/") + 1);
-
- msg = "Exception: " + e.name + ", " + e.message +
+
+ msg = "Exception: " + e.name + ", " + e.message +
"\nFunction: " + location + "()" +
"\nLocation: " + base_fname + ":" + e.lineNumber;
@@ -110,14 +113,14 @@ function format_exception_error(location, e) {
function param_escape(arg) {
if (typeof encodeURIComponent != 'undefined')
- return encodeURIComponent(arg);
+ return encodeURIComponent(arg);
else
return escape(arg);
}
function param_unescape(arg) {
if (typeof decodeURIComponent != 'undefined')
- return decodeURIComponent(arg);
+ return decodeURIComponent(arg);
else
return unescape(arg);
}
@@ -129,7 +132,7 @@ function hide_notify() {
if (n) {
n.style.display = "none";
}
-}
+}
function notify_silent_next() {
notify_silent = true;
@@ -213,16 +216,16 @@ function notify_info(msg, no_hide) {
}
function setCookie(name, value, lifetime, path, domain, secure) {
-
+
var d = false;
-
+
if (lifetime) {
d = new Date();
d.setTime(d.getTime() + (lifetime * 1000));
}
console.log("setCookie: " + name + " => " + value + ": " + d);
-
+
int_setCookie(name, value, d, path, domain, secure);
}
@@ -243,7 +246,7 @@ function delCookie(name, path, domain) {
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}
}
-
+
function getCookie(name) {
@@ -281,10 +284,10 @@ function gotoExportOpml() {
* * @author Sundar Dorai-Raj
* * Email: sdoraira@vt.edu
* * This program is free software; you can redistribute it and/or
- * * modify it under the terms of the GNU General Public License
- * * as published by the Free Software Foundation; either version 2
- * * of the License, or (at your option) any later version,
- * * provided that any use properly credits the author.
+ * * modify it under the terms of the GNU General Public License
+ * * as published by the Free Software Foundation; either version 2
+ * * of the License, or (at your option) any later version,
+ * * provided that any use properly credits the author.
* * This program is distributed in the hope that it will be useful,
* * but WITHOUT ANY WARRANTY; without even the implied warranty of
* * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -372,7 +375,7 @@ function dropboxSelect(e, v) {
function getURLParam(param){
return String(window.location.href).parseQuery()[param];
-}
+}
function leading_zero(p) {
var s = String(p);
@@ -449,7 +452,7 @@ function infobox_callback2(transport) {
title = title.firstChild.nodeValue;
var content = transport.responseXML.getElementsByTagName("content")[0];
-
+
content = content.firstChild.nodeValue;
if (!dialog) {
@@ -510,14 +513,14 @@ function setInitParam(key, value) {
}
function fatalError(code, msg, ext_info) {
- try {
+ try {
if (code == 6) {
- window.location.href = "tt-rss.php";
+ window.location.href = "tt-rss.php";
} else if (code == 5) {
window.location.href = "db-updater.php";
} else {
-
+
if (msg == "") msg = "Unknown error";
if (ext_info) {
@@ -529,13 +532,13 @@ function fatalError(code, msg, ext_info) {
if (ERRORS && ERRORS[code] && !msg) {
msg = ERRORS[code];
}
-
+
var content = "