Skip to content

Commit

Permalink
Make changes to read the global new tab flag
Browse files Browse the repository at this point in the history
  • Loading branch information
deepjyoti30 committed Jul 1, 2022
1 parent 29ae29c commit c6842d0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,14 @@ function parseAndCreate(jsonData) {

sqrs = jsonData["squares"]

globalNewTabEnabled = false
passedNewTab = jsonData["linkInNewTab"]
if (passedNewTab != undefined) {
globalNewTabEnabled = passedNewTab
}

sqrs.forEach((element, index) => {
sqr = createSqr(element, index)
sqr = createSqr(element, index, globalNewTabEnabled)
document.getElementById(otherContentId).appendChild(sqr)
})

Expand Down

0 comments on commit c6842d0

Please sign in to comment.