if(typeof(OAS_GAMES_WIDGETS) == 'undefined'){ var OAS_GAMES_WIDGETS = { _p : function(msg){ if(window.console) window.console.info(msg); }, newScript : function(src){ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = src; return ga; }, newCssLink : function(src){ var ga = document.createElement('link'); ga.type = 'text/css'; ga.rel = "stylesheet" ga.href = src; return ga; } }; } OAS_GAMES_WIDGETS.LoginBox = { containerId : 'OAS_WidgetLogin_Root', init : function(){ this.initResource(); this.initHTML(); this.initEvent(); } }; OAS_GAMES_WIDGETS.LoginBox.initResource = function(){ var LoginRoot = document.getElementById(this.containerId); }; OAS_GAMES_WIDGETS.LoginBox.init = function(loginCallback){ var html = "
"; $("#" + this.containerId).append(html); // 获取当前域名 var currentDomain = window.location.hostname; // 检查当前域名并设置document.domain if (currentDomain.endsWith('oasgames.com')) { document.domain = 'oasgames.com'; } else if (currentDomain.endsWith('narutowebgame.com')) { document.domain = 'narutowebgame.com'; } OAS_GAMES_WIDGETS.LoginBox.loginCallback = loginCallback; }; OAS_GAMES_WIDGETS.LoginBox.hide = function(){ $('#OAS_GAMES_WIDGETS_loginbox').hide(); $('#fullbg').hide(); }; OAS_GAMES_WIDGETS.LoginBox.showLogin = function(){ if(!document.getElementById("login_reg_page")){ setTimeout(function(){OAS_GAMES_WIDGETS.LoginBox.showLogin();},200); }else{ var childrenElement = document.getElementById("login_reg_page").contentWindow; try{ if(typeof childrenElement.show_login == 'function'){ document.getElementById("login_reg_page").contentWindow.show_login(); $('#OAS_GAMES_WIDGETS_loginbox').show(); $('#fullbg').show(); }else{ setTimeout(function(){OAS_GAMES_WIDGETS.LoginBox.showLogin();},200); } }catch(e){ setTimeout(function(){OAS_GAMES_WIDGETS.LoginBox.showLogin();},200); } } }; OAS_GAMES_WIDGETS.LoginBox.showReg = function(){ if(!document.getElementById("login_reg_page")){ setTimeout(function(){OAS_GAMES_WIDGETS.LoginBox.showReg();},200); }else{ var childrenElement = document.getElementById("login_reg_page").contentWindow; try{ if(typeof childrenElement.show_reg == 'function'){ document.getElementById("login_reg_page").contentWindow.show_reg(); $('#OAS_GAMES_WIDGETS_loginbox').show(); $('#fullbg').show(); }else{ setTimeout(function(){OAS_GAMES_WIDGETS.LoginBox.showReg();},200); } }catch(e){ setTimeout(function(){OAS_GAMES_WIDGETS.LoginBox.showReg();},200); } } }; var fcoEnable = '1'; if(fcoEnable == '1'){ //捆绑GDPR插件 var script = document.createElement('script'),head = document.getElementsByTagName("head")[0]; script.type = 'text/javascript'; script.async = true; script.src = '//img.oasgames.com/fc-oasis/production/v2.0.1.1/loader.min.js'; head.appendChild(script); var fcoGDPRConfig = { lang: 'de' }; }