开发者

GreaseMonkey Help with getElementsByClassName

开发者 https://www.devze.com 2023-01-30 16:17 出处:网络
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.

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

精彩评论

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