OLD | NEW |
---|---|
(Empty) | |
1 function() { | |
Yaron
2014/08/12 18:55:05
Rename something like is_distillable_trigger
Yaron
2014/08/12 18:55:05
Add copyright
smaslo
2014/08/12 20:42:23
Done.
smaslo
2014/08/12 20:42:23
I renamed the class. If I give the method a name,
| |
2 var elems = document.querySelectorAll( | |
3 'meta[property="og:type"],meta[name=\\"og:type\\"]'); | |
4 for (var i in elems) { | |
5 if (elems[i].content && elems[i].content.toUpperCase() == 'ARTICLE') { | |
6 return true; | |
7 } | |
8 } | |
9 var elems = document.querySelectorAll( | |
10 '*[itemtype="http://schema.org/Article"]'); | |
11 for (var i in elems) { | |
12 if (elems[i].itemscope) { | |
13 return true; | |
14 } | |
15 } | |
16 return false; | |
17 } | |
OLD | NEW |