Commit 34f25c04 authored by Ryan Herbert's avatar Ryan Herbert Committed by Mathieu Giraud
Browse files

database.js prevent multiple consecutive calls to same URL

prevents the application from calling a link that has been clicked
within the last second.

This is to prevent spam to the server namely if the application is
sluggish, causing users to click links multiple times because it seems
that nothing is happening.

See #2894
parent 5740d20b
......@@ -216,6 +216,13 @@ Database.prototype = {
try {
var event = window.event || arguments.callee.caller.arguments[0]
var target =
if (target.getAttribute("disabled")){
} else {
target.setAttribute("disabled", "disabled")
setTimeout(function(){target.removeAttribute("disabled")}, 1000)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment