User:Stryzzar/global.js

var url = $(".unread").children("a").attr("href"); var index = url.lastIndexOf("#"); var hashId = url.substring(index + 1, url.length); $(".unread a[href*='" + url + "'] p").append($("").load(url + " #" + hashId + " p")).parentsUntil("ul").addClass("completed"); var url2 = $(".unread:not(.completed)").children("a").attr("href"); var index2 = url2.lastIndexOf("#"); var hashId2 = url2.substring(index2 + 1, url2.length); $(".unread:not(.completed) a[href*='" + url2 + "'] p").append($("").load(url2 + " #" + hashId2 + " p")).parentsUntil("ul").addClass("completed2"); var url3 = $(".unread:not(.completed2)").children("a").attr("href"); var index3 = url3.lastIndexOf("#"); var hashId3 = url3.substring(index3 + 1, url3.length); $(".unread:not(.completed2) a[href*='" + url3 + "'] p").append($("").load(url3 + " #" + hashId3 + " p")).parentsUntil("ul").addClass("completed3"); var url4 = $(".unread:not(.completed3)").children("a").attr("href"); var index4 = url4.lastIndexOf("#"); var hashId4 = url4.substring(index4 + 1, url4.length); $(".unread:not(.completed3) a[href*='" + url4+ "'] p").append($("").load(url4 + " #" + hashId4 + " p")).parentsUntil("ul").addClass("completed4"); var url5 = $(".unread:not(.completed4)").children("a").attr("href"); var index5 = url5.lastIndexOf("#"); var hashId5 = url5.substring(index5 + 1, url5.length); $(".unread:not(.completed4) a[href*='" + url5+ "'] p").append($("").load(url5 + " #" + hashId5 + " p")).parentsUntil("ul").addClass("completed5"); var url6 = $(".unread:not(.completed5)").children("a").attr("href"); var index6 = url5.lastIndexOf("#"); var hashId6 = url6.substring(index6 + 1, url5.length); $(".unread:not(.completed5) a[href*='" + url6+ "'] p").append($("").load(url6 + " #" + hashId6 + " p")); $(".this-is-quote").css("color","red"); $(".this-is-quote").nextUntil("time").hide;