PluginProbe
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages / 3.4.3
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages v3.4.3
3.4.3 3.4.2 3.4.1 3.4.0 3.3.9 3.3.8 3.3.7 3.3.6 3.3.5 3.3.4 3.3.3 3.3.2 3.3.1 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3.0 2.3.1 All 196 releases
← All changes | resources/backend/js/setup-wizard.js +23 -34 2.2.93.4.3 View file →
@@ -1,8 +1,7 @@
1 1 /**
2 2 * Setup Wizard
3 3 *
4 - * @package ConvertKit
5 4 * @author ConvertKit
6 5 */
7 6
8 7 /**
@@ -10,42 +9,32 @@
10 9 * button/link's configuration.
11 10 *
12 11 * @since 1.9.8.4
13 12 */
14 -jQuery( document ).ready(
15 - function ( $ ) {
16 -
17 - // Redirect parent screen to a given URL after clicking a link that opens
18 - // the href URL in a new tab.
19 - $( 'a.convertkit-redirect' ).on(
20 - 'click',
21 - function ( e ) {
22 -
23 - var link = this;
24 -
13 +document.addEventListener('DOMContentLoaded', function () {
14 + // Redirect parent screen to a given URL after clicking a link that opens
15 + // the href URL in a new tab.
16 + document
17 + .querySelectorAll('a.convertkit-redirect')
18 + .forEach(function (element) {
19 + element.addEventListener('click', function () {
25 20 // Delay the redirect, otherwise browsers will block opening the href attribute
26 21 // thinking it's a popup.
27 - setTimeout(
28 - function () {
29 - // Redirect the parent screen to the link's data-convertkit-redirect-url property.
30 - window.location.href = $( link ).data( 'convertkit-redirect-url' );
31 - },
32 - 1000
33 - );
22 + setTimeout(function () {
23 + // Redirect the parent screen to the link's data-convertkit-redirect-url property.
24 + window.location.href =
25 + element.dataset.convertkitRedirectUrl;
26 + }, 1000);
27 + });
28 + });
34 29
35 - }
36 - );
37 -
38 - // Show a confirmation dialog for specific links.
39 - $( 'a.convertkit-confirm' ).on(
40 - 'click',
41 - function ( e ) {
42 -
43 - if ( ! confirm( $( this ).data( 'message' ) ) ) {
30 + // Show a confirmation dialog for specific links.
31 + document
32 + .querySelectorAll('a.convertkit-confirm')
33 + .forEach(function (element) {
34 + element.addEventListener('click', function (e) {
35 + if (!confirm(element.dataset.message)) {
44 36 e.preventDefault();
45 37 }
46 -
47 - }
48 - );
49 -
50 - }
51 -);
38 + });
39 + });
40 +});