Created
May 18, 2016 23:10
-
-
Save Efreak/b7004b995b3270fc880a92523369116d 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
c=jQuery('td'); | |
for(i=0;i<c.length;i++){ | |
c[i].innerHTML=c[i].innerText | |
} | |
function sec(e){if(window.getSelection&&document.createRange){var t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}else if(document.selection&&document.body.createTextRange){var o=document.body.createTextRange();o.moveToElementText(e),o.select()}} | |
if(jQuery(".account_table").length) { | |
sec(jQuery(".account_table")[0]); | |
jQuery('<thead/>').insertBefore(jQuery('table.account_table > tbody')); | |
jQuery('table.account_table > tbody > tr:nth-child(1)').appendTo(jQuery('table.account_table > thead')); | |
jQuery('table').addClass('sortable'); | |
} else { | |
sec(jQuery(".wallet_history_table")[0]); | |
jQuery('#main_content > table > thead')[0].innerHTML='<tr><th rowspan="2" class="wht_date">Date</th><th rowspan="2" class="wht_items">Items</th><th rowspan="2" class="wht_type">Type</th><th rowspan="2" class="wht_total">Total</th><th rowspan="2" class="wht_wallet_change">Wallet Change</th><th rowspan="2" class="wht_wallet_balance">W. Balance</th></tr>'; | |
jQuery('#main_content > table').addClass('sortable'); | |
//color the text based on whether payment source comes from wallet or paypal | |
jQuery(".wht_type:contains('Wallet')").css('color','green'); | |
jQuery(".wht_type:contains('PayPal')").css('color','#b10000'); | |
//color the wallet change based on adding/removing money | |
jQuery(".wallet_column.wht_wallet_change:contains('+')").css('color','green'); | |
jQuery(".wallet_column.wht_wallet_change:contains('-')").css('color','#b10000'); | |
jQuery(".wht_items:contains('Steam Community Market')").css('opacity','0.7'); | |
jQuery(".wht_items:contains('Steam Community Market')").css('opacity','0.6'); | |
jQuery("tr:contains('Steam Community Market')").css('opacity','0.8'); | |
//color credits in the total column | |
jQuery(".wht_total:contains('Credit')").css('color','green'); | |
} | |
jQuery('<script src="https://www.kryogenix.org/code/browser/sorttable/sorttable.js"></script>').appendTo(jQuery('head')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment