mirror of
https://github.com/jfmcbrayer/brutaldon
synced 2025-01-31 07:55:10 +01:00
9 lines
297 B
Python
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)"
|
|
}
|