Spade

Mini Shell

Directory:~$ /home/lmsyaran/public_html/joomla4/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ /home/lmsyaran/public_html/joomla4/script.js.tar

home/lmsyaran/public_html/media/plg_system_web357framework/js/script.js000064400000025632151157036200022371
0ustar00/* ======================================================
 # Web357 Framework for Joomla! - v1.9.1 (free version)
 # -------------------------------------------------------
 # For Joomla! CMS (v3.x)
 # Author: Web357 (Yiannis Christodoulou)
 # Copyright (©) 2014-2022 Web357. All rights reserved.
 # License: GNU/GPLv3, http://www.gnu.org/licenses/gpl-3.0.html
 # Website: https:/www.web357.com
 # Demo: https://demo.web357.com/joomla/
 # Support: support@web357.com
 # Last modified: Wednesday 07 December 2022, 11:05:26 AM
 ========================================================= */

var jQueryWeb357 = jQuery.noConflict();
jQueryWeb357(document).ready(function ($) {
    /**
     * SCREENSHOTS FOR PARAMETERS
     */
    // get paths and urls
    var baseUrl =
jQueryWeb357('#baseurl').data('baseurl');
    var jversion =
jQueryWeb357('#jversion').data('jversion');

    // Add the version class to the body
    jQueryWeb357('body').addClass('web357-' +
jversion);

    // get screenshots array
    var screenshots = [];

    /**
     * SCREENSHOTS FOR LIMIT ACTIVE LOGINS
     */
    var lal_path =
        baseUrl +
       
'media/com_limitactivelogins/images/screenshots-for-parameters/';
    screenshots.push({
        sclass: '.lal-showLoggedInDevices',
        src: lal_path + 'showLoggedInDevices.png',
        width: 1021,
        height: 699,
    });
    screenshots.push({
        sclass: '.lal-customErrorMessage',
        src: lal_path + 'customErrorMessage.png',
        width: 750,
        height: 250,
    });
    screenshots.push({
        sclass: '.lal-showGravatar',
        src: lal_path + 'showGravatar.png',
        width: 987,
        height: 216,
    });
    screenshots.push({
        sclass: '.lal-customLimits',
        src: lal_path + 'customLimits.png',
        width: 987,
        height: 216,
    });

    /**
     * SCREENSHOTS FOR COOKIES POLICY NOTIFICATION BAR
     */
    var cpnb_path =
        baseUrl +
       
'plugins/system/cookiespolicynotificationbar/assets/images/screenshots-for-parameters/';
    screenshots.push({
        sclass: '.cpnb-position',
        src: cpnb_path + 'position.png',
        width: 1156,
        height: 669,
    });
    screenshots.push({
        sclass: '.cpnb-showCloseXIcon',
        src: cpnb_path + 'showCloseXIcon.png',
        width: 640,
        height: 208,
    });
    screenshots.push({
        sclass: '.cpnb-enableConfirmationAlerts',
        src: cpnb_path + 'enableConfirmationAlerts.png',
        width: 1021,
        height: 699,
    });
    screenshots.push({
        sclass: '.cpnb-notification-bar-message',
        src: cpnb_path + 'notification-bar.png',
        width: 1142,
        height: 691,
    });
    screenshots.push({
        sclass: '.cpnb-modal-info-window',
        src: cpnb_path + 'modal-info-window.png',
        width: 1145,
        height: 691,
    });
    screenshots.push({
        sclass: '.cpnb-modalState',
        src: cpnb_path + 'modalState.png',
        width: 1145,
        height: 786,
    });
    screenshots.push({
        sclass: '.cpnb-modalFloatButtonState',
        src: cpnb_path + 'modalFloatButtonState.png',
        width: 1145,
        height: 786,
    });
    screenshots.push({
        sclass: '.cpnb-modalHashLink',
        src: cpnb_path + 'modalHashLink.png',
        width: 1311,
        height: 795,
    });

    /**
     * SCREENSHOTS FOR SUPPORT HOURS
     */
    var sh_path = baseUrl +
'modules/mod_supporthours/screenshots/';
    screenshots.push({
        sclass: '.sh-display_copyright',
        src: sh_path + 'display_copyright.png',
        width: 650,
        height: 535,
    });
    screenshots.push({
        sclass: '.sh-dateformat',
        src: sh_path + 'dateformat.png',
        width: 650,
        height: 535,
    });
    screenshots.push({
        sclass: '.sh-timeformat',
        src: sh_path + 'timeformat.png',
        width: 650,
        height: 535,
    });
    screenshots.push({
        sclass: '.sh-display_pm_am',
        src: sh_path + 'display_pm_am.png',
        width: 650,
        height: 535,
    });
    screenshots.push({
        sclass: '.sh-open_hours_time_format',
        src: sh_path + 'open_hours_time_format.png',
        width: 650,
        height: 535,
    });
    screenshots.push({
        sclass: '.sh-display_gmt',
        src: sh_path + 'display_gmt.png',
        width: 650,
        height: 535,
    });
    screenshots.push({
        sclass: '.sh-display_open_hours_beside_maintext',
        src: sh_path + 'display_open_hours_beside_maintext.png',
        width: 650,
        height: 535,
    });
    screenshots.push({
        sclass: '.sh-online_text',
        src: sh_path + 'online_text.png',
        width: 650,
        height: 535,
    });
    screenshots.push({
        sclass: '.sh-front_text_available',
        src: sh_path + 'front_text_available.png',
        width: 650,
        height: 535,
    });
    screenshots.push({
        sclass: '.sh-offline_text',
        src: sh_path + 'offline_text.png',
        width: 650,
        height: 535,
    });
    screenshots.push({
        sclass: '.sh-front_text_offline',
        src: sh_path + 'front_text_offline.png',
        width: 650,
        height: 535,
    });
    screenshots.push({
        sclass: '.sh-state_text',
        src: sh_path + 'state_text.png',
        width: 650,
        height: 535,
    });
    screenshots.push({
        sclass: '.sh-show_available_left_link',
        src: sh_path + 'show_available_left_link.png',
        width: 650,
        height: 535,
    });
    screenshots.push({
        sclass: '.sh-show_available_right_link',
        src: sh_path + 'show_available_right_link.png',
        width: 650,
        height: 535,
    });
    screenshots.push({
        sclass: '.sh-show_offline_link',
        src: sh_path + 'show_offline_link.png',
        width: 650,
        height: 535,
    });
    screenshots.push({
        sclass: '.sh-box_width',
        src: sh_path + 'box_width.png',
        width: 650,
        height: 535,
    });
    screenshots.push({
        sclass: '.sh-layout',
        src: sh_path + 'layout.png',
        width: 930,
        height: 550,
    });

    /**
     * SCREENSHOTS FOR THE FIX 404 ERROR LINKS
     */
    var f404_path =
        baseUrl +
       
'administrator/components/com_fix404errorlinks/assets/images/screenshots-for-parameters/';
    screenshots.push({
        sclass: '.f404-copyright',
        src: f404_path + 'f404-copyright.png',
        width: 483,
        height: 297,
    });

    /**
     * SCREENSHOTS FOR LOGIN AS USER
     */
    var login_as_user_system_plugin_path =
        baseUrl +
       
'plugins/system/loginasuser/assets/images/screenshots-for-parameters/';
    screenshots.push({
        sclass: '.lau-showSuccessMessage',
        src: login_as_user_system_plugin_path +
'showSuccessMessage.png',
        width: 976,
        height: 559,
    });

    /// add screenshots for parameters
    for (i = 0, len = screenshots.length; i < len; i++) {
        var sclass = screenshots[i].sclass;
        var screenshot_src = screenshots[i].src;

        if (jversion === 'j4x') {
            if ($(sclass).length > 0) {
                // check if the class exists.
                // j4
                var modal_width = screenshots[i].width + 2;
                var modal_id = sclass.replace('.',
'');

                // styling
                if (
                    sclass === '.cpnb-notification-bar-message'
||
                    sclass === '.sh-front_text_available' ||
                    sclass === '.sh-front_text_offline'
                ) {
                    // textarea
                    var style =
                        'margin-left: 20px; cursor: pointer;
vertical-align: top;';
                } else {
                    var style = 'margin-left: 20px; cursor: pointer;
';
                }

                //var screenshot_html = '<button
type="button" title="See a Screenshot"
data-toggle="modal"
data-target="#'+modal_id+'"
style="'+style+'"><span
class="icon-eye"
aria-hidden="true"></span></button><div
id="'+modal_id+'" class="modal fade"
tabindex="-1" role="dialog"
aria-labelledby="myModalLabel"
aria-hidden="true"><div class="modal-dialog"
style="min-width: '+modal_width+'px; margin: 30px
auto;"><div class="modal-content"><div
class="modal-header"><h3
class="modal-title">Screenshot</h3><button
type="button" class="close"
data-dismiss="modal">&times;</button></div><div
class="modal-body"><img
src="'+screenshot_src+'"
class="img-responsive"></div></div></div></div>';

                // Button trigger modal
                var screenshot_html = '';
                screenshot_html +=
                    `<button type="button" title="See a
Screenshot" data-toggle="modal" data-target="#` +
                    modal_id +
                    `" data-bs-toggle="modal"
data-bs-target="#` +
                    modal_id +
                    `" style="` +
                    style +
                    `">
					<span class="icon-eye"
aria-hidden="true"></span>
				</button>`;

                // Modal
                screenshot_html +=
                    `<div id="` +
                    modal_id +
                    `" class="joomla-modal modal fade"
tabindex="-1" role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true">
					<div class="modal-dialog" style="min-width: ` +
                    modal_width +
                    `px; margin: 30px auto;">
						<div class="modal-content">
							<div class="modal-header">
								<h3 class="modal-title">Screenshot</h3>
								<button type="button" class="close"
data-dismiss="modal"
data-bs-dismiss="modal">&times;</button>
							</div>
							<div class="modal-body">
								<img src="` +
                    screenshot_src +
                    `" class="img-responsive">
							</div>
						</div>
					</div>
				</div>`;
            }
        } else {
            // j3x, j25x
            var screenshot_html =
                '<div style="display: inline-block;
margin-left: 20px; position: relative; top: 2px;"><a
href="' +
                screenshot_src +
                '" class="hasTooltip modal"
data-toggle="modal" data-original-title="Click to see an
example." rel="{size: {x: ' +
                screenshots[i].width +
                ', y: ' +
                screenshots[i].height +
                '}, handler:\'iframe\'}"><i
class="icon-eye-open"></i></a></div>';
        }

        jQueryWeb357(screenshot_html).insertAfter(sclass);
    }

    // J4: Remove the label from subform fields in the component/plugin
settings
    $('body.web357-j4x
label[for="jform_params_cookie_categories_group"]')
        .parent()
        .remove();
    $('body.web357-j4x
label[for="jform_custom_limits_group"]')
        .parent()
        .remove();
});
home/lmsyaran/public_html/media/regularlabs/js/script.js000064400000016455151160560370017503
0ustar00/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

"use strict";

if (typeof window.RegularLabsScripts === 'undefined'
	|| typeof RegularLabsScripts.version === 'undefined'
	|| RegularLabsScripts.version < '21.2.19653') {

	(function($) {
		window.RegularLabsScripts = {
			version: '21.2.19653',

			ajax_list        : [],
			started_ajax_list: false,
			ajax_list_timer  : null,

			loadajax: function(url, success, fail, query, timeout, dataType, cache)
{
				if (url.indexOf('index.php') !== 0 &&
url.indexOf('administrator/index.php') !== 0) {
					url = url.replace('http://', '');
					url = `index.php?rl_qp=1&url=${encodeURIComponent(url)}`;
					if (timeout) {
						url += `&timeout=${timeout}`;
					}
					if (cache) {
						url += `&cache=${cache}`;
					}
				}

				let base = window.location.pathname;

				base = base.substring(0, base.lastIndexOf('/'));

				if (
					typeof Joomla !== 'undefined'
					&& typeof Joomla.getOptions !== 'undefined'
					&& Joomla.getOptions('system.paths')
				) {
					base = Joomla.getOptions('system.paths').base;
				}

				// console.log(url);
				// console.log(`${base}/${url}`);

				$.ajax({
					type    : 'post',
					url     : `${base}/${url}`,
					dataType: dataType ? dataType : '',
					success : function(data) {
						if (success) {
							success = `data = data ? data : '';
${success};`.replace(/;\s*;/g, ';');
							eval(success);
						}
					},
					error   : function(data) {
						if (fail) {
							fail = `data = data ? data : '';
${fail};`.replace(/;\s*;/g, ';');
							eval(fail);
						}
					}
				});
			},

			displayVersion: function(data, extension, version) {
				if (!data) {
					return;
				}

				const xml = this.getObjectFromXML(data);

				if (!xml) {
					return;
				}

				if (typeof xml[extension] === 'undefined') {
					return;
				}

				const dat = xml[extension];

				if (!dat || typeof dat.version === 'undefined' ||
!dat.version) {
					return;
				}

				const new_version = dat.version;
				const compare     = this.compareVersions(version, new_version);

				if (compare != '<') {
					return;
				}

				let el = $(`#regularlabs_newversionnumber_${extension}`);

				if (el) {
					el.text(new_version);
				}

				el = $(`#regularlabs_version_${extension}`);

				if (el) {
					el.css('display', 'block');
					el.parent().removeClass('hide');
				}
			},

			addToLoadAjaxList: function(url, success, error) {
				// wrap inside the loadajax function (and escape string values)
				url     = url.replace(/'/g, "\\'");
				success = success.replace(/'/g, "\\'");
				error   = error.replace(/'/g, "\\'");

				const action = `RegularLabsScripts.loadajax(
					'${url}',
					'${success};RegularLabsScripts.ajaxRun();',
					'${error};RegularLabsScripts.ajaxRun();'
				)`;

				this.addToAjaxList(action);
			},

			addToAjaxList: function(action) {
				this.ajax_list.push(action);

				if (!this.started_ajax_list) {
					this.ajaxRun();
				}
			},

			ajaxRun: function() {
				if (typeof RegularLabsToggler !== 'undefined') {
					RegularLabsToggler.initialize();
				}

				if (!this.ajax_list.length) {
					return;
				}

				clearTimeout(this.ajax_list_timer);

				this.started_ajax_list = true;

				const action = this.ajax_list.shift();

				eval(`${action};`);

				if (!this.ajax_list.length) {
					return;
				}

				// Re-trigger this ajaxRun function just in case it hangs somewhere
				this.ajax_list_timer = setTimeout(
					function() {
						RegularLabsScripts.ajaxRun();
					},
					5000
				);
			},

			in_array: function(needle, haystack, casesensitive) {
				if ({}.toString.call(needle).slice(8, -1) !== 'Array') {
					needle = [needle];
				}
				if ({}.toString.call(haystack).slice(8, -1) !== 'Array') {
					haystack = [haystack];
				}

				for (let h = 0; h < haystack.length; h++) {
					for (let n = 0; n < needle.length; n++) {
						if (casesensitive) {
							if (haystack[h] == needle[n]) {
								return true;
							}

							continue;
						}

						if (haystack[h].toLowerCase() == needle[n].toLowerCase()) {
							return true;
						}
					}
				}
				return false;
			},

			getObjectFromXML: function(xml) {
				if (!xml) {
					return;
				}

				const obj = [];
				$(xml).find('extension').each(function() {
					const el = [];
					$(this).children().each(function() {
						el[this.nodeName.toLowerCase()] = String($(this).text()).trim();
					});
					if (typeof el.alias !== 'undefined') {
						obj[el.alias] = el;
					}
					if (typeof el.extname !== 'undefined' && el.extname
!= el.alias) {
						obj[el.extname] = el;
					}
				});

				return obj;
			},

			compareVersions: function(number1, neumber2) {
				number1  = number1.split('.');
				neumber2 = neumber2.split('.');

				let letter1 = '';
				let letter2 = '';

				const max = Math.max(number1.length, neumber2.length);
				for (let i = 0; i < max; i++) {
					if (typeof number1[i] === 'undefined') {
						number1[i] = '0';
					}
					if (typeof neumber2[i] === 'undefined') {
						neumber2[i] = '0';
					}

					letter1     = number1[i].replace(/^[0-9]*(.*)/, '$1');
					number1[i]  = parseInt(number1[i]);
					letter2     = neumber2[i].replace(/^[0-9]*(.*)/, '$1');
					neumber2[i] = parseInt(neumber2[i]);

					if (number1[i] < neumber2[i]) {
						return '<';
					}

					if (number1[i] > neumber2[i]) {
						return '>';
					}
				}

				// numbers are same, so compare trailing letters
				if (letter2 && (!letter1 || letter1 > letter2)) {
					return '>';
				}

				if (letter1 && (!letter2 || letter1 < letter2)) {
					return '<';
				}

				return '=';
			},

			getEditorSelection: function(editorID) {
				const editor_textarea = document.getElementById(editorID);

				if (!editor_textarea) {
					return '';
				}

				const editorIFrame =
editor_textarea.parentNode.querySelector('iframe');

				if (!editorIFrame) {
					return '';
				}

				const contentWindow = editorIFrame.contentWindow;

				if (typeof contentWindow.getSelection !== 'undefined') {
					const sel = contentWindow.getSelection();

					if (sel.rangeCount) {
						const container =
contentWindow.document.createElement('div');
						const len       = sel.rangeCount;

						for (let i = 0; i < len; ++i) {
							container.appendChild(sel.getRangeAt(i).cloneContents());
						}

						return container.innerHTML;
					}

					return '';
				}

				if (typeof contentWindow.document.selection !== 'undefined'
					&& contentWindow.document.selection.type === 'Text')
{
					return contentWindow.document.selection.createRange().htmlText;
				}

				return '';
			},

			/* 2018-11-01: These methods have moved to RegularLabsForm. Keeping them
here for backwards compatibility. */
			setRadio                 : function(id, value) {
			},
			initCheckAlls            : function(id, classname) {
			},
			allChecked               : function(classname) {
				return false;
			},
			checkAll                 : function(checkbox, classname) {
			},
			toggleSelectListSelection: function(id) {
			},
			prependTextarea          : function(id, content, separator) {
			},
			setToggleTitleClass      : function(input, value) {
			}
		};
	})(jQuery);
}