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 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name JSS - Edit Buttons & No Category On Top
  3. // @namespace http://your.homepage/
  4. // @version 0.3
  5. // @description Put edit links next to app names and move the no category category to the top of the page
  6. // @author Ryan Meyers
  7. // @match https://serenity.local:8443/mobileDeviceApps.html*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. $.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>");});
  12. $.each($('tr.group-item-no-category-assigned'), function(i,v){$('tbody').prepend($(v))});
  13. $('tbody').prepend($('tr.no-category-assigned'));
  14. if($('#FIELD_CATEGORY').length > 0 && $('#FIELD_CATEGORY').val() == -1)
  15. {
  16. $('#FIELD_MOBILE_DEVICE_TARGETS').val('All');
  17. $('#FIELD_USER_TARGETS').val('All');
  18. }
  19. if($('tr.group-item-no-category-assigned').length > 0) $('#content-inside > h2').append(" - "+$('tr.group-item-no-category-assigned').length+" unassigned");