NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name FFS When Is Next Top Post // @namespace ffsCountPosts // @description Shows a count for number of top level posts per page, to see when the next top post will be // @include http://www.fantasyfootballscout.co.uk/* // @version 3 // @grant none // ==/UserScript== var topComArray = document.getElementsByClassName('hc-level-0'); for (var i = 0; i < topComArray.length; i++) { var postNum = parseInt(i)+1; var startHTML = '<span style="background-color:white; font-family: Verdana; padding:4px;color:grey">'; var specialHTML = '<span style="position:absolute; left: 10px; background-color:white; font-family: Verdana; padding:10px;color:grey">' var endHTML = '</span>'; if (postNum == 1) { content = startHTML+'<b>Top Post</b>'+endHTML; } if (postNum == 30) { content = startHTML+'<b>LAST POST</b>'+endHTML; } if (postNum != 1 && postNum != 30) { content = specialHTML+postNum+endHTML; } topComArray[i].insertAdjacentHTML("beforeBegin", content); }