| Server IP : 104.21.74.147 / Your IP : 216.73.217.154 Web Server : nginx/1.24.0 System : Linux wordpress-sites 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/rebeccaone.com/wp-content/plugins/soliloquy/assets/js/ |
Upload File : |
/* eslint-disable @typescript-eslint/no-unused-vars */
/* global soliloquy_settings */
/* ==========================================================
* settings.js
* https://soliloquywp.com/
* ==========================================================
* Copyright 2016 Thomas Griffin.
*
* Licensed under the GPL License, Version 2.0 or later (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
(function ($, window, document, soliloquy_settings) {
//Dom Ready
$(function () {
// Initialize the slider tabs.
const soliloquy_tabs = $('#soliloquy-tabs');
const soliloquy_tabs_nav = $('#soliloquy-tabs-nav');
let soliloquy_tabs_hash = window.location.hash;
const soliloquy_tabs_hash_sani = window.location.hash.replace('!', '');
// If we have a hash and it begins with "soliloquy-tab", set the proper tab to be opened.
if (soliloquy_tabs_hash && soliloquy_tabs_hash.indexOf('soliloquy-tab-') >= 0) {
$('.soliloquy-active').removeClass('soliloquy-active nav-tab-active');
soliloquy_tabs_nav
.find('a[href="' + soliloquy_tabs_hash_sani + '"]')
.addClass('soliloquy-active nav-tab-active');
soliloquy_tabs.find(soliloquy_tabs_hash_sani).addClass('soliloquy-active').show();
}
// Start the upgrade process.
$('.soliloquy-start-upgrade').on('click', function (e) {
e.preventDefault();
const $this = $(this);
// Show the spinner.
$('.soliloquy-spinner').css({
display: 'inline-block',
float: 'none',
'vertical-align': 'text-bottom'
});
// Prepare our data to be sent via Ajax.
const upgrade = {
action: 'soliloquy_upgrade_sliders',
nonce: soliloquy_settings.upgrade_nonce
};
// Process the Ajax response and output all the necessary data.
$.post(
soliloquy_settings.ajax,
upgrade,
function (response) {
// Hide the spinner.
$('.soliloquy-spinner').hide();
// Redirect back to Soliloquy screen.
window.location.replace(soliloquy_settings.redirect);
},
'json'
);
});
// Change tabs on click.
$('#soliloquy-tabs-nav a').on('click', function (e) {
e.preventDefault();
const $this = $(this);
//If the tab is active return, else switch tabs
if ($this.hasClass('soliloquy-active')) {
return;
} else {
window.location.hash = soliloquy_tabs_hash = this.hash.split('#').join('#!');
const current = soliloquy_tabs_nav
.find('.soliloquy-active')
.removeClass('soliloquy-active nav-tab-active')
.attr('href');
$this.addClass('soliloquy-active nav-tab-active');
soliloquy_tabs.find(current).removeClass('soliloquy-active').hide();
soliloquy_tabs.find($this.attr('href')).addClass('soliloquy-active').show();
}
});
//Create the Select boxes
$('.soliloquy-chosen').each(function () {
const data_options = $(this).data('soliloquy-chosen-options');
$(this).chosen(data_options);
});
});
})(jQuery, window, document, soliloquy_settings);