Skip to content

Instantly share code, notes, and snippets.

@messagetobala
Last active January 26, 2023 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save messagetobala/0a6bfb5ca7016c0ca3f48cf5e85beab1 to your computer and use it in GitHub Desktop.
Save messagetobala/0a6bfb5ca7016c0ca3f48cf5e85beab1 to your computer and use it in GitHub Desktop.
function modifyContent() {
document.body.textContent = ""
let bodyDiv = document.createElement('div')
bodyDiv.setAttribute("class", "watchdog_body")
let headerSection = document.createElement('section')
headerSection.setAttribute("class", "watchdog_header_section")
let headerPara_1 = document.createElement('p')
headerPara_1.setAttribute("class", "watchdog_para")
headerPara_1.textContent = 'A slight change in your daily habits can guide your life to a very different destination.'
let headerPara_2 = document.createElement('p')
headerPara_2.textContent = '- James Clear'
headerSection.appendChild(headerPara_1)
headerSection.appendChild(headerPara_2)
bodyDiv.appendChild(headerSection)
document.body.appendChild(bodyDiv)
}
modifyContent()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment