开发者

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

GreaseMonkey Help with getElementsByClassName


I think you want to do:

Array.filter.call(document.getElementsByClassName('UIStoryAttachment_Title'), function(elem) {
  return elem.nodeName == 'A';
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜