]> git.wh0rd.org Git - tt-rss.git/commitdiff
workaround for xmlhttp permission denied in viewfeed footer (closes #73)
authorAndrew Dolgov <fox@madoka.spb.ru>
Sun, 18 Jun 2006 15:46:32 +0000 (16:46 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Sun, 18 Jun 2006 15:46:32 +0000 (16:46 +0100)
backend.php
functions.js

index 39b0f5f39d2d5f58f738148bef34ac12308ae720..debb55c5527912223c6e9d4e14f50a49cc036416 100644 (file)
                        <script type=\"text/javascript\">
                                try {
                                        document.onkeydown = hotkey_handler;
-                                       parent.update_all_counters(\"$feed\");
+                                       try {
+                                               parent.update_all_counters(\"$feed\");
+                                       } catch (e) {
+                                               // this is workaround against mysterious permission
+                                               // denied feature/bug of firefox (ticket #73)
+                                               // if call from this context failed - ignore silently
+                                               exception_error(\"viewfeed/footer1/counters\", e, true);
+                                       }
                                } catch (e) {
                                        exception_error(\"viewfeed/footer1\", e);
                                }
index 93a36b587d24568fe653bdcd5685748ad358009b..c6f1e0d034c8b32ecbba5ceb41b203c9c9f0e4d7 100644 (file)
@@ -7,7 +7,7 @@ function browser_has_opacity() {
                navigator.userAgent.match("Opera") != null;
 }
 
-function exception_error(location, e) {
+function exception_error(location, e, silent) {
        var msg;
 
        if (e.fileName) {
@@ -23,7 +23,9 @@ function exception_error(location, e) {
 
        debug("<b>EXCEPTION: " + msg + "</b>");
 
-       alert(msg);
+       if (!silent) {
+               alert(msg);
+       }
 }
 
 function disableHotkeys() {