mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-04 01:29:21 +00:00
Revert "feat(cheating) prevent +habit spamming with a 10s timer"
This reverts commit ad4ca6655a.
This commit is contained in:
parent
17d60b45ff
commit
32dc651bfb
1 changed files with 0 additions and 7 deletions
|
|
@ -5,14 +5,7 @@ habitrpg.controller("TasksCtrl", ['$scope', '$location', 'User','Notification',
|
|||
$scope.obj = User.user; // used for task-lists
|
||||
$scope.user = User.user;
|
||||
|
||||
var dontCheatTimer = {};
|
||||
$scope.score = function(task, direction) {
|
||||
if (direction == 'up' && task.type == 'habit') {
|
||||
if (dontCheatTimer[task.id])
|
||||
return alert("Wait 10 seconds before clicking that task again");
|
||||
dontCheatTimer[task.id] = true;
|
||||
$timeout(function(){delete dontCheatTimer[task.id]}, 10000);
|
||||
}
|
||||
User.user.ops.score({params:{id: task.id, direction:direction}})
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue