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