Posts by Mark • 169 points
9 posts
-
2
votes0
answers92
viewsQ: How to create temporary pages on the customer side?
A while ago I was looking for solutions to create temporary pages on the client side, today I found something similar in this post: How to edit an existing localStorage item in a blob url However as…
javascriptasked Mark 169 -
0
votes2
answers329
viewsA: Javascript: remove accents and spaces
You are putting the name and value of select as the same in new Option(newModels, newModels) You can do regex in value, thus: new Option(newModels, newModels.normalize('NFD').replace(/[^a-z]/g,…
-
3
votes3
answers84
viewsQ: Prevent link from opening while clicking and holding to drag in Google Chrome
How to prevent a link from opening while holding and dragging your mouse in Google Chrome? The script below is to perform scroll action while clicking and dragging, but when it comes to links, when…
javascriptasked Mark 169 -
1
votes1
answer1140
viewsQ: Convert date yyyy-mm-ddThh:mm:ss. z to dd/mm/yyyy with javascript
How to convert the date of yyyy-mm-ddThh:mm:ss.z for dd/mm/aaaa? Example: 2018-07-19T22:07:00.000-03:00 for 19/07/2018 I searched everywhere (including stackoverflow in English and Portuguese) a…
javascriptasked Mark 169 -
3
votes1
answer328
viewsQ: How to get all keynames within localStorage
How to catch all the keyNames (not the values) within localStorage and add as option in one element select? Code in operation here Explaining the code: 1. The function salvar() saves a key with the…
javascriptasked Mark 169 -
1
votes1
answer136
viewsQ: Execute function when closing the window
I am trying to run the function below so that when the user closes the page, an alert will appear asking if you want to save before leaving, by clicking on OK, the progress of the form will be saved…
javascriptasked Mark 169 -
2
votes3
answers710
viewsQ: Take text area values separated by line
How to take the value of textarea separated by line and add a div? I would like to write a text on textarea separated by lines and sent to the other textarea by adding a div with the attribute class…
javascriptasked Mark 169 -
1
votes0
answers76
viewsQ: How to execute a script after 5 visits from a single user to the page using cookies
My website uses a anti-adblock that prevents people from entering, but no one likes to see advertisements, so I decided to go after a way to let new visitors use the site a few times before the…
-
2
votes3
answers128
viewsQ: Static site, set default HTML markup for all pages
In a static site you should create each page individually. If you want equal pages, simply copy the HTML and make the necessary changes. It is also possible to define the CSS and Javascript of all…