Auto-fill in the right input
This commit is contained in:
parent
2270436df1
commit
9d906934a0
2 changed files with 2 additions and 2 deletions
|
@ -1252,7 +1252,7 @@ textarea {
|
||||||
|
|
||||||
.browse.error>p::after {
|
.browse.error>p::after {
|
||||||
color: #ee9191;
|
color: #ee9191;
|
||||||
content: "Request failed. (Check console)";
|
content: "Request failed. (Check dev-console)";
|
||||||
}
|
}
|
||||||
|
|
||||||
.linkName {
|
.linkName {
|
||||||
|
|
|
@ -106,7 +106,7 @@ window.onload = () => {
|
||||||
let activeInput = document.querySelector('input[class$="link" i]:focus')
|
let activeInput = document.querySelector('input[class$="link" i]:focus')
|
||||||
if (activeInput) {
|
if (activeInput) {
|
||||||
lastPos = activeInput.selectionStart + 7;
|
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]}"`)));
|
update(JSON.parse(str.replace(re[0], `${re[1]}http://${re[2]}"`)));
|
||||||
activeInput.setSelectionRange(lastPos, lastPos)
|
activeInput.setSelectionRange(lastPos, lastPos)
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue