Not So Important

From James Dooley's Wiki
Jump to: navigation, search

Overview

Removes "Important" customer tickets from enterprise HD.

Only looks through ticket area of screen and hides the tr tag for elements that contain the important icon.

Script

// ==UserScript==
// @name           Not So Important
// @namespace      http://jamesdooley.us
// @description    Remove important tickets from HD view
// @include        https://hd.int.liquidweb.com/priority/
// @include        https://adminhd.liquidweb.com/priority/
// ==/UserScript==

var hdform = document.getElementsByTagName('form');
var trlist = hdform[3].getElementsByTagName('tr');

for (var i=0; i < trlist.length; i++) {
	var imgele = trlist[i].getElementsByTagName('img')
	if (imgele.length > 0) {
		notsoimportant(imgele)
	}
}

function notsoimportant (imgelement) {
	if (imgelement[0].alt == "auth-importantpriority") { 
		var style = trlist[i].style
		style.display = "none"
	}
	return true;
}

What to change