Yes, if you want to grab button values automatically, without futzing with Firebug on every page, Greasemonkey can do that.
Here's a script that should get you started. Be sure to adjust the @include
statements to match your target sites.
//
// ==UserScript==
// @name Button value grabber
// @namespace Gambling
// @description Grabs button values.
// @include *
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
// ==/UserScript==
//
$(document).ready (Greasemonkey_main);
function Greasemonkey_main ()
{
/*--- Create a container div and area for the values. It will be styled and
postioned with CSS.
*/
$("body").append
(
'<div id="GM_PopUpDiv">'
+ '<h3>Button Values on this page:</h3>'
+ '<form id="GM_ContForm"><textarea id="GM_BtnValues"><\/textarea><\/form>'
+ '<\/div>'
);
//--- Make it almost invisible when not moused over.
$('#GM_PopUpDiv').hover
(
function () { $(this).stop (true, false).fadeTo (50, 1); },
function () { $(this).stop (true, false).fadeTo (900, 0.15); }
);
/*--- Copy the button values. Fine-tune the selector to taste.
For example, input.ris[type='button']
*/
var NumRows = 0;
var BtnVals = $("input[type='button']").map (function(J) {
NumRows = J;
return this.value;
} ).get ().join ('\n')
;
/*--- Paste the values into the textarea and adjust the height to the data
(within the min/max set by CSS, below).
*/
$("#GM_BtnValues").text (BtnVals). css ('height', NumRows + 4 + 'em');
}
//--- This is just CSS to make the new stuff look "purty".
GM_addStyle
(
'#GM_PopUpDiv \
{ \
font-size: 16px; \
background: wheat; \
border: 3px double #999999; \
margin: 5px; \
\
min-height: 100px; \
min-width: 400px; \
padding: 5px 20px; \
\
opacity: 0.15; \
z-index: 1222; \
position: fixed; \
top: 0px; \
left: 0px; \
} \
#GM_PopUpDiv textarea \
{ \
font-size: 16px; \
min-height: 6em; \
max-height: 32em; \
width: 100%; \
padding: 8px; \
word-wrap: normal; \
} \
#GM_PopUpDiv h3 \
{ \
font-size: 16px; \
text-align: left; \
margin: 0px; \
} \
'
);