Hi,
I try to assign my function to one <A> element in this GM script, but
it doesn't work as hoped for (after pressing Alt+L in Firefox 1.5
nothing happens). Does anybody see what I am doing wrong here?
window.openNewL ocation = function() {
alert("OK");
}
var ATags = document.getEle mentsByTagName( "a");
var hrefArray = window.location .href.split("/");
hrefArray[hrefArray.lengt h-1] = "gallery";
var imageHREF = hrefArray.join( "/");
// window.open(thi s.href,'extern' ).focus();retur n false"
// http://cingular.rbmfrontline.com/locations
for (var i = 0; i < ATags.length; i++)
{
tempElem = ATags[i];
if (tempElem.getAt tribute("href") ==
"http://cingular.rbmfro ntline.com/locations") {
tempElem.access key = "L";
tempElem.onClic k = "function() {openNewLocatio n();return false}";
GM_log('attribu tes = ' + String(tempElem .onClick));
}
};
Thanks a lot,
Matej
I try to assign my function to one <A> element in this GM script, but
it doesn't work as hoped for (after pressing Alt+L in Firefox 1.5
nothing happens). Does anybody see what I am doing wrong here?
window.openNewL ocation = function() {
alert("OK");
}
var ATags = document.getEle mentsByTagName( "a");
var hrefArray = window.location .href.split("/");
hrefArray[hrefArray.lengt h-1] = "gallery";
var imageHREF = hrefArray.join( "/");
// window.open(thi s.href,'extern' ).focus();retur n false"
// http://cingular.rbmfrontline.com/locations
for (var i = 0; i < ATags.length; i++)
{
tempElem = ATags[i];
if (tempElem.getAt tribute("href") ==
"http://cingular.rbmfro ntline.com/locations") {
tempElem.access key = "L";
tempElem.onClic k = "function() {openNewLocatio n();return false}";
GM_log('attribu tes = ' + String(tempElem .onClick));
}
};
Thanks a lot,
Matej
Comment