Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add a bookmarklet feature for quick short URLs creation #614

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions resources/views/admin.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,21 @@
</div>
</div>

<h4>Bookmarklet: </h4>
<div class='row'>
<div class='col-md-8'>
<a class='btn btn-info' onclick="return false;" href='javascript:u=encodeURIComponent(location.href);s="{{env("APP_PROTOCOL")}}{{env("APP_ADDRESS")}}/api/v2/action/shorten?key={{$api_key}}&url="+u;window.open(s,"Shortened URL","location=no,width=400,height=300");'>Shorten</a> (Drag it to your bookmarks bar to use as a shortcut!)
</div>
</div>

<h4>API Quota: </h4>
<h2 class='api-quota'>
<h4 class='api-quota'>
@if ($api_quota == -1)
unlimited
@else
<code>{{$api_quota}}</code>
@endif
</h2>
</h4>
<span> requests per minute</span>
</div>
@endif
Expand Down