JSS - Edit Buttons & No Category On Top

Put edit links next to app names and move the no category category to the top of the page

目前為 2016-01-28 提交的版本,檢視 最新版本

// ==UserScript==
// @name         JSS - Edit Buttons & No Category On Top
// @namespace    http://your.homepage/
// @version      0.3
// @description  Put edit links next to app names and move the no category category to the top of the page
// @author       Ryan Meyers
// @match        https://serenity.local:8443/mobileDeviceApps.html*
// @grant        none
// ==/UserScript==

$.each($('.group-item > td > a'), function(i,v){$(v).parent().append("<a href=\""+$(v).attr("href").replace("o=r","o=u")+"\" style=\"font-size:7pt\">edit</a>");});
$.each($('tr.group-item-no-category-assigned'), function(i,v){$('tbody').prepend($(v))});
$('tbody').prepend($('tr.no-category-assigned'));
if($('#FIELD_CATEGORY').length > 0 && $('#FIELD_CATEGORY').val() == -1)
{
$('#FIELD_MOBILE_DEVICE_TARGETS').val('All');
$('#FIELD_USER_TARGETS').val('All');
}
if($('tr.group-item-no-category-assigned').length > 0) $('#content-inside > h2').append(" - "+$('tr.group-item-no-category-assigned').length+" unassigned");