BlueCat Address Manager Hover Address Type

Modify all address type images to show the type in text on hover over in BlueCat Address Manager

  1. // ==UserScript==
  2. // @name BlueCat Address Manager Hover Address Type
  3. // @namespace *
  4. // @description Modify all address type images to show the type in text on hover over in BlueCat Address Manager
  5. // @include */app*
  6. // @license MIT
  7. // @version 2
  8. // @grant none
  9. // @copyright 2018, Marius Galm
  10. // @icon https://www.bluecatnetworks.com/wp-content/uploads/2018/03/cropped-bluecat-favicon-32x32.png
  11. // ==/UserScript==
  12.  
  13. if (document.readyState === "interactive" ) {
  14. var ins = document.querySelectorAll("img");
  15.  
  16. for (var i = 0; i < ins.length; i++) {
  17. var image = ins[i];
  18. if (image !== undefined) {
  19. // odd, shouldn't happen
  20. if (image.src.indexOf("pawn_glass_red.gif") > -1) {
  21.  
  22. image.title = "Network IP / Broadcast";
  23. } else if (image.src.indexOf("pawn_glass_yellow.gif") > -1) {
  24. image.title = "Gateway";
  25. } else if (image.src.indexOf("pawn_glass_blue.gif") > -1) {
  26. image.title = "Static";
  27. } else if (image.src.indexOf("pawn_glass_green.gif") > -1) {
  28. image.title = "Reserved";
  29. } else if (image.src.indexOf("pawn_glass_white_new_attention.gif") > -1) {
  30. image.title = "DHCP Free";
  31. } else if (image.src.indexOf("pawn_glass_blue_new.gif") > -1) {
  32. image.title = "DHCP Allocated";
  33. } else if (image.src.indexOf("pawn_glass_green_new.gif") > -1) {
  34. image.title = "DHCP Reserved";
  35. } else if (image.src.indexOf("pawn_glass_white.gif") > -1) {
  36. image.title = "Unassigned";
  37. } else if (image.src.indexOf("pawn_glass_white_exclude.gif") > -1) {
  38. image.title = "DHCP Exclude";
  39. } else if (image.src.indexOf("pawn_glass_white_new.gif") > -1) {
  40. image.title = "Unassigned (DHCP)";
  41. }
  42. }
  43. //console.log(ins[i]);
  44. }
  45. }