Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. // ==UserScript==
  2. // @name [Hubspot][Ticket] Show Buttons to Gitlab
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description try to take over the world!
  6. // @author You
  7. // @match https://app.hubspot.com/contacts/*/tickets/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict'; // ADD REFRESH WHEN SAVED
  13.  
  14. jQuery(function($) {
  15. var count = 0;
  16.  
  17. var existCondition = setInterval(function() {
  18. jQuery('.private-table').css('zoom', '0.90');
  19.  
  20. jQuery('.private-table tbody tr').each(function( index ) {
  21. var status = $( this ).children("td").eq(4).children("span").text();
  22.  
  23.  
  24. if(status == 'Offen') {
  25. $( this ).css('backgroundColor', '#ffd6d6');
  26. }
  27. if(status == 'Neu') {
  28. $( this ).css('backgroundColor', '#fff3b5');
  29. }
  30. if(status == 'Wartend') {
  31. $( this ).css('backgroundColor', '#cfdeff');
  32. }
  33. if(status == 'Angehalten') {
  34. $( this ).css('backgroundColor', '#e0e0e0');
  35. }
  36. });
  37.  
  38. if(++count == 1) {
  39. //clearInterval(existCondition);
  40. }
  41. }, 1000);
  42. });
  43. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement