public/liff-starter.js
/**
 * Toggle the login/logout buttons based on the isInClient status, and display a message accordingly
 */
Toggle the login/logout buttons based on the isInClient status, and display a message accordingly
Toggle the login / logout buttons based on the isInClient status and display a message accordingly
function displayIsInClientInfo() {
  if (liff.isInClient()) {
    document.getElementById("liffLoginButton").classList.toggle("hidden");
    document.getElementById("liffLogoutButton").classList.toggle("hidden");
    document.getElementById("isInClientMessage").textContent =
      "You are opening the app in the in-app browser of LINE.";
  } else {
    document.getElementById("isInClientMessage").textContent =
      "You are opening the app in an external browser.";
  }
}
function displayIsInClientInfo ( ) { if ( liff . isInClient ( ) ) { document . getElementById ( "liffLoginButton" ) . classList . toggle ( "hidden" ) ; document . getElementById ( "liffLogoutButton" ) . classList . toggle ( "hidden" ) ; document . getElementById ( "isInClientMessage" ) . textContent = "You are opening the app in the in-app browser of LINE." ; } else { document . getElementById ( "isInClientMessage" ) . textContent = "You are opening the app in an external browser." ; } }
Toggle the login/logout buttons based on the isInClient status, and display a message accordingly
Toggle the login / logout buttons based on the isInClient status and display a message accordingly