Nintendo-Power

Daily Gaming news, videos, reviews, tips & guides. Let's share our love of BigN games!

Nintendo Switch Offers New Players Online for Seven Days -

Nintendo Switch Offers New Players Online for Seven Days –

window.fbAsyncInit = function() { FB.init({ appId : '197600770298646', channelURL : '//www.gamereactor.de/fbchannel.php', status : true, cookie : true, xfbml : true, oauth : true, version : 'v2.7' });

if (typeof(postReview) == "function") postReview();

FB.Event.subscribe('edge.create', function(targetUrl) { _gaq.push(['_trackSocial', 'Facebook', 'Like', targetUrl]); }); FB.Event.subscribe('edge.remove', function(targetUrl) { _gaq.push(['_trackSocial', 'Facebook', 'Unlike', targetUrl]); }); FB.Event.subscribe('message.send', function(targetUrl) { _gaq.push(['_trackSocial', 'Facebook', 'Send', targetUrl]); }); };

// document.addEventListener("DOMContentLoaded", function(){ // DrawFacebookLikeNotification(); // });

function FastRegister(tournament=false){ ajaxAgreementsPopUp(); if (typeof isSmartphoneLayout != 'undefined' && isSmartphoneLayout) window.location='/join'; else { $.ajax({ type: "POST", url: "/ajaxstuff/fastRegister.php", data: {session: {"screated":1609996783,"updated":1609996783},tournament:tournament}

}) .done(function (code) { $('#re_loginbox').replaceWith(code); // console.log(code); $('.loginWrapper').show(); }) .fail(function(jqXHR, msg) { console.log("request fail"); $(selectorForLoginMessage).text(msg).show(); }); } return false; }

function FastRegisterResponse(){ $.ajax({ type: "POST", url: "/ajaxstuff/fastRegister.php",

}) .done(function (code) { $('#re_loginbox').replaceWith(code); // console.log(code); $('.loginWrapper').show(); }) .fail(function(jqXHR, msg) { console.log("request fail"); $(selectorForLoginMessage).text(msg).show(); }); return false; }

function LoginWithFacebook(selectorForLoginMessage, fbUpdateUser) {

FB.login(function(response) { if (response.authResponse) { FB.api('/me', {fields: 'email,last_name,name,first_name'}, function(user) { var main = false; if (user && !user.error) { // console.log(user); if(selectorForLoginMessage == '#fbLoginMessageMain') main = true; $.ajax({ type: "POST", url: "/ajaxstuff/fblogin.php", data: {userobj: user, fbUpdateUser: fbUpdateUser, main: main} }) .done(function(code) { if(main){ console.log("Is logged"+code); if(code==0) { if(!$('.signin').hasClass('active-signin')) { $('.signin').addClass('active-signin'); if($('.login').hasClass('active-login')) { $('.login').removeClass('active-login'); var request = new GRAsync(); var path="/ajaxstuff/join.php?ajaxRequest"; request.setUrl(path) .setSelectors($('#joinContainer') ) .setData({register:true,facebookUser:user}) .setDataType('html') .setType('POST') .sendRequest();

} } } else { window.location="/";

} } else{ $('#re_loginbox').replaceWith(code); $('.loginWrapper').show(); //location.reload(true); } }) .fail(function(jqXHR, msg) { console.log("request fail"); $(selectorForLoginMessage).text(msg).show(); });

} }); } else { // console.log('User cancelled login or did not fully authorize.'); } }, {scope: 'email,publish_actions'}); // TODO: don't ask for publish_actions by default. It might scare away some users. Ask later, when they actually want it. return false; }

function AddSearchParamsAndReload(newParamStr) { var newParamArr = newParamStr.split("&"); if (window.location.search.length > 1) { // don't count the initial '?' var oldParams = window.location.search.substr(1).split("&"); var paramsToAdd = []; for (var j = 0; j < newParamArr.length; j++) { var found = false; for (var i = 0; i < oldParams.length; i++) if (newParamArr[j] == oldParams[i]) found = true; if (!found) paramsToAdd.push(newParamArr[j]); } if (!paramsToAdd.length) window.location.reload(); else window.location.search += '&'+paramsToAdd.join("&"); } else window.location.search="?"+newParamStr; } function datahrefclick_loader() { //var clickloader = document.getElementsByClassName("linkable"); //for (var i = 0; i < clickloader.length; i++) { //clickloader.item(i).addEventListener("click", datahref_redirect, false); //} var matchingElements = []; var clickloader = document.getElementsByTagName("*"); for (var i = 0; i < clickloader.length; i++) { if (clickloader[i].getAttribute('data-ohref') !== null) { clickloader.item(i).addEventListener("click", datahref_redirect, false); clickloader.item(i).style.cursor="pointer"; } } } function datahref_redirect() { // window.location.replace(this.getAttribute('data-href')); // Self window window.open(this.getAttribute('data-ohref'), this.getAttribute('data-scope')); // New window } document.addEventListener("DOMContentLoaded", datahrefclick_loader, false);

See also  Townscaper: Building game for Nintendo Switch and PC released