..we will make a new module and not just some new module, nope let's make a fully automatic injection script! This tutorial is the first step into making this. Let's first explain what..
THC Sscan is a very versatile tool for scanning (html) files
/* process task action */
$(document).on("click","a.action",function(e){
e.preventDefault();
$('.formdiv').remove();
var action = $(this).attr('title');
var did = $(this).attr('id');
$.ajax({
type: "POST",
url: "JSON/task_kill.php",
data: { sAction: action, sID: did },
dataType: "json",
success: function(json){
if(json.jresult==false){
alert(json.jerror);
}
else{
/* RESPONSE */
if(action=="complete"){
// update end time, links and status
$('.cc_record#'+did+' .dta .istate').html('<b>task state:</b> completed');
$('.cc_record#'+did+' .dta .iend').html('<b>time ended:</b> just now');
$('.cc_record#'+did+' .dta .ilinks').html('[ <a href="#" id="'+did+'" title="remove" class="action">remove task</a> ]');
}
else{
// remove the task
$('.cc_record#'+did).remove();
if(json.jempty){
$('div.devtable').after('<div class=\"spacingmsg\"><div class=\"resultheaders\" id=\"notice\">notice</div>No more tasks left</div>');
$('div.devtable').remove();
Cufon.replace('.resultheaders');
}
}
}
}
});
});
/* remove action */
$(document).on("click","input.action",function(e){
e.preventDefault();
$('.formdiv').remove();
var action = $(this).attr('id');
$.ajax({
type: "POST",
url: "JSON/task_kill.php",
data: { sAction: action },
dataType: "json",
success: function(json){
if(json.jresult==false){
alert(json.jerror);
}
else{
/* RESPONSE */
$('div.devtable').after('<div class=\"spacingmsg\"><div class=\"resultheaders\" id=\"notice\">notice</div>Task file is empty now</div>');
$('div.devtable').remove();
Cufon.replace('.resultheaders');
}
}
});
});