Difference between revisions of "HD Button Remove"

From James Dooley's Wiki
Jump to: navigation, search
(Created page with "==Overview== Cleans up HD keyword button clutter. ==Script== <code>[javascript,n] // ==UserScript== // @name Button Remover // @namespace http://jamesdooley.us ...")
 
(Script)
Line 11: Line 11:
 
// @description    Get rid of button clutter
 
// @description    Get rid of button clutter
 
// @include        https://adminhd.liquidweb.com*/msgs/*
 
// @include        https://adminhd.liquidweb.com*/msgs/*
 +
// @include        https://hd.int.liquidweb.com*/msgs/*
 
// ==/UserScript==
 
// ==/UserScript==
  

Revision as of 13:03, 4 May 2011

Overview

Cleans up HD keyword button clutter.

Script

[javascript,n] // ==UserScript== // @name Button Remover // @namespace http://jamesdooley.us // @description Get rid of button clutter // @include https://adminhd.liquidweb.com*/msgs/* // @include https://hd.int.liquidweb.com*/msgs/* // ==/UserScript==

//List of buttons by value to remove var btnlist = new Array("besteffort","document_this","escalations","resolver-changed","storm","support_handoff","terminations");

var hdbutton = document.getElementsByTagName('button'); for (var i=0; i < hdbutton.length; i++) { btnremove(hdbutton[i].getAttribute('value')) }

function btnremove (btnvalue){ for (var b=0; b < btnlist.length; b++) { if (btnvalue==btnlist[b]) { var style = hdbutton[i].style; style.display = 'none'; } } return false; }

What to change

btnlist contains a list of buttons you wish to remove. The value is the text that is displayed on the button.