2
0
mirror of https://github.com/jfmcbrayer/brutaldon synced 2025-01-31 07:55:10 +01:00
2019-11-08 10:06:45 -05:00

9 lines
297 B
Python

from django.urls import reverse
def bookmarklet_url(request):
share_url = request.build_absolute_uri(reverse("share"))
return {
"bookmarklet_url": f"javascript:location.href='{share_url}?url='+encodeURIComponent(location.href)+';title='+encodeURIComponent(document.title)"
}