diff --git a/gc_little_helper_II.user.js b/gc_little_helper_II.user.js index 5dc1fc4e4..d91f53d26 100644 --- a/gc_little_helper_II.user.js +++ b/gc_little_helper_II.user.js @@ -2146,10 +2146,10 @@ var mainGC = function() { var div = document.createElement('div'); div.className = "gclh_LogTotals Clear"; var span = document.createElement('span'); - span.innerHTML = $('.LogTotals')[0].innerHTML.replace(/alt="(.*?)"/g, "alt=\" \"").replace(/( ){5}/g, " "); + span.innerHTML = $('.LogTotals')[0].outerHTML; div.appendChild(span); $('#ctl00_ContentBody_size')[0].parentNode.insertBefore(div, $('#ctl00_ContentBody_size')[0].nextSibling.nextSibling.nextSibling); - appendCssStyle('.gclh_LogTotals {float: right;} .gclh_LogTotals img {vertical-align: bottom;}'); + appendCssStyle('.gclh_LogTotals {float: right;} .gclh_LogTotals img {vertical-align: bottom;} .LogTotals li + li {margin-left: 8px;} .LogTotals {margin-bottom: 0px;}'); } catch(e) {gclh_error("Show log totals symbols at the top",e);} } @@ -7508,21 +7508,21 @@ var mainGC = function() { if (!document.getElementById("ctl00_ContentBody_lblFindCounts").childNodes[0]) return false; var legend = document.getElementById("ctl00_ContentBody_lblFindCounts").childNodes[0]; - var new_legend = document.createElement("p"); + var new_legend = document.createElement("ul"); new_legend.className = "LogTotals"; for (var i = 0; i < legend.childNodes.length; i++) { - if (legend.childNodes[i].tagName == "IMG") { - var link = document.createElement("a"); - link.setAttribute("href", "javascript:void(0);"); - link.style.textDecoration = 'none'; - link.addEventListener("click", gclh_filter_logs, false); - link.appendChild(legend.childNodes[i].cloneNode(true)); - i++; - link.appendChild(legend.childNodes[i].cloneNode(true)); - new_legend.appendChild(link); - } + var li = document.createElement("li"); + var link = document.createElement("a"); + link.setAttribute("href", "javascript:void(0);"); + link.style.textDecoration = 'none'; + link.addEventListener("click", gclh_filter_logs, false); + link.appendChild(legend.childNodes[i].childNodes[0].cloneNode(true)); + link.appendChild(legend.childNodes[i].childNodes[1].cloneNode(true)); + li.appendChild(link); + new_legend.appendChild(li); } if (settings_show_vip_list) { + var li = document.createElement("li"); var link = document.createElement("a"); link.setAttribute("href", "javascript:void(0);"); link.setAttribute("style", "text-decoration: 'none'; padding-right: 18px;"); @@ -7532,7 +7532,8 @@ var mainGC = function() { img.setAttribute("src", global_logs_vip_icon); img.setAttribute("title", "VIP logs"); link.appendChild(img); - new_legend.appendChild(link); + li.appendChild(link); + new_legend.appendChild(li); } document.getElementById('ctl00_ContentBody_lblFindCounts').replaceChild(new_legend, legend); if (document.getElementById("lnk_gclh_vip_list")) { @@ -7551,18 +7552,18 @@ var mainGC = function() { } if (!$('.gclh_LogTotals')[0] || !$('.gclh_LogTotals')[0].childNodes[0]) return; var legend = $('.gclh_LogTotals')[0].childNodes[0]; - var new_legend = document.createElement('span'); - for (var i = 0; i < legend.childNodes.length; i++) { - if (legend.childNodes[i].tagName == "IMG") { - var link = document.createElement("a"); - link.setAttribute("href", clearUrlAppendix(document.location.href, false) + 'logs_section'); - link.style.textDecoration = 'none'; - link.addEventListener("click", gclh_filter_logs, false); - link.appendChild(legend.childNodes[i].cloneNode(true)); - i++; - link.appendChild(legend.childNodes[i].cloneNode(true)); - new_legend.appendChild(link); - } + var new_legend = document.createElement('ul'); + new_legend.className = "LogTotals"; + for (var i = 0; i < legend.childNodes[0].childNodes.length; i++) { + var li = document.createElement("li"); + var link = document.createElement("a"); + link.setAttribute("href", clearUrlAppendix(document.location.href, false) + 'logs_section'); + link.style.textDecoration = 'none'; + link.addEventListener("click", gclh_filter_logs, false); + link.appendChild(legend.childNodes[0].childNodes[i].childNodes[0].cloneNode(true)); + link.appendChild(legend.childNodes[0].childNodes[i].childNodes[1].cloneNode(true)); + li.appendChild(link); + new_legend.appendChild(li); } $('.gclh_LogTotals')[0].replaceChild(new_legend, legend); } @@ -7638,8 +7639,8 @@ var mainGC = function() { activateLoadAndSearch(); } - if (!$('#ctl00_ContentBody_lblFindCounts p')[0]) return false; - $('#ctl00_ContentBody_lblFindCounts p').append('Search in logs: '); + if (!$('#ctl00_ContentBody_lblFindCounts ul')[0]) return false; + $('#ctl00_ContentBody_lblFindCounts ul').append('