[Google Chrome] Notifications

[Google Chrome] Notifications

Is there a way to turn certain sites off from notifications?
Theres some sites that I can give two sh*ts about xD

Annoying when I have to go to them just to get that notification from keeping to pop up.
 
Any thoughts on why I might be getting two alerts with different images for my site? Don't duplicates on the other XF sites it checks.

upload_2014-2-12_18-17-37.webp
 
I have no idea why that would happen and I find it odd that you have two different images for it too. I'm probably going to register for your site in a little bit.
 
I only get the double alert for my own site (which I'm logged in as an admin all the time). Don't get it for here, Adminextra.com or any other XF site.
 
Just noticed it displayed double notification on a different XF site.
 

Attachments

  • upload_2014-2-13_12-21-54.webp
    upload_2014-2-13_12-21-54.webp
    9.7 KB · Views: 5
Is there any pattern to when this happens? Like after you leave your computer asleep for hours, when you first turn it on, etc...
 
Is there any pattern to when this happens? Like after you leave your computer asleep for hours, when you first turn it on, etc...
It's been on since 9am this morning after being fully shutdown last night (not suspended). To be honest it's difficult to notice a pattern as I have two screens so I'm not always looking when it pops up.

This last instance at least showed the same correct image on each notification though!

upload_2014-2-13_12-56-57.webp
 
Could you send me the unpackaged version so I can break it apart?

The viewing unknown page error is annoying me.
 
The important part you need is the ajax request.

Code:
                            var xhr = new XMLHttpRequest();
                            xhr.open("GET", url + '?_xfResponseType=json', true);
                            xhr.setRequestHeader('X_REQUESTED_WITH', 'XMLHttpRequest');
                            xhr.onreadystatechange = function()
                            {

                            }
                           xhr.send();

The part of your forum that should tell it not to update the session table if that header is sent can be found here (looking at v1.2.4).
/library/XenForo/Controller.php

PHP:
   public function canUpdateSessionActivity($controllerName, $action, &$newState)
    {
        // don't update session activity for an AJAX request
        if ($this->_request->isXmlHttpRequest())
        {
            return false;
        }

        return true;
    }

My theory is that some people have a server setting that rejects headers sent from an external referrer.
 
I think I found the issue, and it lies with Apache 2.4 :)

From Apache 2.4, 'unsafe' headers were ignored and not passed to the environment variables. These include headers with underscores, like the header that xenforo checks for and that is being passed in.
 
It can be fixed server side by adding this to your htaccess file :)

Code:
SetEnvIfNoCase ^X.REQUESTED.WITH$ ^(.*)$ fix_accept_encoding=$1
RequestHeader set X-REQUESTED-WITH %{fix_accept_encoding}e env=fix_accept_encoding
 
Good trouble shooting. I figured it had something to do with that because internal Ajax requests that set the same header and don't update the session activity don't have any issue.
 
No worries, it only took me around 2 hours or so to figure it out :P

Now, I think I'll get some sleep ;)

Liam
 
Just a little update on my workaround, I haven't had Matthew appear all day, so either he uninstalled the extension, hasn't been using Chrome, or the workaround works :)

Liam
 
Top Bottom