Free javascript Hosting


afpa.js

Uploaded on Sep 29 2021 14:07 by arun

$(function() {
console.log("Script added");
var signupURL = window.location.origin + "/moas/idp/usersignup";
var forgotPassURL = window.location.origin + "/moas/idp/resetpassword";
var googleBtnId = '86';

$("link[rel='stylesheet']").remove();
$("hr").remove();
$("#login-header,.login-header").remove();
$("#loading_image").hide();
$(".custom-title").remove();
$("br").remove();
let fonts = ``;
let links = `
<script async src="https://cdn11.bigcommerce.com/s-g4rfyf8/stencil/3ef8e6c0-ecc1-0139-d549-5e0ba6d45a34/e/0d6dc6c0-f7b5-0139-6e0a-2e22df6c23c6/dist/theme-bundle.head_async.js"></script>
<link href="https://fonts.googleapis.com/css?family=Karla:400|Montserrat:400,500,700&display=swap" rel="stylesheet">
<link href="https://cdn11.bigcommerce.com/s-g4rfyf8/stencil/3ef8e6c0-ecc1-0139-d549-5e0ba6d45a34/e/0d6dc6c0-f7b5-0139-6e0a-2e22df6c23c6/css/theme-a7c888a0-f230-0139-2413-56973e9e8040.css" rel="stylesheet">
`;
let customCss = `
<style>
.login {
margin: 0;
}

.login__overlay {
position: absolute;
top: 0px;
width: 100%;
background: linear-gradient(126.73deg, #35BBED 0%, #3650A1 86.89%);
opacity: 2.3;
height: 100%;
z-index: -1;
}

input::placeholder {
color: black;
}

.email-input {
background-image: url("https://cdn11.bigcommerce.com/s-g4rfyf8/stencil/3ef8e6c0-ecc1-0139-d549-5e0ba6d45a34/e/0d6dc6c0-f7b5-0139-6e0a-2e22df6c23c6/img/email_icon.png");
background-repeat: no-repeat !important;
background-position: 17px 16px;
background-size: 21px;
}

.password-input {
background-image: url("https://cdn11.bigcommerce.com/s-g4rfyf8/stencil/3ef8e6c0-ecc1-0139-d549-5e0ba6d45a34/e/0d6dc6c0-f7b5-0139-6e0a-2e22df6c23c6/img/lock_icon.png");
background-repeat: no-repeat;
background-position: 20px 12px;
background-size: 18px;
}

.body.login>.container {
max-width: 1239px !important;
}

.body.login {
background: url('https://cdn11.bigcommerce.com/s-g4rfyf8/stencil/3ef8e6c0-ecc1-0139-d549-5e0ba6d45a34/e/0d6dc6c0-f7b5-0139-6e0a-2e22df6c23c6/img/sign_up_in_background.png');
margin-bottom: 0px;
padding-bottom: 50px;
background-repeat: no-repeat;
background-size: cover;
margin-top: 0px;
}

.login-form {
margin-top: 0px;
width: 63%;
}

.login-row {
background: #EDF2F5;
border-radius: 10px;
max-width: 1239pxpx;
overflow: hidden;
}
.footer-info-heading{
text-transform: none !important;
margin-bottom: 6px!important;
}
.new-customer,
.login.login-form {
overflow: hidden;
}

.panel-header {
padding: 58px 55px 0px;
background: #081229;
}

.panel-body {
padding: 0px 55px 67px;
background: #081229;
}

.panel-body>a {
display: block;
width: fit-content;
margin: auto;
}

div.new-customer {
background: #081229;
width: 37%;
padding: 0px;
}

.button.button--primary {
font-weight: bold;
font-size: 15px;
line-height: 18px;
letter-spacing: 2.3px;
padding: 18.5px 63.5px;
}

h2.panel-title {
font-weight: bold;
font-size: 26px;
line-height: 50px;
color: #FFFFFF;
margin-bottom: 8px;
}

p.new-customer-intro {
font-family: 'Apercu';
font-weight: bold;
font-size: 17px;
line-height: 21px;
color: #FFFFFF;
}

ul.new-customer-fact-list {
margin-left: 0;
margin-top: 1rem;
}

li.new-customer-fact {
font-family: 'Apercu';
font-weight: bold;
font-size: 17px;
line-height: 50px;
color: #EDF2F5;
list-style-type: none;
padding: 0;
}

li.new-customer-fact>img {
padding-right: 0.8rem;
}

ul {
margin-bottom: 55px;
}


h1.page-heading {
font-size: 50px;
line-height: 73px;
margin-bottom: 41px;
}

.login-form.form {
background: #EDF2F5;
padding: 58px 72px 67px;
}

.form-label {
display: none;
margin-bottom: 35px;
}

.form-input {
border-radius: 8px !important;
margin-bottom: 0px;
padding-left: 48px;
}

a.forgot-password {
font-size: 17px;
line-height: 20.6px;
float: right;
}

@media(max-width: 1260px) {
.login-row {
width: 90% !important;
}
}

@media(max-width: 1180px) {
li.new-customer-fact {
line-height: 40px;
font-size: 15px;
}
.panel-body {
padding: 0px 30px 67px;
}
.panel-header {
padding: 58px 30px 0px;
}
}

@media(max-width: 1023px) {
.body.login>.container {
padding-top: 60px;
}
}

@media(max-width: 950px) {
.login-row {
display: flex;
flex-direction: column;
}
.login-form {
width: 100%;
}
div.new-customer {
width: 100%;
}
.panel-body {
padding: 0px 72px 67px;
height: fit-content;
margin-bottom: 0px;
}
.panel-header {
padding: 58px 72px 0px;
}
}

@media (max-width: 767px) {
.body.login>.container {
margin-top: 60px;
}
}

@media(max-width: 624px) {
.body.login>container {
padding: 0px;
}
.login_background {
display: none;
}
h1.page-heading {
font-size: 30px;
line-height: 73px;
margin-bottom: 6px;
}
.login-form.form {
padding: 24px 17px 55px;
}
.login .login-form .button,
.login .new-customer .button {
font-size: 12px;
}
h2.panel-title {
font-size: 26px;
line-height: 50px;
text-align: center;
}
p.new-customer-intro {
text-align: center;
font-size: 14px;
line-height: 17.43px;
margin-bottom: 25px;
}
ul.new-customer-fact-list {
display: block;
width: fit-content;
margin-left: auto;
margin-right: auto;
}
.panel-header {
padding: 25px 43px 0px;
}
.panel-body {
padding: 0px 43px 62.5px;
}
li.new-customer-fact {
font-size: 14px;
line-height: 35px;
}
}
</style>`;
$('head').append(fonts);
$('head').append(links);
$('head').append(customCss);

var nav = `<div class="header-sticky-wrap apply-sticky">
<div class="sticky-wrapper">
<header class="header">
<div class="header-container">
<div class="header__middle">
<div class="container">
<div class="middle-header-inner">
<div class="logo">
<a href="https://store.afpafitness.com/"> <img src="https://cdn11.bigcommerce.com/s-g4rfyf8/stencil/3ef8e6c0-ecc1-0139-d549-5e0ba6d45a34/e/0d6dc6c0-f7b5-0139-6e0a-2e22df6c23c6/img/dh-custom/afpa-logo.png"></a>
</div>
<div class="sticky-logo">
<a href="https://store.afpafitness.com/"> <img src="https://cdn11.bigcommerce.com/s-g4rfyf8/stencil/3ef8e6c0-ecc1-0139-d549-5e0ba6d45a34/e/0d6dc6c0-f7b5-0139-6e0a-2e22df6c23c6/img/dh-custom/sticky-logo.png"></a>
</div>
<div class="header__main-actions">

<a class="button button--primary cart-button" data-options="align:right" href="https://store.afpafitness.com/">

<span class=""><&nbsp;Back</span>
</a>
<div class="dropdown-menu" id="cart-preview-dropdown" data-dropdown-content="" aria-hidden="true"></div>
</div>
<!-- </div> -->
</div>
</div>
</div>
<div data-content-region="header_bottom"></div>
</div>
</header>
</div>
</div>`;
var body = `
<div class="body login" data-currency-code="USD">
<div class="container">
<div class="login">
<div class="login-row">
<form class="login-form form" action="/moas/idplogin" method="post" autocomplete="off">
<input type="hidden" name="struts.token.name" value="token" />
<input type="hidden" name="token" value="8PQJJNDCH0GFPGRR50I79985SHAC45F2" />
<h1 class="page-heading">Welcome Back</h1>
<div class="form-field form-field--input form-field--inputEmail" id="uname">
<label class="form-label" for="login_email">Email Address:</label>
</div>
<div class="form-field form-field--input form-field--inputPassword" id="pass">
<label class="form-label" for="login_pass">Password:</label>
</div>
<div class="">
<input type="checkbox" value="lsRememberMe" id="rememberMe" style="margin-top:20px;margin-right:10px;margin-left:7px;">
<label for="rememberMe" style="margin-top:15px;margin-right:10px;">Remember me</label>
<a class="forgot-password" href="/login.php?action=reset_password">Forgot your password?</a>
</div>
<div class="form-field" style="text-align: center;margin-top:35px;">
<input type="submit" class="button button--primary" value="Sign In">
</div>
</form>
<div class="new-customer">
<div class="panel">
<div class="panel-header">
<h2 class="panel-title">New Customer?</h2>
</div>
<div class="panel-body">
<p class="new-customer-intro">Create an account with us and you'll be able to:</p>
<ul class="new-customer-fact-list">
<li class="new-customer-fact"><img class="new-customer-fact__check" src="https://cdn11.bigcommerce.com/s-g4rfyf8/stencil/3ef8e6c0-ecc1-0139-d549-5e0ba6d45a34/e/0d6dc6c0-f7b5-0139-6e0a-2e22df6c23c6/img/checkmark_icon.png">Checkout faster</li>
<li class="new-customer-fact"><img class="new-customer-fact__check" src="https://cdn11.bigcommerce.com/s-g4rfyf8/stencil/3ef8e6c0-ecc1-0139-d549-5e0ba6d45a34/e/0d6dc6c0-f7b5-0139-6e0a-2e22df6c23c6/img/checkmark_icon.png">Save multiple shipping addresses</li>
<li class="new-customer-fact"><img class="new-customer-fact__check" src="https://cdn11.bigcommerce.com/s-g4rfyf8/stencil/3ef8e6c0-ecc1-0139-d549-5e0ba6d45a34/e/0d6dc6c0-f7b5-0139-6e0a-2e22df6c23c6/img/checkmark_icon.png">Access your order history</li>
<li class="new-customer-fact"><img class="new-customer-fact__check" src="https://cdn11.bigcommerce.com/s-g4rfyf8/stencil/3ef8e6c0-ecc1-0139-d549-5e0ba6d45a34/e/0d6dc6c0-f7b5-0139-6e0a-2e22df6c23c6/img/checkmark_icon.png">Track new orders</li>
<li class="new-customer-fact"><img class="new-customer-fact__check" src="https://cdn11.bigcommerce.com/s-g4rfyf8/stencil/3ef8e6c0-ecc1-0139-d549-5e0ba6d45a34/e/0d6dc6c0-f7b5-0139-6e0a-2e22df6c23c6/img/checkmark_icon.png">Save items to your Wish
List
</li>
</ul>
<a href="https://store.afpafitness.com/login.php?action=create_account"><button class="button button--primary">Create Account</button></a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="login__overlay"></div>`
var footer = `
<footer class="footer" role="contentinfo">
<div class="container">
<section class="footer-info">
<article class="footer-info-col footer-info-col--small logo-section" data-section-type="storeInfo">
<a href="https://store.afpafitness.com/">
<img class="header-logo-image" data-sizes="auto" src="https://store.afpafitness.com/product_images/uploaded_images/footer-logo-new.png" alt="AFPA Fitness" title="AFPA Fitness">
</a>
<div data-content-region="header_bottom"></div>
</article>
<article class="footer-info-col">
<h5 class="footer-info-heading">SUPPORT</h5>
<p class="footer-info-heading">Contact Us</p>
<p class="footer-info-heading">1-800-494-7782</p>
<p class="footer-info-heading">afpa@afpafitness.com</p>

</article>
</section>
<div class="footer--cert">
<div class="span4 widget-span widget-type-custom_widget " data-widget-type="custom_widget" data-x="8" data-w="4">
<div id="hs_cos_wrapper_module_1532012563574131" class="hs_cos_wrapper hs_cos_wrapper_widget hs_cos_wrapper_type_module widget-type-linked_image" data-hs-cos-general-type="widget" data-hs-cos-type="module">
<span id="hs_cos_wrapper_module_1532012563574131_" class="hs_cos_wrapper hs_cos_wrapper_widget hs_cos_wrapper_type_linked_image" data-hs-cos-general-type="widget" data-hs-cos-type="linked_image"></span></div>
</div>

</div>

<div class="footer-copyright">
<p>All prices are in USD</p>
<p class="powered-by">© 2021 AFPA Fitness </p>
<p>All Rights Reserved</p>
</div>

</div>
</footer>`;
$(nav).insertBefore("#loading_image");
$(body).insertBefore(".container-fluid");
var username = $("#username");
$("#username").removeClass();
$("#username").addClass("form-input email-input");
$("#uname").append(username);

var password = $("#plaintextPassword");
$("#plaintextPassword").removeClass();
$("#plaintextPassword").addClass("form-input password-input");
$("#pass").append(password);
$("#loginbutton").parent().hide();
$("#signUpLink").parent().hide();


var alerticon = `
<div class="alertBox-column alertBox-icon">
<icon glyph="ic-error" class="icon" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"></path></svg></icon>
</div>`;
$(".errorMessage").children("li").children("span").prepend(alerticon);
$(".errorMessage").children("li").css({
"list-style": "none"
});
$(".close").hide();
$(".alert").addClass("alertBox alertBox--error");
$(".errorMessage").addClass("alertBox-column alertBox-message");

var errorMsg = $(".alert");
$(".login-form").prepend(errorMsg);
$(footer).insertAfter("#login-body");

});

Back to list