Last active
August 29, 2015 14:18
-
-
Save sebastianha/30fd5fa1b2c690b7de3b to your computer and use it in GitHub Desktop.
Fixes the view of Mailman HyperKitty Frontend
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Maillist fix | |
// @namespace test | |
// @include http://lists-dev.cloud.fedoraproject.org/archives/list/kde%40lists.fedoraproject.org/thread/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
$(".col-sm-9").removeClass("col-sm-9") | |
$(".col-sm-2").addClass("col-sm-1") | |
$(".col-sm-10").addClass("col-sm-11").removeClass("col-sm-10") | |
$(".container").css("margin", "0px") | |
$(".container").css("width", "100%") | |
$( document ).ready(function() { | |
console.log($(".replies").children().length) | |
}); | |
setTimeout(function() { | |
$("body").prepend("<div style='display:none' id='treeview'>tree view<table id='treeviewtable'></table></div>") | |
var c = $(".replies").children() | |
var h = c.length*20; | |
for(var i=0; i<c.length; i++) { | |
$("#treeviewtable").append("<tr>" + | |
"<td style='padding-right: 20px;'>" + | |
"<span style='margin-left:" + $(c[i]).css("margin-left") + "'><a href='#' onClick='" + | |
"$(\"html, body\").animate({ scrollTop: " + ($(c[i]).offset().top+h-65) + "}, \"slow\");" + | |
"'>" + $(c[i]).find(".name").text().trim() + "</a></span>" + | |
"</td><td>" + $(c[i]).find(".email-date").text().trim()+ "</td></tr>") | |
} | |
$("#treeview").show(500) | |
}, 1000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment