Show desktop notifications off?

onne
onne
Offline
0
Hi Germi,

I noticed that all new users see the 'Show desktop notifications' in their browser and personally i don't like it when sites do that. I know it's one click but it's not user friendly in my opinion. Now i tried to disable it by going to config/general/Show desktop notifications but i still get the message...

What part am i missing?
Responses (9)
  • Accepted Answer

    Wednesday, October 26 2016, 11:21 AM - #Permalink
    0
    if you want to get ride of this you can do it in file:

    /plugin/muscolplayers/jwplayer/jwplayer_functions.js

    just remove lines 169 to 172.
    The reply is currently minimized Show
  • Accepted Answer

    onne
    onne
    Offline
    Thursday, October 27 2016, 02:29 PM - #Permalink
    0
    Hi Germi,

    I looked at a slightly different path as the one you mentioned aint there

    /plugins/muscolplayers/jwplayer/jwplayer/jwplayer_functions.js

    In there i have this code starting at line 165 until the end of the file


    ========
    //http://jsbin.com/ziwod/2/edit?html,js,output
    // request permission on page load
    document.addEventListener('DOMContentLoaded', function () {
    if (Notification.permission !== "granted")
    Notification.requestPermission();
    });

    function notify_song(song) {
    if (desktopnotifications) {
    if (!Notification) {
    alert('Desktop notifications not available in your browser. Try Chromium.');
    return;
    }

    if (Notification.permission !== "granted")
    Notification.requestPermission();
    else {
    var notification = new Notification(song.item.title, {
    icon: song.item.image,
    body: song.item.description
    });

    setTimeout(function(){
    notification.close();
    },3000);

    notification.onclick = function () {
    //window.open("http://stackoverflow.com/a/13328397/1269037");
    };

    }
    }
    }

    =======

    How should i adjust this?
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, October 27 2016, 05:57 PM - #Permalink
    0
    but this is new code?

    you really only needed to do what I indicated above...
    The reply is currently minimized Show
  • Accepted Answer

    onne
    onne
    Offline
    Thursday, October 27 2016, 06:51 PM - #Permalink
    0
    It's the default file..i never touched it. but again, the path you mention aint in my ftp? that file aint there...

    i have (at least i think this is the file you mean)
    /plugins/muscolplayers/jwplayer/jwplayer/jwplayer_functions.js

    not:

    /plugin/muscolplayers/jwplayer/jwplayer_functions.js
    The reply is currently minimized Show
  • Accepted Answer

    Friday, October 28 2016, 03:10 PM - #Permalink
    0
    oh well, come on! ;) I typed wrongly /jwplayer instead of typing it two times... ;)

    yes, that's the file! ;) ;)

    /plugins/muscolplayers/jwplayer/jwplayer/jwplayer_functions.js
    The reply is currently minimized Show
  • Accepted Answer

    onne
    onne
    Offline
    Friday, October 28 2016, 04:09 PM - #Permalink
    0
    hehe, thought so ;)

    But then my question remains... the code i see up there is the one i posted. How Can you share the adjusted sample for me?
    The reply is currently minimized Show
  • Accepted Answer

    Monday, October 31 2016, 10:09 AM - #Permalink
    0
    where you see this:

    document.addEventListener('DOMContentLoaded', function () {
    if (Notification.permission !== "granted")
    Notification.requestPermission();
    });


    just REMOVE all this.
    The reply is currently minimized Show
  • Accepted Answer

    onne
    onne
    Offline
    Friday, November 04 2016, 10:02 PM - #Permalink
    0
    Aint this strange...you replied here right? it's gone...
    The reply is currently minimized Show
  • Accepted Answer

    onne
    onne
    Offline
    Saturday, November 05 2016, 09:41 PM - #Permalink
    0
    Nevermind my post above...

    I'm bringing this up again as i still get notifications in browsers where i did not accept and my phone. Are you sure all is covered by removing that code?
    The reply is currently minimized Show
Your Reply