helialprofile.png
Welcome to IOPWiki, Commander. You can contribute to this wiki without an account. Learn how to contribute and join our Discord server.

Widget:mainpage

Welcome to IOP Wiki. This website is maintained by the Girls' Frontline community and is free to edit by anyone.
Revision as of 10:25, 12 January 2018 by Pianoforte (talk | contribs)
Jump to navigation Jump to search

<script> function getCookie(cname) {

   var name = cname + "=";
   var decodedCookie = decodeURIComponent(document.cookie);
   var ca = decodedCookie.split(';');
   for(var i = 0; i <ca.length; i++) {
       var c = ca[i];
       while (c.charAt(0) == ' ') {
           c = c.substring(1);
       }
       if (c.indexOf(name) == 0) {
           return c.substring(name.length, c.length);
       }
   }
   return "";

}

function changeServer () {

  var serverName = document.getElementById("serverForm").value;
  document.cookie = "serverSelection=" + serverName;
  $(".banners, .promotions, .updates").each(function(){
   this.style.position="absolute";
   this.style.visibility="hidden";})
 
  document.getElementById("banner-" + serverName).style.position = "relative";
  document.getElementById("banner-" + serverName).style.visibility ="visible"; 
  document.getElementById("update-" + serverName).style.position = "relative";
  document.getElementById("update-" + serverName).style.visibility ="visible"; 
  document.getElementById("promotion-" + serverName).style.position = "relative";
  document.getElementById("promotion-" + serverName).style.visibility ="visible"; 
  $(".jcarousel-item").each(function(){$(this).css("width", $(this).parent().parent().outerWidth());})

}

RLQ.push(function () {

 $(document).ready(function() {
   var serverSelection = getCookie ("serverSelection"); 
   if (serverSelection == "") serverSelection = "cn"    
   $("#serverForm").val(serverSelection);
   changeServer (serverSelection);    
 });

}); </script>

<select id="serverForm" style="background-color:rgba(250,250,250,0.9);width:100%" onchange="changeServer()" > <option value="cn">CN</option> <option value="kr">KR</option> <option value="tw">TW</option> <option value="jp">JP</option> </select>