From 4294ddb0811bb1af2812a75778af1bab7dfde511 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Wed, 21 May 2014 19:21:38 +0200 Subject: Button to refresh spam status --- js/spam.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'js') diff --git a/js/spam.js b/js/spam.js index 2b70ace..da3a99a 100644 --- a/js/spam.js +++ b/js/spam.js @@ -314,6 +314,18 @@ function processData(data) { infoPane.on('mousedown.drag', null); }); + infoPane.select('.content') + .insert('button', ':first-child') + .text('Spam update') + .on('click', function () { + refreshSpam(); + d3.select(this) + .style('opacity', '0') + .transition() + .duration(1000) + .style('opacity', '1'); + }); + function dragger() { var changes = { 'left': d3.event.dx, -- cgit v1.2.1