Merge pull request #498 from adamwolf/bookmarklet

Add a bookmarklet
This commit is contained in:
Nick Sweeting 2020-10-09 21:59:07 -04:00 committed by GitHub
commit 6c704fa8cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View file

@ -49,6 +49,12 @@
<small>(it's safe to leave this page, adding will continue in the background)</small>
</div>
</center>
{% if absolute_add_path %}
<center id="bookmarklet">
<p>Bookmark this link to quickly add to your archive:
<a href="javascript:void(window.open('{{ absolute_add_path }}?url='+document.location.href));">Add to ArchiveBox</a></p>
</center>
{% endif %}
<script>
document.getElementById('add-form').addEventListener('submit', function(event) {
setTimeout(function() {