Vivaldi

  • Browser
  • Mail
  • News
  • Community
  • About

Navigation

    • Browser
    • Mail
    • News
    • Community
    • About
    • Register
    • Login
    • Search
    HomeBlogsForumHelpThemes
    • Home
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. Community & Services
    3. Vivaldi Social
    4. Bookmarklet : Share the web page on Vivaldi Social

    Bookmarklet : Share the web page on Vivaldi Social

    Vivaldi Social
    4
    8
    664
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • shifte
      shifte last edited by

      javascript:window.open("https://social.vivaldi.net/share?text="+encodeURI(document.title+" "+location.href));
      

      Reference URL : https://blog.8tak4.com/post/169884826880/share-on-mastodon-bookmarklet

      1 Reply Last reply Reply Quote 9
      • AltCode
        AltCode last edited by

        Works great! Though I made a slight modification.

        javascript:window.open("https://social.vivaldi.net/share?text="+encodeURI(document.title)+"&url="+location.href);
        

        As far as I can tell, there shouldn't be a need to pass location.href through encondeURI() as well. Adding it after &url= should be enough.

        When life gives you lemons, don't make lemonade. Make life take the lemons back! Get mad!

        thomasp 1 Reply Last reply Reply Quote 1
        • thomasp
          thomasp Vivaldi Team @AltCode last edited by thomasp

          @AltCode Pretty sure you should be using encodeURIComponent instead of encodeURI, and use it on both parameters separately, ie:

          javascript:window.open("https://social.vivaldi.net/share?text="+encodeURIComponent(document.title)+"&url="+encodeURIComponent(location.href));
          

          (otherwise any & in either value will cause problems)

          System Administrator / Backend Developer

          1 Reply Last reply Reply Quote 2
          • sushubh
            sushubh last edited by sushubh

            I can confirm that the original bookmarklet code does not work on some domains. On them, it only picks the title tag and ignores the URL. I would try out the second and third code if I come across such a web page in future! (Found one https://artsandculture.google.com/play)

            On related note, I have noticed that Vivaldi's Cloudflare settings do not like Hindi language in url. When I use this bookmarklet (or the share intent on my phone) on this YouTube video for instance, Vivaldi Social ends up showing a Cloudflare error. Not sure if I should create a bug report for it in a new thread.

            https://www.youtube.com/watch?v=dJidBIuPW4o

            Share URL generated that shows the error:

            https://social.vivaldi.net/share?text=%E0%A4%95%E0%A4%B9%E0%A4%BE%E0%A4%A8%E0%A5%80%20Gujarat%20%E0%A4%95%E0%A5%87%20%E0%A4%89%E0%A4%A8%20%E0%A4%97%E0%A4%BE%E0%A4%82%E0%A4%B5%E0%A5%8B%E0%A4%82%20%E0%A4%95%E0%A5%80%20%E0%A4%9C%E0%A5%8B%20%E0%A4%96%E0%A5%81%E0%A4%A6%20%E0%A4%95%E0%A5%8B%20%E2%80%98Hindu%20Rashtra%20%E0%A4%97%E0%A4%BE%E0%A4%82%E0%A4%B5%E2%80%99%20%E0%A4%98%E0%A5%8B%E0%A4%B7%E0%A4%BF%E0%A4%A4%20%E0%A4%95%E0%A4%B0%20%E0%A4%9A%E0%A5%81%E0%A4%95%E0%A5%87%20%E0%A4%B9%E0%A5%88%E0%A4%82%20-%20YouTube%20https://www.youtube.com/watch?v=dJidBIuPW4o

            Just noticed that it does work sometimes. Other times you get a cloudflare error. Weird behavior.

            Let's see if Akismet lets this post through!

            thomasp 1 Reply Last reply Reply Quote 0
            • thomasp
              thomasp Vivaldi Team @sushubh last edited by

              @sushubh I believe that should work now. Please let me know if it's still an issue.

              System Administrator / Backend Developer

              sushubh 1 Reply Last reply Reply Quote 3
              • sushubh
                sushubh last edited by sushubh

                It again errored out on sharing this link with title tag 😛

                https://themooknayak.in/despite-the-ban-three-associate-companies-continued-to-do-business-in-india-by-forming-union-carbide/

                It's not that big of a deal though. I can share these links manually or without title tag.

                1 Reply Last reply Reply Quote 0
                • sushubh
                  sushubh @thomasp last edited by

                  @thomasp Would it be possible to get two line spaces between title and link? Thanks!

                  sushubh 1 Reply Last reply Reply Quote 0
                  • sushubh
                    sushubh @sushubh last edited by

                    Got it working if someone else likes line spaces between title and url!

                    javascript:window.open("https://social.vivaldi.net/share?text="+encodeURIComponent(document.title)+"&url="+encodeURIComponent("\n\n"+location.href));

                    1 Reply Last reply Reply Quote 2
                    Loading More Posts
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes
                    • Reply as topic
                    Log in to reply
                    • 1 / 1
                    • First post
                      Last post

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

                    Copyright © Vivaldi Technologies™ — All rights reserved. Privacy Policy | Code of conduct | Terms of use | Vivaldi Status