About bookmarking posts



  • If you click on the three dots on the bottom of a post, you can select to bookmark the post in the drop down menu. Maybe I'm overlooking something, but how do I access my bookmarked posts? I cannot find a page which would consolidate them into an overview.


  • Vivaldi Translator

    @luetage
    Probably suppose to be this;
    0_1496651419614_maim_2017-06-05_15-28-37.png
    Broken. :grin:



  • Yep, that's what I thought too, but it's not working. And besides it should say bookmarked instead of favourites to avoid confusion.


  • Moderator



  • Ahh, so there is already a solution -- just use a different link
    https://forum.vivaldi.net/user/username/bookmarks
    That's easy enough to fix, I think I'll do it for myself, waiting on this to be implemented could prove to be tiring :P


  • Moderator

    Oh, yes, it works with URL …/bookmarks instead of …/favorites \o/



  • This is much harder to fix than I first expected. It turns out Vivaldi forum changes page code dynamically, this means if the page isn't freshly loaded, the code won't be injected. I'm a javascript noob, but I'll post a working solution here now. It's ugly and if someone knows an easier way please enlighten me :D

    var bookmarks = document.querySelector(".dropdown-menu.dropdown-menu-right li:nth-of-type(12) a");
    bookmarks.innerHTML = "Bookmarked";
    bookmarks.href = "/user/username/bookmarks";
    
    var oldLocation = location.href;
    setInterval(function() {
    	if(location.href != oldLocation) {
    		var bookmarks = document.querySelector(".dropdown-menu.dropdown-menu-right li:nth-of-type(12) a");
    		bookmarks.innerHTML = "Bookmarked";
    		bookmarks.href = "/user/username/bookmarks";
            oldLocation = location.href;
    	}
    }, 500);
    

    I wanted to use hashchange, but I couldn't get it to work :/



  • I have found a better solution, because running the code every 500ms is silly. Now it runs on every click. (lol)

    document.addEventListener('click', bookmarked);
    
    function bookmarked(e) {
    	var favourites = document.querySelector(".dropdown-menu.dropdown-menu-right li:nth-of-type(12) a");
    	favourites.innerHTML = "Bookmarked";
    	favourites.href = "/user/username/bookmarks";  
    };
    

Log in to reply
 

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