prevent bots to click on clickable images in javascript [duplicate] - javascript

This question already has answers here:
Check if event is triggered by a human
(9 answers)
Closed 4 years ago.
I have some images that are clickable. for each click , users can get some point.
But I want to prevent clicks that do by bots. in fact I want a way to detect that a real user is clicked or a bot.
I want do that in javascript or jquery. if anyone know a plugin that can do that Please introduce me to it.

You can simply assume it’s human, provided access to the page is protected by reCAPTCHA, and subsequent requests carry a CSRF token.

Related

How do I click on a link that is 1000px down without the action taking me at the beginning of the page? [duplicate]

This question already has answers here:
How to prevent a click on a '#' link from jumping to top of page?
(24 answers)
Closed 7 months ago.
I'm currently working on a Cooking Recipe sharing website and there's a matter on my Likes/Dislikes system.
The matter is when I click on the link "LIKE👍" as you can see in this picture, the page don't stay on the same position, it directly taking me at the beginning of the page, if you have some JS code to share with me in the purpose to solve my problem, please share.
I hope you understand my point, this matter can be resolved in JS but, I'm not a JS developer
it is complicated to solve the problem when you don't provide any code example.
However, this can be triggered from an anchor: ">
which moves you to the element having id="".
Or check the event function when you click on the like button.

Modify contents of contenteditable div on a facebook/twitter post like grammarly [duplicate]

This question already has answers here:
Insert text into an existing / external draftjs textfield
(1 answer)
Enter data into a custom-handled input field
(2 answers)
Closed 1 year ago.
I am trying to make an extension like Grammarly. When I want to make it work on Facebook and Twitter post field it doesn't work. When I write something in the Facebook post field and want to replace a suggestion of an existing wrong word by DOM modification using javascript, replacing suggestion does occur nicely. But after that no key including backspace, delete seems to stop working. This happens only in the case of Facebook and Twitter. I wonder how Grammarly manage this. Can anyone show me the path to solve this?
Hint: Just open the browser post dialog and hit below that code from the browser the dev console tool to regenerate that issue.
document.activeElement.innerText="hello, world"
Similar Userful References
Reference01
Reference02
Reference03
Reference04

How to insert the data while closing the browser tab or browser [duplicate]

This question already has answers here:
How to capture the browser window close event?
(17 answers)
Closed 4 years ago.
I want to check my registers users active or not for that users came to my index.php page i want to insert the table through session user1 is active and same time without logout user1 is closing the browser tab or browser the table should be update user1 is inactive.
Advice me it's possible to do that, can do mean please help me how to do that part or is there any possible way to do that same function.
Yes, it is quite easy to implement this. You can make an AJAX call on onbeforeunload() and then handle that AJAX request and update the status of the user in the table. You can get the user from SESSION[] array.
You can use onbeforeunload event handler in Javascript.
More details here
var inFormOrLink;
$(window).bind("beforeunload", function() {
return inFormOrLink ? "Do you really want to close?" : null;
})
this code is working but this message is not coming ('Changes you made may not be saved') this message only coming why is that?

Click Like dislike button after login [duplicate]

This question already has answers here:
Stopping users voting multiple times on a website
(16 answers)
Closed 4 years ago.
Anyone can just spam this, is it easy click the like dislike button after login per visitor? How would you archieve this? Send me the source code too..
One mechanism to help you achieve this with a measure of certainty is Fingerprinting the visitors. Using this library:
https://github.com/Valve/fingerprintjs2
You could establish some threshold of variability designed to capture the margins (user changing User Agent, Spoofing IP address, etc.).
Edit
Based on comment discussion, it is important to realize this method should not be used as an absolute. Only the various authentication techniques can reliably isolate individual users with certainty.

How to set another key to behave like a tab button? [duplicate]

This question already has answers here:
How to advance to the next form input when the current input has a value?
(10 answers)
Closed 6 years ago.
I have a user interface created in HTML and working with Angular. I want to set one of the buttons from a numeric keyboard to behave like the Tab button. I want user to be able to switch fields in the interface using one of the buttons from a numeric keyboard.
Not possible - this article (http://www.howtocreate.co.uk/tutorials/javascript/domevents) explains (for security reasons) why your script can't simulate actual user interaction. You're going to have to simulate the "tab"s behavior instead (i.e focus in another field, etc.)

Categories