Added option to hide the welcome message.
This commit is contained in:
@@ -29,5 +29,6 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"user": "Deepjyoti"
|
||||
"user": "Deepjyoti",
|
||||
"disableMessage": true
|
||||
}
|
||||
|
||||
28
index.html
28
index.html
@@ -16,34 +16,6 @@
|
||||
<input id="search-bar-input" placeholder="Search something on Google"></input>
|
||||
</div>
|
||||
<div id="other-content">
|
||||
<!--div class="sqr media">
|
||||
<h4>Media</h4>
|
||||
<a href="https://open.spotify.com/">Spotify</a>
|
||||
<a href="https://music.youtube.com/">Youtube Music</a>
|
||||
<a href="https://netflix.com">Netflix</a>
|
||||
<a href="https://youtube.com">Youtube</a>
|
||||
</!--div>
|
||||
<div class="sqr work">
|
||||
<h4>Work</h4>
|
||||
<a href="https://github.com">Github</a>
|
||||
<a href="http://heroku.com/">Heroku</a>
|
||||
<a href="http://localhost:8000/">Localhost</a>
|
||||
<a href="http://deepjyoti30.github.io/">Personal</a>
|
||||
</div>
|
||||
<div class="sqr social">
|
||||
<h4>Social</h4>
|
||||
<a href="reddit.com">Reddit</a>
|
||||
<a href="https://deepjyoti30.github.io/unixporn-love/">Unixpornlove</a>
|
||||
<a href="https://www.reddit.com/r/unixporn/">r/unixporn</a>
|
||||
<a href="https://www.reddit.com/r/MechanicalKeyboards/">r/mk</a>
|
||||
</div>
|
||||
<div-- class="sqr others">
|
||||
<h4>Others</h4>
|
||||
<a href="http://localhost:7474/">neo4j local</a>
|
||||
<a href="http://rarbg.to">rarbg</a>
|
||||
<a href="http://materialuicolors.co/">materialui colors</a>
|
||||
<a href="http://gmail.com/">Gmail</a>
|
||||
</div-->
|
||||
</div>
|
||||
</div>
|
||||
<!--Custom JS-->
|
||||
|
||||
@@ -3,6 +3,7 @@ window.onload = function() {
|
||||
}
|
||||
|
||||
searchBarId = "search-bar-input"
|
||||
messageDivId = "message"
|
||||
messageId = "message-text"
|
||||
otherContentId = "other-content"
|
||||
userName = "Deepjyoti"
|
||||
@@ -94,6 +95,11 @@ function parseAndCreate(jsonData) {
|
||||
builtMsg = `Hello ${this.userName}` : builtMsg = `Hey ${this.userName}, ${builtMsg}!`
|
||||
document.getElementById(messageId).textContent = builtMsg
|
||||
|
||||
// Check if welcome message is supposed to be disabled
|
||||
disableMsg = jsonData["disableMessage"]
|
||||
if (disableMsg)
|
||||
document.getElementById(messageDivId).style.display = "none"
|
||||
|
||||
|
||||
sqrs = jsonData["squares"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user