i/jkk.js
by webproger on 2021-04-21
var jkk = {
     c_wdth: function() {
      if(typeof(document.compatMode)=='undefined' ) return document.documentElement.clientWidth;
      else if(document.compatMode   =='BackCompat') return document.body.clientWidth;
      else if(document.compatMode   =='CSS1Compat') return document.documentElement.clientWidth;
    }
    ,c_hght: function() {
      if(typeof(document.compatMode)=='undefined' ) return document.documentElement.clientHeight;
      else if(document.compatMode   =='BackCompat') return document.body.clientHeight;
      else if(document.compatMode   =='CSS1Compat') return document.documentElement.clientHeight;
    }
    ,kakao: function() {
        var dvsn = document.createElement("div");
        dvsn.style.position = 'fixed';
        dvsn.style.left = '0px';
        dvsn.style.top  = '0px';
        dvsn.style.width  = jkk.c_wdth()+'px';
        dvsn.style.height = jkk.c_hght()+'px';
        dvsn.style.borderWidth  = '0px';
        dvsn.style.margin  = '0px';
        dvsn.style.padding = '0px';
        dvsn.style.backgroundColor = 'white';
        dvsn.style.textAlign       = 'center';
        dvsn.style.color    = 'black';
        dvsn.style.fontSize = '30px';
        var br = document.createElement("br");
        dvsn.appendChild(br);
        var txt = document.createTextNode('Please, open in browser.');
        dvsn.appendChild(txt);
        dvsn.style.zIndex  = '999';
        document.getElementsByTagName('body')[0].appendChild(dvsn);
    }
    ,attach: function(objct,type,fnctn) {
        if(objct.addEventListener) { objct.addEventListener(type,fnctn); }
        else if(objct.attachEvent) { objct.attachEvent('on'+type,fnctn); }
        else objct.onclick = fnctn;
    }
};
if(navigator.userAgent.indexOf('KAKAO') != -1) jkk.attach(window,'load',jkk.kakao);