auto-open-ciat

auto_open-gnats

  1. // ==UserScript==
  2. // @name auto-open-ciat
  3. // @namespace www.juniper.net
  4. // @version 1.1
  5. // @description auto_open-gnats
  6. // @author Yan Zhongwen
  7. // @include http*://*pvs.jnpr.net/jss-ciat/app/home*
  8. // @include http*://*pvs.juniper.net/jss-ciat/app/home*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. function openALLPR_onthisPage () {
  13. Table_all = window.top.frames[9].document.getElementsByClassName('customSort')[0];
  14. for (var i=1, len=Table_all.rows.length; i<len-1; i++) {
  15. ELEMENT = Table_all.getElementsByTagName('tr')[i].getElementsByTagName('td')[1].getElementsByTagName('a');
  16. ELEMENT[0].click();
  17. // Gnats ELEMENT[1].click();
  18. };
  19. };
  20. if (self == top) {
  21. LstBun = document.getElementById('myslidemenu').childNodes[1].lastChild;
  22. bun_NEW = window.frames[9].document.createElement("input");
  23. bun_NEW.type = "button";
  24. bun_NEW.value = "Go!";
  25. bun_NEW.name = 'DE';
  26. bun_NEW.style.cssText = "height: 30px; cursor:pointer; color:#f3f3f3; border-top-left-radius: 10px; border-bottom-right-radius: 10px; width: 45px; background-color: rgb(92, 184, 92); border-color: rgb(76, 174, 76);";
  27. bun_NEW.onclick = openALLPR_onthisPage;
  28. LstBun.parentNode.appendChild(bun_NEW);
  29. };