Trevor Butcher
unread,Aug 28, 2012, 2:17:05 AM8/28/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to greasemon...@googlegroups.com
Hi, I write my own scripts using my fairly basic knowledge of javascript. Very occasionally I will use a script fragment that I do not understand, to do something specific. And it just happens that one of these is no longer functioning since greasemonkey auto updated to 1.0 from whatever version of 0.9 it had been running.
This part of the script builds a table to be inserted at the bottom of a page, with the table having alternate background colors for the rows.
...
// Zebra table stripe
var even = false;
var evenColor = arguments[1] ? arguments[1] : "#000";
var oddColor = arguments[2] ? arguments[2] : "#226";
// table content
var mtbody=document.createElement("tbody");
for ( i = 0; i < total_row_numb; i++ )
{
if ( string_chng != 4 ) // do not add date data to array_PRES (Rank)
{
array_PRES[i][1] = array_month[array_PRES[i][1]];
array_PRES[i][3] = array_universe[array_PRES[i][3]];
};
var mtrow=document.createElement("tr");
mtrow.style.background = even ? evenColor : oddColor;
...
The row the script stops on is: var evenColor = arguments[1] ? arguments[1] : "#000";
If I reload 0.9 the script works fine again.
At the moment I am on my work machine and so won't be able to do any tests until I get home in about 8 hours or so to reload greasemonkey 1.0 on my home machine.
Thanks
Trevor