Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'use strict';
- function setURLS() {
- var queryString = '';
- if (config.clientID) {
- queryString += 'clientId=' + config.clientID;
- }
- if (config.extraParams.custom_state) {
- queryString += '&state=' + config.extraParams.custom_state;
- }
- var _href = $('#resetPassword').attr('href');
- $('#resetPassword').attr('href', _href + '?' + queryString);
- _href = $('#registerAccount').attr('href');
- $('#registerAccount').attr('href', _href + '?' + queryString);
- }
- function setYear() {
- $('#endYear').text(new Date().getFullYear());
- }
- // Hides any element with the class "hide-on-mobile" when the screen is < "mobileWidth" wide.
- function hideOnMobile(mobileWidth) {
- if ($(this).width() < mobileWidth) {
- $('.hide-on-mobile').hide();
- } else {
- $('.hide-on-mobile').show();
- }
- }
- function getStoredUser() {
- try {
- var user = localStorage.getItem('user');
- if (user) {
- $('#email').val(user);
- $('#password').focus();
- $('#rememberCheckbox')[0].checked = true;
- }
- } catch (ex) {
- console.log('localStorage.getItem error', ex.code, ex.message);
- }
- }
- $(document).ready(function () {
- var mobileWidth = 640;
- setYear();
- setURLS();
- getStoredUser();
- // Bind the handler to the window resize event, then call it once to start things off
- $(window).on('resize', hideOnMobile);
- hideOnMobile();
- });
Add Comment
Please, Sign In to add comment