CMD:
PHP:
mini manager
Path:
/
var
/
www
/
forum.shootsilhouette.com
/
public_html
/
js
/
Upload:
Edit: facebook.js
/* =======================================================================*\ || ###################################################################### || || # vBulletin 5.6.9 || # ------------------------------------------------------------------ # || || # Copyright 2000-2022 MH Sub I, LLC dba vBulletin. All Rights Reserved. # || || # This file may not be redistributed in whole or significant part. # || || # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # || || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || || ###################################################################### || \*========================================================================*/ function vB_Facebook(a){this.config=a;this.loginperms={scope:"public_profile,email"};FB.Event.subscribe("auth.statusChange",function d(a){"connected"==a.status&&($(document).trigger("facebookinitialized"),FB.Event.unsubscribe("auth.statusChange",d))});FB.init({appId:this.get_config("appid"),version:"v3.3",status:!0,cookie:!0,xfbml:!0});this.register_loginbtns();this.make_visible();$("#lnkFacebookDisconnectSettings").off("click").on("click",this.do_disconnect);$("#lnkFacebookLoginSettings").off("click").on("click", this.makeAuthEvent(this.do_connect))}vB_Facebook.prototype.get_config=function(a){return"undefined"==typeof this.config||"undefined"==typeof this.config[a]?!1:this.config[a]}; vB_Facebook.prototype.register_loginbtns=function(){var a=this.makeAuthEvent(this.do_login);$("#lnkFacebookLogin").on("click",a);$("#fb_getconnected").on("click",a);$("#fb_regloginbtn").on("click",function(a){a.preventDefault();FB.login(vBfb.reload,vBfb.loginperms)});a=$("#facebookusername");var b=$("#facebookpassword"),c=$("#facebookassociate"),d=this.makeAuthEvent(this.login_and_associate),e=function(a){13==a.which&&d(a)};a.length&&b.length&&c.length&&(c.on("click",$.proxy(function(){d()},this)), a.keypress(e),b.keypress(e))};vB_Facebook.prototype.make_visible=function(){$("#fb_headerbox").removeClass("hidden");$("#fbregbox").removeClass("hidden")};vB_Facebook.prototype.do_login=function(a){vBulletin.AJAX({call:"/auth/loginExternal",data:{provider:"facebook",auth:a.accessToken},success:vBfb.reload,api_error:function(a){return vBulletin.ajaxtools.hasError(a,"error_external_no_vb_user")?(window.top.location="register?source=facebook",!1):!0}})}; vB_Facebook.prototype.do_connect=function(a){vBulletin.AJAX({call:"/ajax/api/facebook/connectCurrentUser",data:{accessToken:a.accessToken},success:vBfb.reload});return!1};vB_Facebook.prototype.do_disconnect=function(){vBulletin.AJAX({call:"/ajax/api/facebook/disconnectUser",data:{userid:pageData.userid},success:vBfb.reload});return!1}; vB_Facebook.prototype.login_and_associate=function(a){var b=$("#facebookusername").get(0).value,c=$("#facebookpassword").get(0).value;vBulletin.AJAX({call:"/auth/loginAndAssociate",data:{username:b,vb_login_md5password:hex_md5(str_to_ent(trim(c))),vb_login_md5password_utf:hex_md5(trim(c)),auth:a.accessToken},success:function(a,c,b){window.top.location=a.redirect}})};vB_Facebook.prototype.reload=function(){window.top.location.reload(!0)}; vB_Facebook.prototype.makeAuthEvent=function(a){return function(b){b&&b.preventDefault();(b=FB.getAuthResponse())&&b.accessToken?a(b):FB.login(function(c){c.authResponse&&c.authResponse.accessToken&&a(c.authResponse)},vBfb.loginperms);return!1}};vB_Facebook.prototype.register_logout=function(){vBulletin.AJAX({call:"/ajax/api/facebook/clearSession",success:function(){FB.logout(vBfb.reload)},api_error:vBulletin.ajaxtools.logApiError})}; vB_Facebook.prototype.handle_submit_override=function(){if("undefined"==typeof this.onSubmitEvent||!this.onSubmitEvent||this.onSubmitEvent.call(this.editFormEl)){var a=document.createElement("input");a.setAttribute("type","hidden");a.setAttribute("name",this.btnClicked.name);a.setAttribute("value",this.btnClicked.value);this.editFormEl.appendChild(a);this.editFormEl.submit()}}; vB_Facebook.prototype.has_permission=function(a,b){FB.api("/me/permissions/"+a,function(a){b(a&&!a.error&&a.data.length&&"granted"==a.data[0].status)})};vB_Facebook.prototype.request_permission=function(a,b){FB.login(function(c){var d=!1;"undefined"!=typeof c.authResponse.grantedScopes&&(d=-1<jQuery.inArray(a,c.authResponse.grantedScopes.split(",")));b(d)},{scope:a,auth_type:"rerequest",return_scopes:!0})};vB_Facebook.prototype.isFbLogin=function(){return!!$.cookie("fbsr_"+this.get_config("appid"))}; vBulletin.precache([],["enablefacebookconnect","facebookappid","facebookactive","facebookautoregister"]); window.fbAsyncInit=function(){$(document).ready(function(){vBulletin.options.get("facebookactive")?(vBfb=new vB_Facebook({appid:vBulletin.options.get("facebookappid"),connected:0,active:0,autoreg:vBulletin.options.get("facebookautoregister")}),$(".js-external-login-providers").removeClass("h-hide-imp"),$(".js-external-login-provider--facebook").removeClass("h-hide-imp")):($(".js-external-login-provider--facebook").addClass("h-hide-imp"),1>$(".js-external-login-provider:visible").length&&$(".js-external-login-providers").addClass("h-hide-imp")); $(document).on("click",".js-fb-share-dialog",function(a){if(vBulletin.options.get("facebookactive"))a=$(this).data("url-not-encoded"),FB.ui({method:"share",mobile_iframe:!0,href:a},function(a){});else if(a=$(this).prop("href"),a=window.open(a,"_blank","width=573,height=239,resizable=yes,scrollbars=yes,status=yes"),!a||a.closed||"undefined"==typeof a.closed)return!0;return!1});$(document).on("click",".js-twitter-share",function(a){a=$(this).prop("href");a=window.open(a,"_blank","width=548,height=419,resizable=yes,scrollbars=yes,status=yes"); return!a||a.closed||"undefined"==typeof a.closed?!0:!1})})};(function(a){var b=a.getElementsByTagName("script")[0],c=$("#fb-root").data("facebook-language");a.getElementById("facebook-jssdk")||(a=a.createElement("script"),a.id="facebook-jssdk",a.async=!0,a.src="//connect.facebook.net/"+c+"/sdk.js#xfbml=1&version=v3.3",b.parentNode.insertBefore(a,b))})(document);
[ Kembali ]
© 2026 mini manager