Guest User

Untitled

a guest
Jun 22nd, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. //copy the following into browser console and run
  2. (()=>{
  3. let root=document.querySelector('div[itemprop="reviewBody"]'),
  4. selCalc = sel => [].slice.call(root.querySelectorAll(sel)).reduce((v,el)=> v + (parseFloat(getComputedStyle(el).height) || 0), 0),
  5. totalImageHeight = selCalc('div[align="center"] img'), totalTextHeight = selCalc('p'),
  6. totalHeight = totalImageHeight + totalTextHeight;
  7. console.log('Percentage: images - ' + (100*totalImageHeight/totalHeight).toFixed(2) + '%, text - ' + (100*totalTextHeight/totalHeight).toFixed(2) + '%')
  8. console.log('Paschenism ratio:', (totalImageHeight/totalTextHeight).toFixed(2))
  9. })()
Add Comment
Please, Sign In to add comment