Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion js/apbct-public-bundle.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/apbct-public-bundle_ext-protection.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/apbct-public-bundle_ext-protection_gathering.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/apbct-public-bundle_full-protection.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/apbct-public-bundle_full-protection_gathering.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/apbct-public-bundle_gathering.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/apbct-public-bundle_int-protection.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/apbct-public-bundle_int-protection_gathering.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/cleantalk-admin.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/cleantalk-admin.min.js.map

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions js/prebuild/apbct-public-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,16 @@ function ctFillDecodedEmail(target, email) {
target.innerHTML = target.innerHTML.replace(/.+?(<div class=["']apbct-tooltip["'].+?<\/div>)/, email + '$1');
}

let ctEmailDecoderIsInitialized = false;

// Listen clicks on encoded emails
document.addEventListener('DOMContentLoaded', function() {
// Some plugins dispatch a synthetic DOMContentLoaded, listeners must not be attached twice
if (ctEmailDecoderIsInitialized) {
return;
}
ctEmailDecoderIsInitialized = true;

let encodedEmailNodes = document.querySelectorAll('[data-original-string]');
if (typeof ctPublic !== 'undefined') {
ctPublic.encodedEmailNodes = encodedEmailNodes;
Expand Down Expand Up @@ -3206,6 +3214,12 @@ class ApbctHandler {
* @return {void}
*/
catchMain(form, index) {
// Third-party plugins may re-fire DOMContentLoaded. Double wrapping makes onsubmit_prev recursive.
if (form.apbctCatchMainAttached) {
return;
}
form.apbctCatchMainAttached = true;

form.onsubmit_prev = form.onsubmit;
form.ctFormIndex = index;

Expand Down Expand Up @@ -5627,11 +5641,19 @@ async function apbctImportScript(scriptAbsolutePath) {
});
}

let apbctReadyIsDone = false;

/**
* Ready function
*/
// eslint-disable-next-line camelcase,require-jsdoc
async function apbct_ready() {
// Some plugins dispatch a synthetic DOMContentLoaded, so the whole init must not run twice
if (apbctReadyIsDone) {
return;
}
apbctReadyIsDone = true;

// Only set ct_checkjs if the key is actually provided (not on block pages)
if (typeof ctPublic.ct_checkjs_key !== 'undefined' && ctPublic.ct_checkjs_key !== null) {
apbctLocalStorage.set('ct_checkjs', ctPublic.ct_checkjs_key, true);
Expand Down Expand Up @@ -6364,7 +6386,15 @@ if (Math.floor(Math.random() * 100) === 1) {
};
}

let ctTrpIsInitialized = false;

document.addEventListener('DOMContentLoaded', function() {
// Some plugins dispatch a synthetic DOMContentLoaded, badges must not be built twice
if (ctTrpIsInitialized) {
return;
}
ctTrpIsInitialized = true;

let ctTrpLocalize = undefined;
let ctTrpIsAdminCommentsList = false;

Expand Down
30 changes: 30 additions & 0 deletions js/prebuild/apbct-public-bundle_ext-protection.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,16 @@ function ctFillDecodedEmail(target, email) {
target.innerHTML = target.innerHTML.replace(/.+?(<div class=["']apbct-tooltip["'].+?<\/div>)/, email + '$1');
}

let ctEmailDecoderIsInitialized = false;

// Listen clicks on encoded emails
document.addEventListener('DOMContentLoaded', function() {
// Some plugins dispatch a synthetic DOMContentLoaded, listeners must not be attached twice
if (ctEmailDecoderIsInitialized) {
return;
}
ctEmailDecoderIsInitialized = true;

let encodedEmailNodes = document.querySelectorAll('[data-original-string]');
if (typeof ctPublic !== 'undefined') {
ctPublic.encodedEmailNodes = encodedEmailNodes;
Expand Down Expand Up @@ -3206,6 +3214,12 @@ class ApbctHandler {
* @return {void}
*/
catchMain(form, index) {
// Third-party plugins may re-fire DOMContentLoaded. Double wrapping makes onsubmit_prev recursive.
if (form.apbctCatchMainAttached) {
return;
}
form.apbctCatchMainAttached = true;

form.onsubmit_prev = form.onsubmit;
form.ctFormIndex = index;

Expand Down Expand Up @@ -5627,11 +5641,19 @@ async function apbctImportScript(scriptAbsolutePath) {
});
}

let apbctReadyIsDone = false;

/**
* Ready function
*/
// eslint-disable-next-line camelcase,require-jsdoc
async function apbct_ready() {
// Some plugins dispatch a synthetic DOMContentLoaded, so the whole init must not run twice
if (apbctReadyIsDone) {
return;
}
apbctReadyIsDone = true;

// Only set ct_checkjs if the key is actually provided (not on block pages)
if (typeof ctPublic.ct_checkjs_key !== 'undefined' && ctPublic.ct_checkjs_key !== null) {
apbctLocalStorage.set('ct_checkjs', ctPublic.ct_checkjs_key, true);
Expand Down Expand Up @@ -7705,7 +7727,15 @@ if (Math.floor(Math.random() * 100) === 1) {
};
}

let ctTrpIsInitialized = false;

document.addEventListener('DOMContentLoaded', function() {
// Some plugins dispatch a synthetic DOMContentLoaded, badges must not be built twice
if (ctTrpIsInitialized) {
return;
}
ctTrpIsInitialized = true;

let ctTrpLocalize = undefined;
let ctTrpIsAdminCommentsList = false;

Expand Down
30 changes: 30 additions & 0 deletions js/prebuild/apbct-public-bundle_ext-protection_gathering.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,16 @@ function ctFillDecodedEmail(target, email) {
target.innerHTML = target.innerHTML.replace(/.+?(<div class=["']apbct-tooltip["'].+?<\/div>)/, email + '$1');
}

let ctEmailDecoderIsInitialized = false;

// Listen clicks on encoded emails
document.addEventListener('DOMContentLoaded', function() {
// Some plugins dispatch a synthetic DOMContentLoaded, listeners must not be attached twice
if (ctEmailDecoderIsInitialized) {
return;
}
ctEmailDecoderIsInitialized = true;

let encodedEmailNodes = document.querySelectorAll('[data-original-string]');
if (typeof ctPublic !== 'undefined') {
ctPublic.encodedEmailNodes = encodedEmailNodes;
Expand Down Expand Up @@ -3206,6 +3214,12 @@ class ApbctHandler {
* @return {void}
*/
catchMain(form, index) {
// Third-party plugins may re-fire DOMContentLoaded. Double wrapping makes onsubmit_prev recursive.
if (form.apbctCatchMainAttached) {
return;
}
form.apbctCatchMainAttached = true;

form.onsubmit_prev = form.onsubmit;
form.ctFormIndex = index;

Expand Down Expand Up @@ -5627,11 +5641,19 @@ async function apbctImportScript(scriptAbsolutePath) {
});
}

let apbctReadyIsDone = false;

/**
* Ready function
*/
// eslint-disable-next-line camelcase,require-jsdoc
async function apbct_ready() {
// Some plugins dispatch a synthetic DOMContentLoaded, so the whole init must not run twice
if (apbctReadyIsDone) {
return;
}
apbctReadyIsDone = true;

// Only set ct_checkjs if the key is actually provided (not on block pages)
if (typeof ctPublic.ct_checkjs_key !== 'undefined' && ctPublic.ct_checkjs_key !== null) {
apbctLocalStorage.set('ct_checkjs', ctPublic.ct_checkjs_key, true);
Expand Down Expand Up @@ -8549,7 +8571,15 @@ if (Math.floor(Math.random() * 100) === 1) {
};
}

let ctTrpIsInitialized = false;

document.addEventListener('DOMContentLoaded', function() {
// Some plugins dispatch a synthetic DOMContentLoaded, badges must not be built twice
if (ctTrpIsInitialized) {
return;
}
ctTrpIsInitialized = true;

let ctTrpLocalize = undefined;
let ctTrpIsAdminCommentsList = false;

Expand Down
46 changes: 46 additions & 0 deletions js/prebuild/apbct-public-bundle_full-protection.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,16 @@ function ctFillDecodedEmail(target, email) {
target.innerHTML = target.innerHTML.replace(/.+?(<div class=["']apbct-tooltip["'].+?<\/div>)/, email + '$1');
}

let ctEmailDecoderIsInitialized = false;

// Listen clicks on encoded emails
document.addEventListener('DOMContentLoaded', function() {
// Some plugins dispatch a synthetic DOMContentLoaded, listeners must not be attached twice
if (ctEmailDecoderIsInitialized) {
return;
}
ctEmailDecoderIsInitialized = true;

let encodedEmailNodes = document.querySelectorAll('[data-original-string]');
if (typeof ctPublic !== 'undefined') {
ctPublic.encodedEmailNodes = encodedEmailNodes;
Expand Down Expand Up @@ -3206,6 +3214,12 @@ class ApbctHandler {
* @return {void}
*/
catchMain(form, index) {
// Third-party plugins may re-fire DOMContentLoaded. Double wrapping makes onsubmit_prev recursive.
if (form.apbctCatchMainAttached) {
return;
}
form.apbctCatchMainAttached = true;

form.onsubmit_prev = form.onsubmit;
form.ctFormIndex = index;

Expand Down Expand Up @@ -5627,11 +5641,19 @@ async function apbctImportScript(scriptAbsolutePath) {
});
}

let apbctReadyIsDone = false;

/**
* Ready function
*/
// eslint-disable-next-line camelcase,require-jsdoc
async function apbct_ready() {
// Some plugins dispatch a synthetic DOMContentLoaded, so the whole init must not run twice
if (apbctReadyIsDone) {
return;
}
apbctReadyIsDone = true;

// Only set ct_checkjs if the key is actually provided (not on block pages)
if (typeof ctPublic.ct_checkjs_key !== 'undefined' && ctPublic.ct_checkjs_key !== null) {
apbctLocalStorage.set('ct_checkjs', ctPublic.ct_checkjs_key, true);
Expand Down Expand Up @@ -7227,10 +7249,18 @@ class ApbctForceProtection {
}
}

let apbctForceProtectionIsInitialized = false;

/**
* Force protection
*/
function apbctForceProtect() {
// Some plugins dispatch a synthetic DOMContentLoaded, the check must be sent only once
if (apbctForceProtectionIsInitialized) {
return;
}
apbctForceProtectionIsInitialized = true;

if (+ctPublic.settings__forms__force_protection && typeof ApbctForceProtection !== 'undefined') {
new ApbctForceProtection();
}
Expand Down Expand Up @@ -7280,7 +7310,15 @@ function ctCheckInternal(currForm) {
);
}

let ctInternalFormsIsInitialized = false;

document.addEventListener('DOMContentLoaded', function() {
// Some plugins dispatch a synthetic DOMContentLoaded, forms must not be re-wrapped
if (ctInternalFormsIsInitialized) {
return;
}
ctInternalFormsIsInitialized = true;

if ( ! +ctPublic.settings__forms__check_internal ) {
return;
}
Expand Down Expand Up @@ -7949,7 +7987,15 @@ if (Math.floor(Math.random() * 100) === 1) {
};
}

let ctTrpIsInitialized = false;

document.addEventListener('DOMContentLoaded', function() {
// Some plugins dispatch a synthetic DOMContentLoaded, badges must not be built twice
if (ctTrpIsInitialized) {
return;
}
ctTrpIsInitialized = true;

let ctTrpLocalize = undefined;
let ctTrpIsAdminCommentsList = false;

Expand Down
46 changes: 46 additions & 0 deletions js/prebuild/apbct-public-bundle_full-protection_gathering.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,16 @@ function ctFillDecodedEmail(target, email) {
target.innerHTML = target.innerHTML.replace(/.+?(<div class=["']apbct-tooltip["'].+?<\/div>)/, email + '$1');
}

let ctEmailDecoderIsInitialized = false;

// Listen clicks on encoded emails
document.addEventListener('DOMContentLoaded', function() {
// Some plugins dispatch a synthetic DOMContentLoaded, listeners must not be attached twice
if (ctEmailDecoderIsInitialized) {
return;
}
ctEmailDecoderIsInitialized = true;

let encodedEmailNodes = document.querySelectorAll('[data-original-string]');
if (typeof ctPublic !== 'undefined') {
ctPublic.encodedEmailNodes = encodedEmailNodes;
Expand Down Expand Up @@ -3206,6 +3214,12 @@ class ApbctHandler {
* @return {void}
*/
catchMain(form, index) {
// Third-party plugins may re-fire DOMContentLoaded. Double wrapping makes onsubmit_prev recursive.
if (form.apbctCatchMainAttached) {
return;
}
form.apbctCatchMainAttached = true;

form.onsubmit_prev = form.onsubmit;
form.ctFormIndex = index;

Expand Down Expand Up @@ -5627,11 +5641,19 @@ async function apbctImportScript(scriptAbsolutePath) {
});
}

let apbctReadyIsDone = false;

/**
* Ready function
*/
// eslint-disable-next-line camelcase,require-jsdoc
async function apbct_ready() {
// Some plugins dispatch a synthetic DOMContentLoaded, so the whole init must not run twice
if (apbctReadyIsDone) {
return;
}
apbctReadyIsDone = true;

// Only set ct_checkjs if the key is actually provided (not on block pages)
if (typeof ctPublic.ct_checkjs_key !== 'undefined' && ctPublic.ct_checkjs_key !== null) {
apbctLocalStorage.set('ct_checkjs', ctPublic.ct_checkjs_key, true);
Expand Down Expand Up @@ -7227,10 +7249,18 @@ class ApbctForceProtection {
}
}

let apbctForceProtectionIsInitialized = false;

/**
* Force protection
*/
function apbctForceProtect() {
// Some plugins dispatch a synthetic DOMContentLoaded, the check must be sent only once
if (apbctForceProtectionIsInitialized) {
return;
}
apbctForceProtectionIsInitialized = true;

if (+ctPublic.settings__forms__force_protection && typeof ApbctForceProtection !== 'undefined') {
new ApbctForceProtection();
}
Expand Down Expand Up @@ -8124,7 +8154,15 @@ function ctCheckInternal(currForm) {
);
}

let ctInternalFormsIsInitialized = false;

document.addEventListener('DOMContentLoaded', function() {
// Some plugins dispatch a synthetic DOMContentLoaded, forms must not be re-wrapped
if (ctInternalFormsIsInitialized) {
return;
}
ctInternalFormsIsInitialized = true;

if ( ! +ctPublic.settings__forms__check_internal ) {
return;
}
Expand Down Expand Up @@ -8793,7 +8831,15 @@ if (Math.floor(Math.random() * 100) === 1) {
};
}

let ctTrpIsInitialized = false;

document.addEventListener('DOMContentLoaded', function() {
// Some plugins dispatch a synthetic DOMContentLoaded, badges must not be built twice
if (ctTrpIsInitialized) {
return;
}
ctTrpIsInitialized = true;

let ctTrpLocalize = undefined;
let ctTrpIsAdminCommentsList = false;

Expand Down
Loading
Loading