Stonehill Creatorlab
Member Area
(function (win) {
'use strict';
if (win.SHCL_PopupDebugSimple) return;
let i = -1;
const actions = [
() => win.SHCL_PersonaModal?.open?.({
imageUrl: 'https://via.placeholder.com/768x1344.png?text=Persona',
description: 'Debug Persona Modal',
generationId: 'debug-1',
headline: 'Debug Persona Modal'
}),
() => win.SHCL_LoginRequiredPopup?.open?.({
title: 'Debug Login Popup',
message: 'Debug message',
signupUrl: '#'
}),
() => win.SHCL_CreditPopup?.open?.({ credits: 100 }),
() => win.SHCL_CreditInfoPopup?.open?.({ plansUrl: '#' }),
() => win.SHCL_PersonaLimitPopup?.open?.({ plansUrl: '#' }),
() => win.SHCL_SocialConnectUpgradePopup?.open?.({ plansUrl: '#' }),
() => win.SHCL_ConnectSocialPopup?.open?.(),
() => {
win.SHCL_PublishRetryFlow?.set?.({ postId: 'debug-post', influencerId: 'debug-inf' });
win.SHCL_PublishRetryPopup?.open?.();
},
() => win.SHCL_Confirm?.ask?.({
title: 'Debug Confirm',
message: 'Debug confirm message',
confirmText: 'OK',
cancelText: 'Cancel'
})
];
function closeAll() {
win.SHCL_PersonaModal?.close?.();
win.SHCL_LoginRequiredPopup?.close?.();
win.SHCL_CreditPopup?.close?.();
win.SHCL_CreditInfoPopup?.close?.();
win.SHCL_PersonaLimitPopup?.close?.();
win.SHCL_SocialConnectUpgradePopup?.close?.();
win.SHCL_ConnectSocialPopup?.close?.();
win.SHCL_PublishRetryPopup?.close?.();
document.querySelectorAll('.fixed.inset-0.z-\\[999\\]').forEach((el) => el.remove());
}
document.addEventListener('keydown', function (e) {
if (e.key !== 'F8') return;
e.preventDefault();
closeAll();
i = (i + 1) % actions.length;
actions[i]();
console.log('[Popup Debug] Showing popup', i + 1, 'of', actions.length);
});
win.SHCL_PopupDebugSimple = true;
})();