Codacy fixes

This commit is contained in:
DL6ER
2017-04-22 16:19:19 +02:00
parent 349faac048
commit 870959026b

View File

@@ -47,10 +47,8 @@ function updateTopLists() {
for (domain in data.top_ads) {
if ({}.hasOwnProperty.call(data.top_ads,domain)){
// Sanitize domain
console.log(domain);
console.log();
var input = domain.split(" ");
// Sanitize domain
var printdomain = escapeHtml(input[0]);
if(input.length > 1)
{
@@ -95,16 +93,24 @@ $(document).ready(function() {
$("#domain-frequency tbody").on( "click", "button", function () {
var url = ($(this).parents("tr"))[0].innerText.split(" ")[0];
if($(this).context.innerText === "Blacklist")
{
add(url,"black");
}
else
{
add(url,"audit");
}
});
$("#ad-frequency tbody").on( "click", "button", function () {
var url = ($(this).parents("tr"))[0].innerText.split(" ")[0].split(" ")[0];
if($(this).context.innerText === "Whitelist")
add(url,"white");
{
add(url,"white");
}
else
{
add(url,"audit");
}
});
});