File Editor
Directories:
.. (Back)
blocks
build
fonts
genericons
lib
social-logos
Files:
accessible-focus.js
blogging-prompts.php
class.jetpack-provision.php
connect-button.js
crowdsignal-shortcode.js
crowdsignal-survey.js
facebook-embed.js
gallery-settings.js
genericons.php
jetpack-admin.js
jetpack-connection-banner.js
jetpack-deactivate-dialog.js
jetpack-modules.js
jetpack-modules.models.js
jetpack-modules.views.js
jetpack-recommendations-banner.js
jetpack-server-sandbox.php
polldaddy-shortcode.js
social-logos.php
twitter-timeline.js
Create New File
Create
Edit File: connect-button.js
/* global jpConnect */ const connectButtons = document.querySelectorAll( '.jp-connect-button, #jp-connect-button--alt' ); connectButtons.forEach( function ( connectButton ) { connectButton.addEventListener( 'click', function ( event ) { event.preventDefault(); startConnectionFlow( connectButton ); } ); } ); function startConnectionFlow( connectButton ) { connectButton.classList.add( 'button-disabled' ); const searchParams = new URLSearchParams( connectButton.getAttribute( 'href' ).split( '?' )[ 1 ] ); window.location = searchParams && searchParams.get( 'from' ) ? jpConnect.connectUrl .split( '?page=jetpack' ) .join( '?page=jetpack&from=' + searchParams.get( 'from' ) ) : jpConnect.connectUrl; }
Save Changes
Rename File
Rename