15 lines
493 B
JavaScript
15 lines
493 B
JavaScript
const form = document.getElementById("followForm");
|
|
form.addEventListener("submit", function (e) {
|
|
e.preventDefault();
|
|
|
|
var urlField = document.getElementById("instanceUrl");
|
|
var url = document.createElement('a');
|
|
url.href = urlField.value;
|
|
|
|
var followUrl = "https://" + url.hostname + "/ostatus_subscribe?acct=https://enigmatic.observer/users/Husky";
|
|
|
|
window.location = followUrl;
|
|
});
|
|
|
|
const followButton = document.getElementById("followButton");
|
|
followButton.disabled = false; |