voterunner

quick and dirty votes and discussions
git clone https://git.ce9e.org/voterunner.git

commit
20553f7cb7354f1908314b4a41cfd0876ed07fb0
parent
582f5f7da88709949b9fe83ef2304096d0ddffcf
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2020-10-16 15:15
rm forEach compat

Diffstat

M static/src/voterunner.js 10 ++--------

1 files changed, 2 insertions, 8 deletions


diff --git a/static/src/voterunner.js b/static/src/voterunner.js

@@ -9,12 +9,6 @@ var _ = function(s) {
    9     9 	return s;
   10    10 };
   11    11 
   12    -1 var forEach = function(list, fn) {
   13    -1 	for (var i = 0; i < list.length; i++) {
   14    -1 		fn(list[i], i);
   15    -1 	}
   16    -1 };
   17    -1 
   18    12 var throttle = function(fn, timeout) {
   19    13 	var called, blocked;
   20    14 
@@ -237,11 +231,11 @@ document.addEventListener('DOMContentLoaded', function() {
  237   231 	var update = initVDom(document.querySelector('#tree'), nodes, ID, function() {
  238   232 		updateUser();
  239   233 
  240    -1 		forEach(document.querySelectorAll('.node__expand'), function(element) {
   -1   234 		document.querySelectorAll('.node__expand').forEach(function(element) {
  241   235 			element.addEventListener('click', toggleExpand);
  242   236 		});
  243   237 
  244    -1 		forEach(document.querySelectorAll('.node__delegate'), function(element) {
   -1   238 		document.querySelectorAll('.node__delegate').forEach(function(element) {
  245   239 			element.addEventListener('click', setDelegate);
  246   240 		});
  247   241 	});