@ -33,13 +33,21 @@ function exception_error(location, e, ext_info) {
var content = "<div class=\"fatalError\">" +
var content = "<div class=\"fatalError\">" +
"<pre>" + msg + "</pre>" ;
"<pre>" + msg + "</pre>" ;
content += "<form name=\"exceptionForm\" id=\"exceptionForm\" target=\"_blank\" " +
"action=\"http://tt-rss.org/report.php\" method=\"POST\">" ;
content += "<textarea style=\"display : none\" name=\"message\">" + msg + "</textarea>" ;
content += "<textarea style=\"display : none\" name=\"params\">N/A</textarea>" ;
if ( ext _info ) {
if ( ext _info ) {
content += "<div><b>Additional information:</b></div>" +
content += "<div><b>Additional information:</b></div>" +
"<textarea readonly=\"1\">" + ext _info + "</textarea>" ;
"<textarea name=\"xinfo\" readonly=\"1\">" + ext _info + "</textarea>" ;
}
}
content += "<div><b>Stack trace:</b></div>" +
content += "<div><b>Stack trace:</b></div>" +
"<textarea readonly=\"1\">" + e . stack + "</textarea>" ;
"<textarea name=\"stack\" readonly=\"1\">" + e . stack + "</textarea>" ;
content += "</form>" ;
content += "</div>" ;
content += "</div>" ;
@ -61,19 +69,14 @@ function exception_error(location, e, ext_info) {
report : function ( ) {
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." ) ) ) {
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 ( {
document . forms [ 'exceptionForm' ] . params . value = $H ( {
message : msg ,
xinfo : ext _info ,
stack : e . stack ,
browserName : navigator . appName ,
browserName : navigator . appName ,
browserVersion : navigator . appVersion ,
browserVersion : navigator . appVersion ,
browserPlatform : navigator . platform ,
browserPlatform : navigator . platform ,
browserCookies : navigator . cookieEnabled ,
browserCookies : navigator . cookieEnabled ,
} ) ;
} ) . toQueryString ( ) ;
var url = "http://tt-rss.org/report.php?" + params . toQueryString ( ) ;
window. open ( url ) ;
document . forms [ 'exceptionForm' ] . submit ( ) ;
}
}
} ,
} ,