scrumblr icon indicating copy to clipboard operation
scrumblr copied to clipboard

I managed to make it crash by periodically sending actions

Open lenntt opened this issue 10 years ago • 0 comments

I had some fun trolling yesterday on someone elses scrumblr. I had the code below running in my browser for an hour or 2 (because it looks kind of cool, not having the intention to break it). There were about 10~15 notes on the board.

I'm not sure what caused the crash, nor do I have any logging (and I am kindly asked not to reproduce it...), but I might be interesting to look into.

var i = 0;
var stickers = [
  "sticker-red",
  "sticker-blue",
  "sticker-green",
  "sticker-yellow",
  "sticker-gold",
  "sticker-silverstar",
  "sticker-bluestar",
  "sticker-redstar",
  "sticker-orange",
  "sticker-pink",
  "sticker-purple",
  "sticker-lightblue"];
var cardids = cards.map(function(_card){
  return _card.id;
});

function loopStickers () {
  setTimeout(function () {
    cardids.forEach(function(cardid) {
      addSticker(cardid, stickers[i]);
      sendAction("addSticker", {
        cardId: cardid,
        stickerId: stickers[i]
      });
    });
    i = (i + 1) % stickers.length;
    loopStickers();
  }, 500)
}

loopStickers();

lenntt avatar May 13 '15 08:05 lenntt