Almascript - Reports Interface

Add some buttons

  1. // ==UserScript==
  2. // @name Almascript - Reports Interface
  3. // @namespace https://greasyfork.org/en/users/8332-sreyemnayr
  4. // @version 2019.8.23.1
  5. // @description Add some buttons
  6. // @author Ryan Meyers
  7. // @match https://sges.getalma.com/reports*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13. var tabList = document.getElementsByClassName('sc-tabmenu')[0].children[0];
  14. // tabList.children[2].children[0].innerText = "ssde:students";
  15.  
  16. for (var l of ['class','staff','parent','student']){
  17. var ss = tabList.children[2].cloneNode(true);
  18. if (document.location.pathname.split('/').pop() != l) {
  19. ss.classList.remove("pure-menu-selected");
  20. }
  21. ss.children[0].innerHTML = "<i class=\"fas fa-table\"></i> "+l;
  22. ss.children[0].href = "/reports/spreadsheets/"+l;
  23. tabList.insertBefore(ss, tabList.children[3]);
  24. }
  25. tabList.children[2].remove();
  26. tabList.children[1].remove();
  27.  
  28. // Your code here...
  29. })();