Nie wiadomo ile to podziała więc jeśli wam zależy na tych danych poróbcie sobie kopie strony/screenshoty. Napisałem do raptra, żeby zmodyfikowali swój skrypt ściągający dane z xfire, tak, żeby pobierał dane z tej tymczasowej strony.
Ponadto już jest możliwość importowania godzin do servisu Evolvei skrypt do wyciągnięcia gamingowej historii do pliku.
// Hide/show/set the row visibility function hide_rows( tableName, numRows, hideRows ) { var theTable=document.getElementById(tableName); if(!theTable) return;
var tbody = theTable.tBodies[0];
if (numRows == -1) { // special case for always showing all rows, regardless for( var i = 0; i < tbody.rows.length; i++) { tbody.rows[i].style.display = ""; } } else { for( var i = 0; i < tbody.rows.length; i++ ) { if( hideRows == true && i >= numRows ) tbody.rows[i].style.display = "none"; else tbody.rows[i].style.display = ""; } }
// Determine if there are enough elements in the table to justify having the toggle link var toggleLink=document.getElementById(tableName + "_ToggleLink"); if( tbody.rows.length <= numRows || numRows == -1) toggleLink.style.display = "none"; else toggleLink.style.display = "block";
}
// Helper sort function that takes the id and the column number function do_sort_table( tableName, columnNumber ) { var theTable = document.getElementById(tableName); if( theTable ) { theColumn = theTable.rows[0].cells[columnNumber]; if( theColumn ) sort_table(theColumn); } }
// Sort the table, based on the column heading that was clicked function sort_table( theColumn ) { // Go up the chain until we hit the enclosing table var theTable = theColumn; while( theTable != null && theTable.tagName.toLowerCase() != 'table' ) { theTable = theTable.parentNode; }
// Did we never hit a table? If so, do get out. if( theTable == null ) return;
// Determine the index of this column var cells = theTable.rows[0].cells; var len = cells.length; for (i = 0; i < len; i++) { if (cells[i] == theColumn) break; } var colNum = i;
// Make a temporary copy of the table's rows // sort those using array.sort // Set the table's rows to be the now ordered set var numRows = theTable.tBodies[0].rows.length; var tempArray = new Array(); for(var i = 0; i < numRows; i++ ) { tempArray[i] = theTable.tBodies[0].rows[i]; }
// Get the sorting type (ie, how we should treat the data in the cells) var sortType = theColumn.getAttribute( 'datatype' );
// Determine whether we're sorting ascending or descending var bDescending;
for(var i = 0; i < numRows; i++ ) { theTable.tBodies[0].appendChild( tempArray[i] ); }
// Get the row hiding/showing back to normal - toggle twice, and it'll be fixed. toggle_extra_rows( theTable.getAttribute( "ID" ) ); toggle_extra_rows( theTable.getAttribute( "ID" ) );
// Fix the row colorations fixColors( theTable ); }
function SetColumnSortIndicator( theTable, theColumn, bDescending ) { // If there's nothing to sort, then don't show the indicator // (also if there's only one row, since one can only sort more // than one object.) if( theTable.tBodies[0].rows.length <= 1 ) return;
var uid = "sortIndicator" + theTable.getAttribute( "id" );
var sortNode = document.getElementById( uid ); if( sortNode != null ) { var theParent = sortNode.parentNode; theParent.removeChild( sortNode ); }
// create the sort indicator node var sortNode = document.createElement( "span" ); sortNode.setAttribute( "id", uid ); var textNode = document.createTextNode( "" ); sortNode.appendChild( textNode );
// Set the sort indicator to point in the right direction (up or down) if( bDescending == true ) sortNode.innerHTML = " ^"; else sortNode.innerHTML = " v";
// Place the indicator on this column heading (this should move it from its // previous home automatically) theColumn.appendChild( sortNode ); }
function compareColData( colNum, bDescending, sortType ) { switch( sortType ) { case "numeric": return numericSort( colNum, bDescending ); case "wow": return wowSort( bDescending ); default: // "alphanumeric" also goes here return alphaSort( colNum, bDescending ); } }
function wowSort( bDescending ) { return function( n1, n2 ) { // WoW rankings specially formatted as "<level> <Character Name>" // We will sort bDescending on the level first, if they have the same level // then sort by !bDescending on the Character Name // To minimalize the impact elsewhere, we ignore the colNum argument and always // get the WoW specific attributes var level1 = Number(n1.getAttribute( "level" )); var level2 = Number(n2.getAttribute( "level" )); if (level1 != level2) return (bDescending?(level1 - level2):(level2 - level1)); var name1 = n1.getAttribute( "charname" ); var name2 = n2.getAttribute( "charname" ); if (name1 == name2) return 0; if (name1 > name2) return (bDescending?-1:1); return (bDescending?1:-1); }; }
function fixColors( theTable ) { var len = theTable.rows.length; for(var i = 1; i < len; i++ ) // start at one so we don't touch the header row { // respect multiple classes var classname = theTable.rows[i].className; if(classname.indexOf("est_row1")!=-1) classname = classname.replace(/est_row1/g, ""); if(classname.indexOf("est_row2")!=-1) classname = classname.replace(/est_row2/g, "");
// for expanding individual rows function toggle_row_content( theImage ) { // Go up the chain until we hit the enclosing table var theTable = theImage; while( theTable != null && theTable.tagName.toLowerCase() != 'table' ) { theTable = theTable.parentNode; }
// Did we never hit a table? If so, do get out. if( theTable == null ) return;
Dzieki za wyczerpujaca instrukcje. Jezeli nie da sie przerzucic godzin na raptr, to sprawdze tego evolve. Jezeli liczy godziny, robi screeny i video, to spelnia moje wymagania.
Evolve moim zdaniem jest lepszy od Raptr. Mozna go minimalizowac do rozmiarow kompaktowych i jest szybszy. Szkoda ze nie mozna hostowac screenow na stronke, ale poza tym jest ok. Evolve tez importowal moje godzinki z Xfire.
Po wejsciu na strone glowna https://www.evolvehq.com/ automatycznie wyskoczylo mi podaj nick z Xfire. Jezeli Ci nie wyskoczylo, to po prawej na swoim profilu jest From the blog i tam jest watek Goodbye Xfire, We Will Miss You. I w tym temacie bedzie w tekscie podkreslone https://xfire.evolvehq.com/xfire klikasz w to i wpisujesz swoj nick z Xf.
Ostatnio zmieniony 24 cze 2015, 21:44 przez JSNI, łącznie zmieniany 2 razy.