Community

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
VirineiaLupan
New Member

How to add custom links to login page

I am trying to add 2 more link to the login page and my custom javascript code doesn't seem to work. Does anyone know a better solution? 

Labels (1)
0 Kudos
1 Reply
jsimon3
Community Participant

  const logIn =()=> {
    const checkIfNull = async selector => {
      while (document.querySelector(selector) === null) {
        await new Promise(resolve => requestAnimationFrame(resolve));
      }
      return document.querySelector(selector);
    };
    checkIfNull("#login_form").then(() => {
      const placeHolder = `haha`;
      console.info(`it's alive ${placeHolder}`);
      //insert your links after you find the place you want them to appear
      //like: const getForm = document.querySelector(".mobileLogin-Header");if (getForm !== null) {//do something}
    });
  };