MastodonTootFollower/static/index.js

26 lines
561 B
JavaScript
Raw Normal View History

function html_button() {
button_result('/html/' + get_seed() + '/?url=' + get_url());
}
function json_button() {
button_result('/json/' + get_seed() + '/?url=' + get_url());
}
function rss_button() {
button_result('/rss/?url=' + get_url());
}
function button_result(url) {
let href = document.getElementById("href1")
href.href = url;
href.innerHTML = url;
// window.open(url);
}
function get_url() {
return document.getElementById('input1').value
}
function get_seed() {
return document.getElementById('input2').value
}