GreaseMonkey Help with getElementsByClassName
I am new to GM and trying to write my first user script. I am trying to get a URL from a facebook comment I was trying to use this.
var e = Array.filter( document.getElementsBy开发者_如何学PythonClassName('UIStoryAttachment_Title'), function(elem) {
return elem.nodeName == 'A';
}
);
But each time I seem to open up a blank page any help on this would be great
I think you want to do:
Array.filter.call(document.getElementsByClassName('UIStoryAttachment_Title'), function(elem) {
return elem.nodeName == 'A';
});
精彩评论