fix for check on content existing

This commit is contained in:
Richard Wright 2018-06-30 15:53:50 -04:00
parent fbc8b45456
commit 2b86c3c53d

View File

@ -2,12 +2,14 @@ if (window.location.href.indexOf("bizjournals.com") > -1) {
const hiddenStory = document.getElementsByClassName( const hiddenStory = document.getElementsByClassName(
"js-pre-chunks__story-body" "js-pre-chunks__story-body"
); );
if (hiddenStory) { if (hiddenStory && hiddenStory.length>0) {
hiddenStory[0].style.display = "block"; hiddenStory[0].style.display = "block";
} }
const payWallMessage = document.getElementsByClassName("chunk chunk--flex@lg chunk--paywall"); const payWallMessage = document.getElementsByClassName(
if (hiddenStory) { "chunk chunk--flex@lg chunk--paywall"
);
if (payWallMessage && payWallMessage.length>0 ) {
payWallMessage[0].style.display = "none"; payWallMessage[0].style.display = "none";
} }
} }