function isHidden(el) {
var style = window.getComputedStyle(el);
return ((style.display === 'none') || (style.visibility === 'hidden'))
}
// get the body tag
var body = document.querySelector('body');
// get all tags inside body
var allTags = body.getElementsByTagName('*');
//console.log(allTags);
for (var i = 0, max = allTags.length; i < max; i++) {
if (isHidden(allTags[i])){
// hidden
}
else {
console.log(allTags[i].innerText);
}
}