1function isAlreadyLoggedInPage() { 2 let title = document.querySelector('.theme-main__title'); 3 if (title != null) { 4 if (title.textContent.includes("æ¢ã«ãã°ã¤ã³ãã¦ãã¾ã")) { 5 return true 6 } 7 } 8 return false 9} 10 11function getRedirectUri() { 12 console.log("Running getSonetUrlParam"); 13 let state = new URLSearchParams(window.location.search).get('state'); 14 console.log(state); 15 const sonetLoginSession = JSON.parse(sessionStorage.getItem("sonet_login_session")); 16 if (state == null) { 17 state = sonetLoginSession.state; 18 } 19 if (sonetLoginSession != null) { 20 if (sonetLoginSession.redirect_uri != null && state != null) { 21 return sonetLoginSession.redirect_uri + "?alreadyloggedin=true&state=" + state; 22 } 23 } 24 return null; 25} 26 27function redirect(url) { 28 console.log("Redirect:" + url); 29 if (url != null) location.href = url; 30} 31 32function handleErrorPage() { 33 if (isAlreadyLoggedInPage()) { 34 setTimeout(function() { 35 redirect(getRedirectUri()); 36 }, 5000); 37 } 38}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.