3
0
mike 9c4c150800
All checks were successful
continuous-integration/drone/push Build is passing
added helpbuild test
2024-03-20 23:03:05 +01:00

54 lines
1.6 KiB
JavaScript

const fixPolicy = () => {
const privacyPolicy = document.getElementById('privacy-policy');
if (privacyPolicy) {
privacyPolicy.innerHTML = '<span>By signing up you agree to the Helpbuild <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()