Auto-fill in the right input

This commit is contained in:
Glitchii 2021-07-04 13:50:53 +01:00
parent 2270436df1
commit 9d906934a0
2 changed files with 2 additions and 2 deletions

View file

@ -1252,7 +1252,7 @@ textarea {
.browse.error>p::after {
color: #ee9191;
content: "Request failed. (Check console)";
content: "Request failed. (Check dev-console)";
}
.linkName {

View file

@ -106,7 +106,7 @@ window.onload = () => {
let activeInput = document.querySelector('input[class$="link" i]:focus')
if (activeInput) {
lastPos = activeInput.selectionStart + 7;
authorLink.value = `http://${re[2]}`;
activeInput.value = `http://${re[2]}`;
update(JSON.parse(str.replace(re[0], `${re[1]}http://${re[2]}"`)));
activeInput.setSelectionRange(lastPos, lastPos)
return true;