Vivaldi Forum mod



  • @derday It's a nodeBB standard feature, it's been there since the switch.



  • I don't know if this'll ever make it into the released forum mod, but I've re-worked my custom "native notifications" mod for the forum, so that it reads directly from the websocket that sends the notifications and turns them into notifications that appear on the windows 10 desktop, even if your forum tab is in the background.

    0_1541712918266_95da4b93-85b8-41f6-b9ac-ed2f43bf2215-image.png

    It includes this beautiful hack gem of javascript which took me ages to figure out:

    const old = WebSocket.prototype.send;
    WebSocket.prototype.send = function(){
        this.addEventListener("message", function socketMessage(event){
            document.dispatchEvent(new CustomEvent("vmNotifyMsg", {
                detail: {
                    socketMessage: event.data
                }
            }));
        }.bind(this));
        WebSocket.prototype.send = old;
        old.apply(this, arguments);
    };
    


  • No more input needed



  • Notifications working on android via firefox

    (ft @hlehyaric )

    0_1541785316293_Screenshot_20181109-173852.jpg

    If anyone wants to try notifications for themselves, I have a separate branch for it here and for firefox for android



  • What I thought about is making a button to dismiss the notification on top. Reading it once should be enough. When a new one pops up it would show again. Think this would make sense.



  • @luetage Which notification do you mean?



  • @lonm The footer notification. No one needs it after reading it once. Currently working on it.



  • version 1.62
    Option to dismiss community notifications.

    0_1541929595307_Screenshot 2018-11-11 10.42.54.png

    The notifications on top are helpful to get the attention of users, but they also get in the way after having read them. The new version will by default only show the notification on page load and hide it once you navigate away. Theres also the option to dismiss the current notification altogether – click "Dismiss" at the end of the notification to do so. Now the notification won't show again, that is until the Vivaldi team writes a new one or changes it. However, you can still access the content of a dismissed notification by opening the console in devtools.

    0_1541930119723_Screenshot 2018-11-11 10.45.06.png


    Until Vivaldi comes up with another solution to community notifications and status messages, this should serve us just fine. As an added bonus this modification also takes care of the margin errors on profile and group pages.



  • @luetage That works great! wizard



  • weeping I just spent an hour trying to figure out why firefox wouldn't load the extension when vivaldi handles it fine. Turns out if there's even a minor error in any file, it will silently fail and just not tell you why. GG mozilla.



  • @lonm Installing chrome extensions on FF is possible, but tiresome. I suspect you are currently the only VFM user on Android. It's not meant to be. I think we should start providing proper support when Vivaldi comes out with a mobile browser.



  • @luetage on one hand, yes there's not much point for mobile.

    On the other hand, what about the poor users of Vivaldi on touch windows tablets who can't drag their toolbar buttons around.

    On yet another third hand, it's pretty much working now anyway.



  • @lonm You are right, and we can implement it, I really don't mind and I think you're doing a great job. I'm just throwing my thoughts in. One of them being that this would be promoting the usage of a third party browser. Does it matter? I really can't tell.

    My original idea was to write an android app for vivaldi forum. – But what was stopping me was the thought that it's kind of silly. Once Vivaldi browser for Android comes out Vivaldi Forum should be accessed with Vivaldi browser of course. I hope Vivaldi will support extensions, then we will be able to mess with the mobile view and operation how we prefer.



  • @luetage writing a dedicated app for Vivaldi forum is probably a bit overkill. It's currently written as a Web app which means any pwa compatible mobile browser offers a add to homescreen button which basically makes it an app already.

    Turns out Firefox can also kind of add extensions to PWAs which I wasn't aware of.

    Regardless, I wouldn't bother listing the extension in the Mozilla Web store anyway. I doubt that would offer any real advertisement for Vivaldi anyway.



  • Good work guys, @luetage I'm back from my hols so I will take a look to see if there is anything I can help with soon, I don't want to add my newest stylish code though because I'm guessing you've made changes to it in the mod.



  • @wiiija Welcome back. Just clone the repo and exchange the sprucey code with your own. Then work on it while running the mod + modifications. It's the only way to ensure compatibility.



  • version 1.64

    • mobile view fixes
    • notification fixes

    Originally this should have been an update targeting the mobile menus and pagination only (theming more consistent now), but as it turns out Vivaldi changed the notification setup again today. The footer-notification encapsulates site content now, therefore when it's being hidden, the content of most pages simply disappears (not all pages, the screw up isn't consistent……). I pushed an update that fixes this just now, but you still might encounter the issue, if your version of Vivaldi Forum mod hasn't been updated yet.



  • @luetage Many thanks for the quick fixes. I noticed this morning the issue with notifications and I had to disable VF Mod. Pfff, the site is so boring without the extension. So, thank again for your fast efficient reaction.



  • @hlehyaric No problem. Next time you notice an issue complain immediately, please. I only stumbled upon this by accident pingu



  • @luetage Oh yes! Thanks a lot! Like hlehyaric, I had to disable the extension as well and it was quite a shock to get back to the standard forum layout... bigeyes


 

Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.