diff options
author | Andrew Dolgov <[email protected]> | 2014-03-14 14:08:32 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2014-03-14 14:08:32 +0400 |
commit | cbcf6517dca6d3c0ba32745969b6fe4d73d704ba (patch) | |
tree | 0441ade2783db71a5fa2e785006eaccf97d19afc /js/functions.js | |
parent | df63125dd7797064f0bbd5f70267c8b5e1fb36c6 (diff) |
Revert "exception handler: remove report to tt-rss.org"
This reverts commit b55aec078c18b3db85d34329be3f01364e383667.
Diffstat (limited to 'js/functions.js')
-rw-r--r-- | js/functions.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/js/functions.js b/js/functions.js index 9e40ecf51..1ad15fcc6 100644 --- a/js/functions.js +++ b/js/functions.js @@ -88,6 +88,9 @@ function exception_error(location, e, ext_info) { content += "<div class='dlgButtons'>"; + content += "<button dojoType=\"dijit.form.Button\""+ + "onclick=\"dijit.byId('exceptionDlg').report()\">" + + __('Report to tt-rss.org') + "</button> "; content += "<button dojoType=\"dijit.form.Button\" "+ "onclick=\"dijit.byId('exceptionDlg').hide()\">" + __('Close') + "</button>"; @@ -100,6 +103,20 @@ function exception_error(location, e, ext_info) { id: "exceptionDlg", title: "Unhandled exception", style: "width: 600px", + 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."))) { + + document.forms['exceptionForm'].params.value = $H({ + browserName: navigator.appName, + browserVersion: navigator.appVersion, + browserPlatform: navigator.platform, + browserCookies: navigator.cookieEnabled, + }).toQueryString(); + + document.forms['exceptionForm'].submit(); + + } + }, content: content}); dialog.show(); |