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