Skip to content

Instantly share code, notes, and snippets.

@wunnle
Last active February 14, 2023 14:21
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 wunnle/6dcbb5164c9799720ab36e0f373eb349 to your computer and use it in GitHub Desktop.
Save wunnle/6dcbb5164c9799720ab36e0f373eb349 to your computer and use it in GitHub Desktop.
(function() {
setTimeout(() => {
console.log("hello world");
const mobilePhoneNumber = document.querySelector("[data-selenium-test=property-input-mobilephone]")?.value.replace(/\D/g, "");
const phoneNumber = document.querySelector("[data-selenium-test=property-input-phone]")?.value.replace(/\D/g, "");
const buttonElem = `<div class="m-x-2 m-top-2 text-center"><a href="dialpad://${mobilePhoneNumber|phoneNumber}|1" class="uiButton private-button private-button--primary private-button--sm private-button--icon-only private-button--circle private-button--active" tabindex="0" type="button" style="
background-color: #4079F5;
border-color: #4079F5;
width: 40px;
font-size: 16px;
padding-left: 0;
text-align: center;
padding-right: 0;
display: flex;
-webkit-box-align: center;
align-items: center;
-webkit-box-pack: center;
justify-content: center;
height: 40px;
"><span class="private-icon private-icon__low" data-icon-name="calling" style="font-size: 16px;"><span aria-hidden="true" class="UIIcon__IconContent-tsbrem-0" style="
font: inherit !important;
">calling</span></span></a></div>`
const controls = document.querySelector(".uiListItem .justify-center");
controls.innerHTML = controls.innerHTML + buttonElem;
const onboardingButton = document.querySelector("[data-onboarding=create-engagement-call]")
onboardingButton.style.display = "none"
}, 2000)
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment