✏️ 正在编辑: fusion-hubspot-oauth.js
路径:
/home/lssfapb/www/wp-content/plugins/fusion-builder/assets/admin/js/fusion-hubspot-oauth.js
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
( function( jQuery ) { 'use strict'; jQuery( document ).ready( function() { // Update the HubSpot status on parent window. window.updateHubSpotAPI = function( status ) { var $hubspotContent; if ( 'string' === typeof status && 'function' === typeof jQuery ) { $hubspotContent = jQuery( '#fusion-hubspot-content' ); if ( ! $hubspotContent.length ) { return false; } $hubspotContent.find( '> div' ).hide(); if ( 'revoke' === status ) { $hubspotContent.find( '[data-id="no_token"]' ).css( { display: 'flex' } ); } else if ( 'success' === status ) { $hubspotContent.find( '[data-id="connected"]' ).css( { display: 'flex' } ); } else { $hubspotContent.find( '[data-id="error"]' ).css( { display: 'flex' } ); } return 'Updated to ' + status; } return false; }; // This is the auth window. if ( window.opener && 'function' === typeof window.opener.updateHubSpotAPI && 'object' === typeof window.fusionHubspotOAuth && 'string' === typeof window.fusionHubspotOAuth.status ) { window.opener.updateHubSpotAPI( window.fusionHubspotOAuth.status ); window.close(); } // Firefox needs link opened via JS. jQuery( document ).on( 'click', '#fusion-hubspot-content .button-primary', function( event ) { event.preventDefault(); window.open( jQuery( this ).attr( 'href' ), '_blank' ); } ); } ); }( jQuery ) );
💾 保存文件
← 返回文件管理器