16 lines
620 B
JavaScript
16 lines
620 B
JavaScript
|
document.addEventListener("DOMContentLoaded", function() {
|
||
|
function getFediverseHandle() {
|
||
|
const url = window.location.href;
|
||
|
const prefix = "?@";
|
||
|
const index = url.indexOf(prefix);
|
||
|
if(index !== -1) {
|
||
|
return decodeURIComponent(url.substring(index + prefix.length));
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
var fediverseHandle = getFediverseHandle();
|
||
|
if(fediverseHandle) {
|
||
|
document.getElementById('txt_mastodon_handle').value = fediverseHandle;
|
||
|
(async() => await circleMain())();
|
||
|
}
|
||
|
});
|