3
0
mike e92adde24a
All checks were successful
continuous-integration/drone/push Build is passing
updating staging theme for helpbuild
2024-04-04 20:26:31 +02:00

54 lines
1.7 KiB
JavaScript

const fixPolicy = () => {
const privacyPolicy = document.getElementById('privacy-policy');
if (privacyPolicy) {
privacyPolicy.innerHTML = '<span>By signing up, you agree to our <a href="https://helpbuild.co/terms/">Terms and Conditions</a> and <a href="https://helpbuild.co/privacy/">Privacy Policy</a></span>'
}
}
const swapLinkedIn = () => {
var anchor = document.getElementById('social-linkedin-openid-connect');
if (anchor) {
anchor.insertAdjacentHTML('afterbegin', '<i class="kc-social-provider-logo kc-social-gray fa fa-linkedin" aria-hidden="true"></i> ');
}
// Get the span element
var span = anchor.getElementsByClassName('kc-social-provider-name')[0];
// Change the text of the span
span.textContent = 'Sign in with LinkedIn';
}
const renameGoogle = () => {
var anchor = document.getElementById('social-google');
if (!anchor) return;
// Get the span element
var span = anchor.getElementsByClassName('kc-social-provider-name')[0];
// Change the text of the span
span.textContent = 'Sign in with Google';
}
const fixLogo = () => {
const headerWrapper = document.getElementById('kc-header-wrapper');
const header = document.getElementById('kc-header');
const loginBtnWrapper = document.getElementById('kc-info-wrapper')
const signupBtnWrapper = document.getElementById('kc-registration-container')
if (headerWrapper) {
headerWrapper.innerHTML = '<h2></h2><p></p>'
}
if (header) {
const logo = document.createElement('div');
logo.id = 'main-logo';
header.appendChild(logo);
}
// if (loginBtnWrapper) loginBtnWrapper.remove();
// if (signupBtnWrapper) signupBtnWrapper.remove();
}
fixPolicy()
fixLogo()
swapLinkedIn()
renameGoogle()