Bookmarklet : Share the web page on Vivaldi Social
-
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
-
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
throughencondeURI()
as well. Adding it after&url=
should be enough. -
@AltCode Pretty sure you should be using
encodeURIComponent
instead ofencodeURI
, 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) -
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!
-
@sushubh I believe that should work now. Please let me know if it's still an issue.
-
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.
-
@thomasp Would it be possible to get two line spaces between title and link? Thanks!
-
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));