Created
May 3, 2021 01:10
-
-
Save philip13/991dd2be3a2a64c730858beb8a0fd6e3 to your computer and use it in GitHub Desktop.
Garmin connect, remove column4 and convert main column to 12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const pageContent = document.getElementsByClassName('page-content'); | |
const chidls = pageContent[0].childNodes; | |
for (let i = 0; i < chidls.length; i++) { | |
if (chidls[i].className === 'span4') { | |
let toRemove = chidls[7]; | |
toRemove.parentNode.removeChild(toRemove); | |
} | |
if (chidls[i].className === 'span8') { | |
let element = chidls[i]; | |
element.classList.remove('span8'); | |
element.classList.add('span12') | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment