Difference between revisions of "Less Detail"

From James Dooley's Wiki
Jump to: navigation, search
(Created page with "==Overview== Removes global daily stats from the page. Shows only users in the userlist variable. ==Script== <code>[javascript,n] // ==UserScript== // @name less-det...")
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
[[Category:GreaseMonkey]]
 
==Overview==
 
==Overview==
 
Removes global daily stats from the page.
 
Removes global daily stats from the page.
Line 6: Line 7:
 
==Script==
 
==Script==
  
<code>[javascript,n]
+
<source lang='javascript'>
 
// ==UserScript==
 
// ==UserScript==
 
// @name          less-detail
 
// @name          less-detail
Line 14: Line 15:
 
// ==/UserScript==
 
// ==/UserScript==
  
var userlist = new Array("jdooley","jscott","jschinkel","bnienhouse","aauble","bking","jtaylor","mgearhart","nhubbard","awilliams","bmata","mjung","tholloway");
+
var userlist = new Array("jdooley","jscott","jschinkel","aauble","bking","jtaylor","mgearhart","nhubbard","awilliams","mjung","tholloway","jbeckmeyer","pcrandall","travisz","ssayers","mwineland");
  
 
document.getElementsByTagName('h3')[0].style.display = "none"
 
document.getElementsByTagName('h3')[0].style.display = "none"
Line 30: Line 31:
 
}
 
}
 
}
 
}
</code>
+
</source>
  
 
==What to change==
 
==What to change==
 
userlist needs to be changed with the list of users you want to display.
 
userlist needs to be changed with the list of users you want to display.

Latest revision as of 14:33, 25 March 2014

Overview

Removes global daily stats from the page.

Shows only users in the userlist variable.

Script

// ==UserScript==
// @name           less-detail
// @namespace      http://jamesdooley.us
// @description    Removes extra junk from response chart and only shows enterprise staff.
// @include        https://hd.int.liquidweb.com/stats/detail.mhtml
// ==/UserScript==

var userlist = new Array("jdooley","jscott","jschinkel","aauble","bking","jtaylor","mgearhart","nhubbard","awilliams","mjung","tholloway","jbeckmeyer","pcrandall","travisz","ssayers","mwineland");

document.getElementsByTagName('h3')[0].style.display = "none"
document.getElementsByTagName('table')[0].style.display = "none"

var trlist = document.getElementsByTagName('table')[1].getElementsByTagName('tr');

for (var i=1; i < trlist.length; i++) {
	var uname = trlist[i].getElementsByTagName('td')[0].innerHTML
	trlist[i].style.display = "none"
	for (var u=0; u < userlist.length; u++) {
		if (uname==userlist[u]) {
			trlist[i].style.display = ""
		}
	}
}

What to change

userlist needs to be changed with the list of users you want to display.