This commit is contained in:
parent
11bdb1fe9f
commit
fd6bee2c5b
1 changed files with 13 additions and 3 deletions
|
@ -128,8 +128,14 @@ for(
|
|||
|
||||
<script>
|
||||
// set default value for input
|
||||
f.value=(f.value
|
||||
|| window.location.search.slice(1).replaceAll('%20', ' ').replaceAll('%0a','\n').replaceAll('%0A','\n').replaceAll('%23', '#')
|
||||
f.value=(
|
||||
window.location.search.slice(1)
|
||||
.replaceAll('%20', ' ')
|
||||
.replaceAll('%0a','\n')
|
||||
.replaceAll('%0A','\n')
|
||||
.replaceAll('%23', '#')
|
||||
.replaceAll('%27', "'")
|
||||
|| f.value
|
||||
|| s.value
|
||||
);
|
||||
|
||||
|
@ -139,7 +145,11 @@ document.querySelector('center p').setAttribute('hidden', 'true');
|
|||
// add save button
|
||||
document.querySelector('center p:last-child').innerHTML+=`
|
||||
<button onclick='
|
||||
window.location.search = "?"+f.value.replaceAll(" ","%20").replaceAll("\n","%0a").replaceAll("#","%23")
|
||||
window.location.search = "?"+f.value
|
||||
.replaceAll(" ","%20")
|
||||
.replaceAll("\\n","%0a")
|
||||
.replaceAll("#","%23")
|
||||
.replaceAll("\\x27","%27")
|
||||
'>#save</button>
|
||||
`;
|
||||
</script>
|
||||
|
|
Loading…
Add table
Reference in a new issue