diff --git a/blocks/contactus/contactus.css b/blocks/contactus/contactus.css new file mode 100644 index 00000000..bcd82702 --- /dev/null +++ b/blocks/contactus/contactus.css @@ -0,0 +1 @@ +/* Only comments */ \ No newline at end of file diff --git a/blocks/contactus/contactus.js b/blocks/contactus/contactus.js new file mode 100644 index 00000000..b4fc75b7 --- /dev/null +++ b/blocks/contactus/contactus.js @@ -0,0 +1,27 @@ +export default function decorate() { + const contactUsClass = document.getElementsByClassName('contactus block'); + contactUsClass[0].setAttribute('id', 'section-support'); + contactUsClass[0].children[0].setAttribute('class', 'outer'); + contactUsClass[0].children[0].children[0].setAttribute('class', 'text'); + const contactUsDiv = contactUsClass[0].children[0].children[0]; + const pTags = contactUsDiv.getElementsByTagName('p'); + let innerElements = ''; + let phone = ''; + for (let i = 0; i < pTags.length; i += 1) { + if (i === 0) { + const ContactUsTitle = pTags[i].outerHTML.replace(/
/g, '
/g, ``); + phone.replace(/<\/p>/g, ''); + pTags[i].innerHTML = `
`; + const button = pTags[i].outerHTML.replace(//g, ''); + innerElements += button.replace(/<\/p>/g, ''); + } + } + contactUsDiv.innerHTML = innerElements; +}