Created
March 25, 2016 05:08
-
-
Save EFox2413/658707f6b497488524bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Display Stats | |
// @namespace https://github.com/EFox2413/initiumGrease | |
// @version 0.1.0 | |
// @updateURL https://gist.githubusercontent.com/EFox2413/658707f6b497488524bb/raw/5a9ffecc2b0047596db41c2ca0684cfcf7691cbb/Display%2520Stats | |
// @downloadURL https://gist.githubusercontent.com/EFox2413/658707f6b497488524bb/raw/5a9ffecc2b0047596db41c2ca0684cfcf7691cbb/Display%2520Stats | |
// @description try to take over the world! | |
// @author EFox2413 | |
// @match https://www.playinitium.com/* | |
// @grant none | |
// ==/UserScript== | |
/* jshint -W097 */ | |
'use strict'; | |
var $ = window.jQuery; | |
var charDiv = $('.character-display-box').children(" div:nth-child(3)").children( 'a' ); | |
var statsItems; | |
var statsID = ["S", "D", "I", "W"]; | |
var href = $( '.character-display-box').children().first().attr( "rel" ); | |
$.ajax({ | |
url: href, | |
type: "GET", | |
success: function(data) { | |
statsItems = $(data).find('.main-item-subnote'); | |
statsItems.each(function( index ) { | |
if ( index > 0 ) { | |
charDiv.append( " <span style=\"font-size:small\"> " + statsID[index - 1] + ":" + $( this ).text().split(" ")[0] + " </span>"); | |
} | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment