OLD | NEW |
(Empty) | |
| 1 return (function() { |
| 2 function hasOGArticle() { |
| 3 var elems = document.head.querySelectorAll( |
| 4 'meta[property="og:type"],meta[name="og:type"]'); |
| 5 for (var i in elems) { |
| 6 if (elems[i].content && elems[i].content.toUpperCase() == 'ARTICLE') { |
| 7 return true; |
| 8 } |
| 9 } |
| 10 return false; |
| 11 } |
| 12 |
| 13 var body = document.body; |
| 14 return { |
| 15 'opengraph': hasOGArticle(), |
| 16 'url': document.location.href, |
| 17 'numElements': body.querySelectorAll('*').length, |
| 18 'numAnchors': body.querySelectorAll('a').length, |
| 19 'numForms': body.querySelectorAll('form').length, |
| 20 'innerText': body.innerText, |
| 21 'textContent': body.textContent, |
| 22 'innerHTML': body.innerHTML, |
| 23 } |
| 24 })() |
OLD | NEW |