📁
SKYSHELL MANAGER
PHP v8.2.31
Create
Create
Path:
root
/
home
/
thevaxnx
/
nativize.com
/
staging
/
wp-includes
/
js
/
tinymce
/
themes
/
Name
Size
Perm
Actions
📁
inlite
-
0755
🗑️
🏷️
🔒
📁
modern
-
0755
🗑️
🏷️
🔒
📄
wp-links-opml.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
Edit: common.js
(function($) { $(document).ready(function () { const $ncssl = $('#ncssl'); const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); const tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) { return new bootstrap.Tooltip(tooltipTriggerEl) }) $ncssl.find('[data-cta-btn]').each(function() { let ctaBtn = $(this); ctaBtn.click(function() { const loadingText = ctaBtn.attr('data-ncssl-loading'); ctaBtn.attr('disabled', true); ctaBtn.text(loadingText); }); }); if ($('.certificates-table tr').length > 1) { $('#ready-ssls-table').tableFilter({'filterInputField': '#table-input'}); $('#installed-ssls-table').tableFilter({'filterInputField': '#table-input'}); } function showAlertMessage(type, message) { const allowedTypes = ['danger', 'warning', 'success', 'info']; if (!allowedTypes.includes(type)) { console.error(`Wrong type of alert message. Only ${allowedTypes.join(', ')} are allowed!`); } $( `<div class="alert alert-${type} alert-dismissible fade show" role="alert"> ${message} <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button> </div>` ).prependTo('.alert-messages-holder'); } function httpRedirectChangeHandler(event) { const classLoader = 'loader'; const toggle = $(event.target); const alertMessage = 'Oops, please switch toggle again or <a href="https://www.namecheap.com/support/live-chat/ssl.aspx" target="_blank">contact support.</a>' toggle.addClass(classLoader); // it's impossible to prevent checkbox. So state before click is reverted: toggle.prop('checked', !toggle.is(':checked')); const domain = toggle.data('name'); const certId = toggle.data('ncId'); const user = toggle.data('user'); const expectedStatus = toggle.is(':checked') ? 0 : 1; const requestUrl = event.data?.endpoint === 'toggle_redirect' ? `index.live.php?p=/ssls/toggle_redirect&domain=${domain}&expectedStatus=${expectedStatus}&certId=${certId}` : `index.live.php?p=/ssls/toggle_redirect_auto_general&user=${user}&expectedStatus=${expectedStatus}`; $.get( requestUrl, function (data) { if (data.status === 'fail') { toggle.prop('checked', !expectedStatus); showAlertMessage('danger', alertMessage); } else { toggle.prop('checked', !!expectedStatus); } } ).fail(function (err) { toggle.prop('checked', !expectedStatus); showAlertMessage('danger', alertMessage); }).always(function(){ toggle.removeClass(classLoader); }); } $ncssl.find('[data-http-redirect-input] input').click({endpoint: 'toggle_redirect'}, httpRedirectChangeHandler); // @TODO will work after SSLP-43535 $ncssl.find('[data-http-redirect-input-auto] input').click({endpoint: 'toggle_redirect_auto_general'}, httpRedirectChangeHandler); $ncssl.find('[data-password-toggle]').click(function () { const $input = $(this).closest('.input-group').find('input'); if ($input.length === 0) { return false; } if ($input.attr('type') === 'password') { $input.attr('type', 'text'); $(this).find('span').removeClass('glyphicon-eye-close').addClass('glyphicon glyphicon-eye-open'); } else { $input.attr('type', 'password'); $(this).find('span').removeClass('glyphicon-eye-open').addClass('glyphicon glyphicon-eye-close'); } return false; }); /* Modal */ //Initialize modals for handling via JS const renewalRedirectModal = new bootstrap.Modal('#renewalRedirectModal'); const reorderRedirectModal = new bootstrap.Modal('#reorderRedirectModal'); const replacementNoticeModal = new bootstrap.Modal('#replacementNoticeModal'); function openRedirectModal(modal, selector, href, notice) { const $modal = $ncssl.find(selector); if (!$modal.length) { return; } $modal.find('[data-redirect-link]').prop('href', href); // Positive/Essential certs carry replacement copy on the toggle attribute; append it as the last paragraph. const $notice = $modal.find('[data-modal-notice]'); const $noticeHeading = $modal.find('[data-modal-notice-heading]'); if (notice) { $notice.text(notice).show(); $noticeHeading.show(); } else { $notice.text('').hide(); $noticeHeading.hide(); } modal.show(); } let pendingReplacementAction = null; // Run the deferred action only after the notice modal has fully closed (clean modal handoff). $('#replacementNoticeModal').on('hidden.bs.modal', function () { const action = pendingReplacementAction; pendingReplacementAction = null; if (action) action(); }); $ncssl.find('[data-replacement-notice-ok]').click(function () { replacementNoticeModal.hide(); // static backdrop => OK is the only path to hide }); // Notice modal is now reserved for the first installation (Install link); navigate after OK. $ncssl.find('[data-replacement-notice]').click(function (e) { e.preventDefault(); e.stopImmediatePropagation(); const $link = $(this); const url = $link.attr('href'); // Render the type-specific copy carried on the link. $ncssl.find('#replacementNoticeModal [data-replacement-notice-body]') .text($link.attr('data-replacement-notice')); pendingReplacementAction = () => { window.location.href = url; }; replacementNoticeModal.show(); }); $ncssl.find('[data-renewal-modal-toggle]').click(function () { const $btn = $(this); openRedirectModal(renewalRedirectModal, '#renewalRedirectModal', $btn.data('href'), $btn.attr('data-renewal-modal-toggle')); }); $ncssl.find('[data-reorder-modal-toggle]').click(function () { const $btn = $(this); openRedirectModal(reorderRedirectModal, '#reorderRedirectModal', $btn.data('href'), $btn.attr('data-reorder-modal-toggle')); }); }) })(jQuery);
Save