Difference between revisions of "Not So Important"

From James Dooley's Wiki
Jump to: navigation, search
 
Line 8: Line 8:
 
==Script==
 
==Script==
  
<code>[javascript,n]
+
<source lang='javascript'>
 
// ==UserScript==
 
// ==UserScript==
 
// @name          Not So Important
 
// @name          Not So Important
Line 34: Line 34:
 
return true;
 
return true;
 
}
 
}
</code>
+
</source>
  
 
==What to change==
 
==What to change==

Latest revision as of 14:34, 25 March 2014

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