From ea7e4750709e9caa3c5fcfd1c6da1b5ca1ea9d8c Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 13 Apr 2013 20:35:49 +0200 Subject: [PATCH] remove spams quicker --- htdocs/themes/default/css/main.css | 6 ++++- htdocs/themes/default/js/stikked.js | 28 +++++++++++++++++++----- htdocs/themes/default/views/list_ips.php | 4 ++-- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/htdocs/themes/default/css/main.css b/htdocs/themes/default/css/main.css index 409c1da..232e569 100644 --- a/htdocs/themes/default/css/main.css +++ b/htdocs/themes/default/css/main.css @@ -159,7 +159,7 @@ h4 { margin-bottom: 10px; } -.form_wrapper .hidden { +.hidden { display: none; } @@ -325,6 +325,10 @@ h4 { width: 100px; } +.recent .qr { + width: 20px; +} + .recent .hits { width: 70px; } diff --git a/htdocs/themes/default/js/stikked.js b/htdocs/themes/default/js/stikked.js index 17531c9..93efa15 100644 --- a/htdocs/themes/default/js/stikked.js +++ b/htdocs/themes/default/js/stikked.js @@ -1,11 +1,5 @@ var ST = window.ST || {} -ST.init = function() { - ST.change(); - ST.expand(); - ST.show_embed(); -}; - ST.change = function() { $('.change').oneTime(3000, function() { @@ -46,6 +40,28 @@ ST.expand = function() { }); }; +ST.spamadmin = function() { + if ($('.content h1').text() == 'Spamadmin') { + $('.content .hidden').show(); + $('.content .quick_remove').live('click', function(ev) { + var ip = $(ev.target).data('ip'); + if (confirm('Delete all pastes belonging to ' + ip + '?')) { + $.post(base_url + 'spamadmin/' + ip, { 'confirm_remove': 'yes', 'block_ip': 1 }, function() { + window.location.reload(); + }); + } + return false; + }); + } +}; + +ST.init = function() { + ST.change(); + ST.expand(); + ST.show_embed(); + ST.spamadmin(); +}; + $(document).ready(function() { ST.init(); }); diff --git a/htdocs/themes/default/views/list_ips.php b/htdocs/themes/default/views/list_ips.php index 46c9878..7acb77f 100644 --- a/htdocs/themes/default/views/list_ips.php +++ b/htdocs/themes/default/views/list_ips.php @@ -13,9 +13,9 @@ Title Name - Language When IP + X "> "> - ago. + X