I'm not that good in regular expressions, but hope this crutch helps
console.log(
document.body.innerText
.replace(/([\s\d]+).([\d]+),([\d]{2})/g , '$1$2,$3')
.replace(/([\d]+),([\d]{2})/g , '$1.$2')
)
I believe this can be done with only one replace, may be somebody knows how
Can, for example, translating this page from English to Russian(outputted into the browser Console or a special div created by a browser extension) be assumed changing this page without permission from its owner?
It's still not clear for what attribute these MO's stand for - id, name, data-smth? Do not hesitate to show markup of the page to let the others help you the right way. Would you like to copy these values automatically on the page load / or manually after doing something / or should this happen...
I suspect that your script is working when the span id="file" doesn't exist yet. What if you try something like this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>ERROR 404</title>
<style>
body{
padding-top: 15%;
text-align: center;
}...
Because the form is submitted by pressing this key. To prevent this action use the preventDefault() method :
if (event.key == "Enter") {
event.preventDefault();
document.getElementById("myresult").innerHTML = "You pressed the Enter key."
}
The id property of the Element interface represents the element's identifier, reflecting the id global attribute.
If the id value is not the empty string, it must be unique in a document. ( Element: id property )
So, you can not have more than one element having id="wrap" within your page.