A Minimalistic and Privary-by-default URL sortener
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
884 B

{% extends "base.html" %}
{% block script %}
<script>
function run() {
journalmarks_loadkey().then(function() {
var encurl = JSON.parse({{ j.content|tojson|safe }});
journalmarks_decrypturl(encurl).then(function (url) {
document.getElementById('url').href = url.url;
document.getElementById('url').innerText = url.url;
document.getElementById('url').click();
});
}).catch(function() {
deleteKey();
window.location.href = '{{ url_for('login') }}';
});
}
if (document.readyState!='loading') run();
else if (document.addEventListener) document.addEventListener('DOMContentLoaded', run);
else document.attachEvent('onreadystatechange', function(){
if (document.readyState=='complete') run();
});
</script>
{% endblock %}
{% block body %}
<a href="" id="url" rel="noreferrer"></a>
{% endblock %}