From a68f5263bc92a88f92d97ddbdffb49f51514e075 Mon Sep 17 00:00:00 2001 From: BBcan177 Date: Sun, 30 Nov 2014 20:15:36 -0500 Subject: Revert "pfBlockerNG Beta v0.99" This reverts commit b3ce3bde07750e25fabca14faf18c0e5f0eb74dc. --- config/pfblockerng/pfblockerng.js | 79 --------------------------------------- 1 file changed, 79 deletions(-) delete mode 100644 config/pfblockerng/pfblockerng.js (limited to 'config/pfblockerng/pfblockerng.js') diff --git a/config/pfblockerng/pfblockerng.js b/config/pfblockerng/pfblockerng.js deleted file mode 100644 index cef0ce3b..00000000 --- a/config/pfblockerng/pfblockerng.js +++ /dev/null @@ -1,79 +0,0 @@ -/* pfBlockerNG update engine */ - -// Part of pfBlockerNG by BBCan177@gmail.com (c) 2014 -// -// Javascript and Integration modifications by J. Nieuwenhuizen - - -var pfBlockerNGtimer; - -function pfBlockerNG_fetch_new_rules_callback(callback_data) { - var data_split; - var new_data_to_add = Array(); - var data = callback_data; - - data_split = data.split("\n"); - - // Loop through rows and generate replacement HTML - if (data_split.length > 1) { - for(var x=0; x 3) { - var line = ''; - line = '' + row_split[0] + ''; - line += '' + row_split[1] + ''; - line += '' + row_split[2] + ''; - line += '' + row_split[3] + ''; - line += '' + row_split[4] + ''; - new_data_to_add[new_data_to_add.length] = line; - } - } - if (new_data_to_add.length > 0) { - pfBlockerNG_update_div_rows(new_data_to_add); - } - } -} - - -function pfBlockerNG_update_div_rows(data) { - var rows = jQuery('#pfbNG-entries>tr'); - - // Number of rows to move by - var move = rows.length + data.length; - if (move < 0) - move = 0; - - for (var i = rows.length - 1; i >= move; i--) { - jQuery(rows[i]).html(jQuery(rows[i - move]).html()); - } - - var tbody = jQuery('#pfbNG-entries'); - for (var i = data.length - 1; i >= 0; i--) { - if (i < rows.length) { - jQuery(rows[i]).html(data[i]); - } else { - jQuery(tbody).prepend('' + data[i] + ''); - } - } - - // Add the even/odd class to each of the rows now - // they have all been added. - rows = jQuery('#pfbNG-entries>tr'); - for (var i = 0; i < rows.length; i++) { - rows[i].className = i % 2 == 0 ? 'listMRodd' : 'listMReven'; - } -} - - -function fetch_new_pfBlockerNGcounts() { - jQuery.ajax('/widgets/widgets/pfblockerng.widget.php?getNewCounts=' + new Date().getTime(), { - type: 'GET', - dataType: 'text', - success: function(data) { - pfBlockerNG_fetch_new_rules_callback(data); - } - }); -} - -/* start local AJAX engine */ -pfBlockerNGtimer = setInterval('fetch_new_pfBlockerNGcounts()', pfBlockerNGupdateDelay); \ No newline at end of file -- cgit v1.2.3