fix: minor fixes to the HTTP frontend
This commit is contained in:
parent
6c7b06f021
commit
df0cff37af
|
@ -34,7 +34,7 @@ body {
|
|||
#shortened {
|
||||
font-size: calc(min(20pt, 10vw));
|
||||
font-family: monospace;
|
||||
color: #385d22;
|
||||
color: #99ff5e;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,8 +12,19 @@
|
|||
|
||||
// Select the full link with one click
|
||||
shortened.onclick = () => {
|
||||
this.focus();
|
||||
this.select();
|
||||
if (document.body.createTextRange) {
|
||||
const range = document.body.createTextRange();
|
||||
range.moveToElementText(shortened);
|
||||
range.select();
|
||||
} else if (window.getSelection) {
|
||||
const selection = window.getSelection();
|
||||
const range = document.createRange();
|
||||
range.selectNodeContents(shortened);
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(range);
|
||||
} else {
|
||||
// Highlight unsupported
|
||||
}
|
||||
};
|
||||
|
||||
// Set up the actual submission
|
||||
|
|
Loading…
Reference in New Issue