✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ premium290.web-hosting.com ​🇻​♯➤ 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 63.250.38.37 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.105
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/tdhomesa/public_html/wp-content/plugins/wp-optimize/js//delay-js.js
(function() {
	var is_handling = false;

	/**
	 * Handles the loading of a single script element. If the script element has a `data-type`
	 * attribute, it updates the script type accordingly. If the script element has a `data-src`
	 * attribute, it updates the source and attempts to load it.
	 *
	 * @param {HTMLElement} script_element
	 * @returns {Promise}
	 */
	function handle_script_element(script_element) {
		// If 'data-type' is defined, update the script element's type
		update_script_element_type(script_element);

		// If 'data-src' is defined, update the script's source and load it
		return update_script_element_src(script_element);
	}

	/**
	 * Recursively loads script elements one by one. Once a script is successfully loaded,
	 * the next script in the array is loaded. If all scripts are loaded, the function resolves,
	 * otherwise, it rejects on the first error encountered.
	 *
	 * @param {number} index - The current index of the script element being processed.
	 * @param {NodeListOf<HTMLElementTagNameMap[string]>} script_elements - An array of script elements to be loaded.
	 * @param {function} resolve - A function to call when all scripts have been successfully loaded.
	 * @param {function} reject - A function to call if an error occurs during loading of any script.
	 */
	function load_next_script(index, script_elements, resolve, reject) {

		if (index < script_elements.length) {
			handle_script_element(script_elements[index])
				.then(function() {
					load_next_script(index + 1, script_elements, resolve, reject);
				})
				.catch(function() {
					load_next_script(index + 1, script_elements, resolve, reject);
				});
		} else {
			all_scripts_loaded();
			resolve();
		}

	}

	/**
	 * For the given list of script elements with type="text/plain", replace the current script element
	 * with the appropriate type or replace the src attribute with the data-src value for externally loaded scripts.
	 *
	 * @param {NodeListOf<HTMLElementTagNameMap[string]>} script_elements
	 * @returns {Promise}
	 */
	function load_scripts_sequentially(script_elements) {
		// Wrap everything in a Promise to handle asynchronous loading
		return new Promise(function(resolve, reject) {
			load_next_script(0, script_elements, resolve, reject);
		});
	}

	/**
	 * Replaces the current script element with a new one, setting the type attribute to the value of data-type.
	 *
	 * @param {HTMLElement} script_element
	 */
	function update_script_element_type(script_element) {
		const data_type = script_element.getAttribute('data-type');
		const no_delay_js = script_element.hasAttribute('data-no-delay-js');

		if (!data_type || no_delay_js) return;
		
		script_element.type = data_type;
		script_element.removeAttribute('data-type');

		const new_script = script_element.cloneNode(true);

		// Replace the original script tag with the new one
		// We use replaceChild to exclude script running
		script_element.parentNode.replaceChild(new_script, script_element);
	}

	/**
	 * Updates the `src` attribute of a script element and removes its `data-src` attribute.
	 * Returns a promise that resolves when the script is successfully loaded or rejects if the script fails to load.
	 *
	 * @param {HTMLElement} script_element
	 * @returns {Promise}
	 */
	function update_script_element_src(script_element) {
		return new Promise(function(resolve, reject) {
			const no_delay_js = script_element.hasAttribute('data-no-delay-js');
			const data_src = script_element.getAttribute('data-src');

			// If there's no 'data-src', resolve the promise immediately
			if (!data_src || no_delay_js) {
				return resolve();
			}

			script_element.src = data_src;
			script_element.removeAttribute('data-src');

			// Event listener for script load completion
			script_element.onload = resolve;
			script_element.onerror = reject;
		});
	}


	/**
	 * Called when all delayed scripts have loaded. Triggers DOMContentLoaded and load events to run their handlers in delayed scripts.
	 */
	function all_scripts_loaded() {
		window.wpo_delayed_scripts_loaded = true;

		var event = new Event('DOMContentLoaded');
		document.dispatchEvent(event);
		// Create a new load event
		event = new Event('load');
		// Dispatch the load event on the window
		window.dispatchEvent(event);
	}

	/**
	 * List of events to trigger delayed script loading.
	 *
	 * @return {string[]}
	 */
	function get_event_list() {
		return [
			'scroll',
			'mousemove',
			'mouseover',
			'resize',
			'touchstart',
			'touchmove',
		];
	}

	/**
	 * Adds event listeners to trigger delayed script loading on user interaction.
	 */
	function attach_event_listeners() {
		get_event_list().forEach(function (event) {
			window.addEventListener(event, handle_delay_js);
		});
	}

	/**
	 * Removes event listeners that were added to trigger delayed script loading.
	 */
	function remove_event_listeners() {
		get_event_list().forEach(function (event) {
			window.removeEventListener(event, handle_delay_js);
		});
	}

	/**
	 * Get all script elements and load them if their loading was delayed.
	 *
	 * @return {void}
	 */
	function handle_delay_js() {

		if (is_handling) return;

		is_handling = true;

		// Remove all event listeners after the first call
		remove_event_listeners();

		const script_elements = document.querySelectorAll('script');

		load_scripts_sequentially(script_elements);
	}

	// Attach events on any manipulation with the page
	document.addEventListener('DOMContentLoaded', function () {
		if (!window.wpo_delayed_scripts_loaded) {
			attach_event_listeners();
		}
	});
})();


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
22 Jun 2026 6.38 AM
tdhomesa / tdhomesa
0755
handlebars
--
5 Jun 2026 10.08 AM
tdhomesa / tdhomesa
0755
jszip
--
5 Jun 2026 10.08 AM
tdhomesa / tdhomesa
0755
serialize-json
--
5 Jun 2026 10.08 AM
tdhomesa / tdhomesa
0755
sortable
--
5 Jun 2026 10.08 AM
tdhomesa / tdhomesa
0755
blockUI-4-5-5.min.js
0.645 KB
5 Jun 2026 10.44 AM
tdhomesa / tdhomesa
0644
blockUI.js
1.313 KB
25 May 2026 12.53 PM
tdhomesa / tdhomesa
0644
cache-4-5-5.min.js
8.029 KB
5 Jun 2026 10.44 AM
tdhomesa / tdhomesa
0644
cache.js
15.287 KB
25 Mar 2026 2.42 PM
tdhomesa / tdhomesa
0644
delay-js-4-5-5.min.js
1.16 KB
5 Jun 2026 10.44 AM
tdhomesa / tdhomesa
0644
delay-js.js
5.446 KB
21 Apr 2026 8.53 PM
tdhomesa / tdhomesa
0644
heartbeat-4-5-5.min.js
2.781 KB
5 Jun 2026 10.44 AM
tdhomesa / tdhomesa
0644
heartbeat.js
7.522 KB
22 Oct 2024 10.25 PM
tdhomesa / tdhomesa
0644
loadAsync-4-5-5.min.js
0.297 KB
5 Jun 2026 10.44 AM
tdhomesa / tdhomesa
0644
loadAsync.js
0.654 KB
27 Mar 2020 7.42 PM
tdhomesa / tdhomesa
0644
loadCSS-4-5-5.min.js
0.799 KB
5 Jun 2026 10.44 AM
tdhomesa / tdhomesa
0644
loadCSS.js
3.046 KB
27 Mar 2020 7.42 PM
tdhomesa / tdhomesa
0644
minify-4-5-5.min.js
12.531 KB
5 Jun 2026 10.44 AM
tdhomesa / tdhomesa
0644
minify.js
23.036 KB
25 Mar 2026 2.42 PM
tdhomesa / tdhomesa
0644
modal-4-5-5.min.js
1.132 KB
5 Jun 2026 10.44 AM
tdhomesa / tdhomesa
0644
modal.js
2.293 KB
18 Nov 2025 5.53 PM
tdhomesa / tdhomesa
0644
queue-4-5-5.min.js
0.682 KB
5 Jun 2026 10.44 AM
tdhomesa / tdhomesa
0644
queue.js
3.567 KB
24 Sep 2025 2.04 AM
tdhomesa / tdhomesa
0644
send-command-4-5-5.min.js
2.579 KB
5 Jun 2026 10.44 AM
tdhomesa / tdhomesa
0644
send-command.js
5.878 KB
12 Aug 2024 2.02 PM
tdhomesa / tdhomesa
0644
status-4-5-5.min.js
3.615 KB
5 Jun 2026 10.44 AM
tdhomesa / tdhomesa
0644
status.js
7.019 KB
24 Sep 2025 2.04 AM
tdhomesa / tdhomesa
0644
wpo-images-view-4-5-5.min.js
7.334 KB
5 Jun 2026 10.44 AM
tdhomesa / tdhomesa
0644
wpo-images-view.js
15.58 KB
22 Oct 2024 10.25 PM
tdhomesa / tdhomesa
0644
wpoadmin-4-5-5.min.js
37.792 KB
5 Jun 2026 10.44 AM
tdhomesa / tdhomesa
0644
wpoadmin.js
76.408 KB
25 Mar 2026 2.42 PM
tdhomesa / tdhomesa
0644
wposmush-4-5-5.min.js
21.637 KB
5 Jun 2026 10.44 AM
tdhomesa / tdhomesa
0644
wposmush.js
46.05 KB
25 May 2026 12.53 PM
tdhomesa / tdhomesa
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF