Warning: fopen(/www/sites/update.greasyfork.icu/index/store/temp/93ac1f18bf2da8caaceb19d278117fd0.js): failed to open stream: No space left on device in /www/sites/update.greasyfork.icu/index/scriptControl.php on line 65
// ==UserScript== // @name MTG better forum view // @namespace https://greasyfork.org/en/users/13769 // @version 2.0 // @description Turns the forumn posts under Awesome HITS into a more managable list and adds a view for only hits posted. // @author saqfish // @include http://www.mturkgrind.com/threads/* // @grant GM_log // @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js // @downloadURL https://update.greasyfork.icu/scripts/12426/MTG%20better%20forum%20view.user.js // @updateURL https://update.greasyfork.icu/scripts/12426/MTG%20better%20forum%20view.meta.js // ==/UserScript== var Page_nums = 0; var Curr_page = 0; var postcount = 0; var runit = false; var content2 = ""; var url = window.location.href; var title =$('title').text(); var eee =$('#pageDescription > a:nth-child(1)').text(); if( eee === "Awesome HITS"){ runit = true; } var content = ''; view_pages(); } postcount++; }); } } function view_pages(){ $('body').empty(); $('body').append('
'+title+' | Total pages: '+Page_nums+' [View pages] [View hits]
'); $('body').append("
Click on the page to view its content"); console.log(title); $('body').append(content); var toggle_flag = 0; $('ul').toggleClass('no-js js'); $(".post").css('border','5px solid black'); $(".post").css('list-style-position:','inside'); var menuList = $(".js").find("li"); menuList.find("ul").hide(); menuList.on("click", function(){ menuList.find("ul").slideUp(0); $(this).find("ul").slideToggle(0); $(this).toggleClass("selected"); }); sort_list("main_list"); } //Credit for sort - http://trentrichardson.com/2013/12/16/sort-dom-elements-jquery/ function sort_list(i){ var $people = $('ul.'+i), $peopleli = $people.children('li'); $peopleli.sort(function(a,b){ var an = a.getAttribute('dn'), bn = b.getAttribute('dn'); if(an > bn) { return 1; } if(an < bn) { return -1; } return 0; }); $peopleli.detach().appendTo($people); } function addZeros(n) { return (n < 10)? '00' + n : (n < 100)? '0' + n : '' + n; }