I'll keep this short and sweet.
The zOMG Inventory tab was giving me a headache so I added a sort button. Use it, edit it.. I don't really care.
Tampermonkey Script
Spoiler:Code:// ==UserScript== // @name zOMG Ring Sorter // @namespace all // @include http://www.gaiaonline.com/inventory* // @version 1 // @grant none // ==/UserScript== (function(){ 'use strict'; window.addEventListener('load', () => { addButton('click', sortRings); }); function addButton(text, onclick, cssObj) { cssObj = cssObj || {position: 'block'}; var zomgDiv = document.getElementById('tabs_container'); let button = document.createElement('button'), btnStyle = button.style; zomgDiv.prepend(button); var html_to_insert = "<span>Sort Rings</span>"; button.innerHTML += html_to_insert; button.onclick = onclick; button.className = 'cta-button-md'; Object.keys(cssObj).forEach(key => btnStyle[key] = cssObj[key]); return button; } function sortRings() { $("#zomg li").sort(sort_li).appendTo('#zomg ul'); function sort_li(a, b){ return ($(b).data('item')) < ($(a).data('item')) ? 1 : -1; } } }());
If you want to save the sort just move an item to enable the save button
Results 1 to 11 of 11
Threaded View
- 09 Apr. 2017 02:03am #1
Global Moderator Glamorous
- Join Date
- Apr. 2011
- Location
- 192.168.2.1
- Posts
- 990
- Reputation
- 584
- LCash
- 0.00
- Awards
[Userscript] - zOMG Inventory Ring Sorter
Last edited by XiRaX; 10 Apr. 2017 at 02:53am.