// ==UserScript== // @name date stuff // @namespace pbr/ds // @include http://goallineblitz.com/game/forum_thread.pl?thread_id=* // @include http://goallineblitz.com/game/forum_thread_list.pl* // @include http://goallineblitz.com/game/forum_main.pl* // @include http://goallineblitz.com/game/user_games.pl* // @include http://goallineblitz.com/game/home.pl* // @copyright 2011, pabst // @license (CC) Attribution Share Alike; http://creativecommons.org/licenses/by-sa/3.0/ // @version 12.01.24 // @description sdfsdf // @downloadURL https://update.greasyfork.icu/scripts/1419/date%20stuff.user.js // @updateURL https://update.greasyfork.icu/scripts/1419/date%20stuff.meta.js // ==/UserScript== if (window.location.toString().indexOf("forum_thread.pl") != -1) { forum_thread(); } else if (window.location.toString().indexOf("forum_thread_list.pl") != -1) { forum_thread_list(); forum_main(); } else if (window.location.toString().indexOf("forum_main.pl") != -1) { forum_main(); } else if (window.location.toString().indexOf("user_games.pl") != -1) { user_games(); } else if (window.location.toString().indexOf("home.pl") != -1) { home(); } function home() { //login times if (document.getElementsByClassName("account_head")[0].innerHTML.indexOf("Flex Points") == -1) { var rows = document.getElementsByClassName("account_value"); for (var i=0; i<2; i++) { var newdate = Date.parse(rows[i].innerHTML + " GMT-0700"); var str = (new Date(newdate)).toString().split("GMT")[0]; rows[i].innerHTML = str; } } //list mode team var rows = document.getElementsByClassName("list_team_nxtgame"); for (var i=0; i= 30) { newdate.setHours(newdate.getHours()+1); } newdate.setMinutes(0); var newdate = Date.parse(newdate.toString().split(" GMT")[0]); var str = (new Date(newdate)).toDateString(); str = str.slice(0,str.length-5); str = (new Date(newdate)).toTimeString().split(" GMT")[0]+" "+str; if (rows[i].childNodes[2].textContent.indexOf(" at ") != -1) { rows[i].childNodes[2].textContent = " " + str + " at" + rows[i].childNodes[2].textContent.split("at")[1]; } else if (rows[i].childNodes[2].textContent.indexOf(" vs ") != -1) { rows[i].childNodes[2].textContent = " " + str + " vs" + rows[i].childNodes[2].textContent.split("vs")[1]; } else { console.log(rows[i].childNodes[2].textContent); } rows[i].removeChild(rows[i].lastChild); } //card mode team var rows = document.getElementsByClassName("team_next_game"); for (var i=0; i= 30) { newdate.setHours(newdate.getHours()+1); } newdate.setMinutes(0); var newdate = Date.parse(newdate.toString().split(" GMT")[0]); var str = (new Date(newdate)).toDateString(); str = str.slice(0,str.length-5); str = (new Date(newdate)).toTimeString().split(" GMT")[0]+" "+str; rows[i].childNodes[3].textContent = " " + str + " vs " + rows[i].childNodes[2].textContent; rows[i].removeChild(rows[i].lastChild); } //card mode player var r = document.getElementsByClassName("player_vitals"); for (var i=0; i= 30) { newdate.setHours(newdate.getHours()+1); } newdate.setMinutes(0); var newdate = Date.parse(newdate.toString().split(" GMT")[0]); var str = (new Date(newdate)).toDateString(); str = str.slice(0,str.length-5); str = (new Date(newdate)).toTimeString().split(" GMT")[0]+" "+str; var html = r[i].rows[rowidx].childNodes[3].innerHTML; r[i].rows[rowidx].childNodes[3].innerHTML = html.split(">")[0] + ">" + str + html.slice(html.indexOf(" 1) { var newdate = Date.parse(d.lastChild.textContent.split(" on ")[1]+" GMT-0700"); var str = (new Date(newdate)).toString(); str = str.slice(0,str.indexOf(":")+6); d.lastChild.textContent = d.lastChild.textContent.split(" on ")[0]+" on "+str; } else { var newdate = Date.parse(d.lastChild.textContent.split("edited ")[1]+" GMT-0700"); var str = (new Date(newdate)).toString(); str = str.slice(0,str.indexOf(":")+6); d.lastChild.textContent = d.lastChild.textContent.split("edited ")[0]+"edited "+str; } } } function forum_thread_list() { var dates = document.getElementsByClassName("last_post"); for (var i=0; i