]> git.wh0rd.org Git - tt-rss.git/commitdiff
Revert "exception handler: remove report to tt-rss.org"
authorAndrew Dolgov <noreply@fakecake.org>
Fri, 14 Mar 2014 10:08:32 +0000 (14:08 +0400)
committerAndrew Dolgov <noreply@fakecake.org>
Fri, 14 Mar 2014 10:08:32 +0000 (14:08 +0400)
This reverts commit b55aec078c18b3db85d34329be3f01364e383667.

js/functions.js

index 9e40ecf51669ad17beb2a9576c08c0f1f6387be4..1ad15fcc672a2d7c3c45bbdc9273f6d91f2ccdae 100644 (file)
@@ -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();