Signin  Pricing  Examples  Support

Libraries > wdg_popup_oauth-MINIFIED-51468e1e655045377b46653dd4414989.js

wdg_popup_oauth-MINIFIED-51468e1e655045377b46653dd4414989.js - Search Live Website Code
It's like doing CTRL+F on millions of websites' source code



NerdyData is a search engine for source code. Search the source code of 200 million websites.


JAVASCRIPT FILE http://games.co.id/wdg/popup_oauth-active/js/minified/wdg_popup_oauth-MINIFIED-51468e1e655045377b46653dd4414989.js


Libraries on games.co.id


wdg_featured_games-MINIFIED-be3d06d0dcd21ffd3d221825cf9902ff.js

wdg_footer-MINIFIED-b878ce5464c32ff2d4416b9892fd8a5c.js

wdg_js_aggregator-MINIFIED-0891737eae969d1ea1ede65af8f2cfaf.js

wdg_js_aggregator-MINIFIED-eea5e002b69eea3bf4edce7140a09f76.js

wdg_mobile_apps-MINIFIED-bc03f2a5a82e938a662fbbef110f321f.js

wdg_performance_tracker-MINIFIED-adbfcee758de332d9e0a019dcc885f717796e8a5.js

wdg_popup_login-MINIFIED-a61b0c75887be24f1e50ba056716e6e9.js

wdg_popup_oauth-MINIFIED-51468e1e655045377b46653dd4414989.js

wdg_popup_register-MINIFIED-d99de0b7fc8cff81d37a340625d49da0.js

wdg_popup_register_feedback-MINIFIED-2e37cbb51a0c911896954341fc852e12.js

wdg_recent_played_games-MINIFIED-86cf51f7f19df8d9e1af289f34ad1ae1.js

wdg_search_bar-MINIFIED-41150803654626aca7fa8586b1d906b8.js

wdg_set-MINIFIED-0b238515850ea4405ec3b921f7817cc5.js

wdg_user_status-MINIFIED-5651f6abe333e8848fbe37f3ff8dc3a9.js

wdg_vda-MINIFIED-a2f3448bf9bb603b9c953660add8db5e.js



Explore More


validation.js

jquery-1.8.3.min.js

jquery.luara.0.0.1.min.js

zj_index.js

wdg_popup_oauth-MINIFIED-51468e1e655045377b46653dd4414989.js
				
SpilGames({waiton:"spilgames.loaded"},"SWPUtils SWP SWPEvent JSLib Cache DOMEvent SPAPI".split(" "),function(r,h,m,d,q,n,v){h.init("popup_oauth");var a={facebook:"Facebook",google:"Google+",test:"Test Provider"},k=!1,g=function(){var a=h.getProperty("show_popup_contents");return function(f){f=f||function(){};a?!0===a&&f():(a="loading",h.Widget.refresh({show_popup_contents:!0},{callback:function(){setTimeout(function(){a=!0;f()},0)}}))}}(),t=function(w,f){w||h.System.emit("popup.header.close");var d=
document.getElementById("popup-oauth-error"),k={generic:document.getElementById("popup-oauth-error-message-generic"),cannotLink:document.getElementById("popup-oauth-error-message-cannotLink")},g={"cannotLink-username":document.getElementById("popup-oauth-error-message-cannotLink-username"),"cannotLink-provider":document.getElementById("popup-oauth-error-message-cannotLink-provider"),"cannotLink-email":document.getElementById("popup-oauth-error-message-cannotLink-email"),"generic-close":document.getElementById("popup-oauth-error-message-generic-btn-close"),
"generic-tryagain":document.getElementById("popup-oauth-error-message-generic-btn-tryagain")};h.Utils.addClass(d,"hidden");switch(w){case "cannotLink":g["cannotLink-username"]&&(g["cannotLink-username"].innerHTML=f.username);g["cannotLink-provider"]&&(g["cannotLink-provider"].innerHTML=a[f.provider]);g["cannotLink-email"]&&(g["cannotLink-email"].innerHTML=a[f.email]);k.cannotLink.style.display="block";h.Utils.removeClass(d,"hidden");h.System.emit("popup.header.open");break;case "error":k.generic.style.display=
"block",f.provider?(g["generic-close"].style.display="none",g["generic-tryagain"].style.display="",g["generic-tryagain"].onclick=function(){h.Utils.addClass(d,"hidden");h.System.emit("popup.header.close");h.System.emit("popup.oauth.open",{provider:f.provider})}):(g["generic-tryagain"].style.display="",g["generic-close"].style.display=""),h.Utils.removeClass(d,"hidden"),h.System.emit("popup.header.open")}},x=function(d){var g=void 0!==window.location.origin?window.location.origin:"";k&&(k.close(),
k=!1);d in a&&(k=window.open(g+"/oauth/?provider="+d,"oauth","height=375,width=600,scrollbars=yes"))},u=function(a){if(k)switch(k.close(),k=!1,a.result){case "loggedIn":h.System.emit("login.finished",a);break;case "notLinkable":t("cannotLink",a);break;case "needData":h.Widget.emit("register.open",a);h.System.emit("popup.header.open");break;default:t("error",a)}};h.System.init(function(a){switch(a.name){case "popup.header.open":g();break;case "popup.oauth.open":g(function(){n.add("#popup-oauth-error .close-action",
"click",function(){t(!1)});var d=!1;"provider"in a.body&&(d=a.body.provider);x(d)});break;case "popup.oauth.close":g(function(){x(!1)})}});m.listen("oauth.result",function(a){a&&u(a)});n.add(window,"storage",function(a){a&&"oauth.data"==a.key&&a.newValue&&(a=JSON.parse(a.newValue).value)&&u(a)})});var oauthCallback=function(r){SpilGames(["SWPEvent"],function(h){h.emit("oauth.result",JSON.parse(r))})};SpilGames({waiton:"spilgames.loaded"},"FormValidation JSLib SWP SWPUtils DOMEvent DOMSelect Placeholder".split(" "),function(r,h,m,d,q,n,v){m.init("popup_oauth");var a=function(a){return document.getElementById("popup-oauth-register"+(a?"-"+a:""))},k={},g={},t=0,x={facebook:"Facebook",google:"Google+",test:"Test Provider"},u=function(b){b||m.System.emit("popup.header.close");d[b?"removeClass":"addClass"](a("error-generic"),"hidden")},w=function(a,c,e){a&&(a.id="hint-sign-"+t++,q.add(a,"mouseover",
function(){d.hasClass(a,"wrong")||d.removeClass(c,"hidden")}),q.add(a,"mouseout",function(){d.addClass(c,"hidden")}));"object"===typeof e&&e.length||(e=[e]);for(var g=0;g<e.length;g++)q.add(e[g],"focus",function(){a&&!d.hasClass(a,"wrong")||d.removeClass(c,"hidden")}),q.add(e[g],"blur",function(){d.addClass(c,"hidden")})},f=function(a){d.addClass(a,"hidden")},p=function(a){d.removeClass(a,"hidden")},y=function(){a("username").value="";a("email").value="";a("password").value="";a("gender-boy").checked=
!1;a("gender-girl").checked=!1;a("dob-day").value=-1;a("dob-month").value=-1;a("dob-year").value=-1;f(a("username-container"));f(a("password-container"));f(a("email-container"));f(a("dob-container"));f(a("gender-container"));p(a("header-info"));h.set("oauth-data",!1)},G=function(b){if(b)if(z(),A(),b.neededData&&0===b.neededData.length)f(a(""));else{y();p(a("header-info"));f(a("header-link"));h.set("oauth-data",b);for(var c=0,e=b.neededData.length;c<e;c++)switch(b.neededData[c]){case "password":p(a("password-container"));
f(a("header-info"));p(a("header-link"));break;case "username":p(a("username-container"));break;case "email":p(a("email-container"));break;case "dateOfBirth":p(a("dob-container"));break;case "gender":p(a("gender-container"))}a("header-link-username")&&b.username&&(a("header-link-username").innerHTML=b.username);a("header-link-provider")&&(a("header-link-provider").innerHTML=x[b.provider]);b=n.getAll(".wrong",a(""));if(0<b.length)for(c=0;c<b.length;c++)d.removeClass(b[c],"wrong");for(error in k)k[error]&&
f(k[error]);for(hint in g)g[hint]&&(g[hint].className="tip-sign");q.add("#popup-oauth-register input, #popup-oauth-register select","keydown",function(a){13===("which"in a?a.which:a.keyCode)&&B(a)});p(a(""))}else throw"no data passed to the registration form";},C=function(){m.System.emit("popup.header.close");y();f(a())},D=function(b){a("button").enabled=b;d[b?"removeClass":"addClass"](a("button"),"processing")},H=function(){for(var b=null,c=[],e=null,h=n.getAll(".hinted-container",a("")),f=0;f<h.length;f++){(b=
n.get(".tip-sign",h[f]))&&b.getAttribute("data-signeditem")&&(g[b.getAttribute("data-signeditem")]=b);for(var c=n.getAll(".tip",h[f]),e=0<h[f].getElementsByTagName("input").length?h[f].getElementsByTagName("input"):h[f].getElementsByTagName("select"),l=0;l<c.length;l++)c[l]&&(d.hasClass(c[l],"error")?k[c[l].getAttribute("data-errortype")]=c[l]:tipToggler=w(b,c[l],e))}},A=function(){for(var b=null,c=n.getAll(".hinted-container",a("")),e=0;e<c.length;e++)(b=n.get(".tip",c[e]))&&d.addClass(b,"hidden")},
E=function(a){var c=a.error.type,e=a.field,h=a.loading,f=a.extraData,l=document.getElementById("popup-oauth-register-"+e);if("object"===typeof g[e]){for(error in k)e===error.substr(0,error.indexOf("-"))&&d.addClass(k[error],"hidden");g&&g[e]&&(g[e].className="tip-sign",d[h?"addClass":"removeClass"](g[e],"loading"));a.error?(A(),k[c]&&(d.removeClass(k[c],"hidden"),f&&"function"==typeof k[c].applyExtraData&&k[c].applyExtraData(f)),d.addClass(g[e],"wrong"),l&&d.addClass(l,"wrong")):(d.addClass(g[e],
"right"),l&&d.removeClass(l,"wrong"))}},I=function(){r.validateAll();var b=h.get("oauth-data"),c={oauthToken:b.oauthToken},e;for(e in b.neededData)switch(b.neededData[e]){case "username":if(d.hasClass(a("username"),"wrong"))return!1;c.username=a("username").value;break;case "password":if(d.hasClass(a("password"),"wrong"))return!1;c.password=a("password").value;break;case "email":if(d.hasClass(a("email"),"wrong"))return!1;c.email=a("email").value;break;case "dateOfBirth":if(d.hasClass(a("dob"),"wrong"))return!1;
c.dateOfBirth={year:parseInt(a("dob-year").value),month:parseInt(a("dob-month").value),day:parseInt(a("dob-day").value)};break;case "gender":if(d.hasClass(a("gender"),"wrong"))return!1;c.gender=a("gender").value}return c},J=function(){document.getElementById("popup-oauth-register-close").onclick=function(a){C()};document.getElementById("popup-oauth-register-error-generic-close").onclick=function(a){u(!1)};a("button").onclick=function(a){B(a)}},B=function(b){if("undefined"==typeof a("button").enabled||
a("button").enabled)if(b=I())m.Widget.emit("register.send",b),D(!1)},K=function(){for(var b=1;32>b;b++){var c=document.createElement("option");c.value=b;c.innerHTML=b;a("dob-day").appendChild(c)}for(b=c=(new Date).getFullYear();b>c-101;b--){var e=document.createElement("option");e.value=b;e.innerHTML=b;a("dob-year").appendChild(e)}},F=!1,z=function(){if(!F){F=!0;p(a());v.init("popup-oauth-register-username");v.init("popup-oauth-register-email");v.init("popup-oauth-register-password");H();J();K();
k["username-taken"]&&(k["username-taken"].applyExtraData=function(b){var e=n.get(".alternative-usernames",this);if(e){for(;e.hasChildNodes();)e.removeChild(e.lastChild);for(var d=0;d<b.suggestionList.length;d++){var g=b.suggestionList[d];0<d&&e.appendChild(document.createTextNode(", "));var f=document.createElement("a");f.setAttribute("href","#");f.innerHTML=g;f.onclick=function(b){return function(){a("username").value=b;if("fireEvent"in a("username"))a("username").fireEvent("onchange");else{var c=
document.createEvent("HTMLEvents");c.initEvent("change",!1,!0);a("username").dispatchEvent(c)}}}(g);e.appendChild(f)}}});var b=[{type:"dob",elem:{year:a("dob-year"),month:a("dob-month"),day:a("dob-day")}},{type:"username",elem:a("username")},{type:"email",elem:a("email")},{type:"password",elem:a("password")},{type:"gender",elem:a("gender"),inputs:[a("gender-boy"),a("gender-girl")]}];r.attach(b,E)}};m.Widget.init(function(b){switch(b.name){case "register.open":G(b.data);break;case "register.send":h("api.account.registerOauth",
{oauthToken:b.data.oauthToken,username:b.data.username,email:b.data.email,password:b.data.password,gender:b.data.gender,dateOfBirth:b.data.dateOfBirth},function(c){if(!c.error&&c.auth&&c.auth.token)m.System.emit("popup.header.close"),f(a("")),m.getProperty("use_avatar_picker")?m.System.emit("popup.register.feedback",{type:b.data.password?"link":"register",username:b.data.username}):m.System.emit("registration.finished");else{z();switch(c.error){case "auth":C();u(!0);break;case "badLogin":E({error:{type:"password-invalid"},
field:"password",loading:!1,extraData:!1})}D(!0)}})}})});


A B C D E F G H I J K L M N O P Q R S T U V W X Y Z