SILENT KILLERPanel

Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > > extendify > src > > Shared >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/codekrsu//ameliagraphics.com/wp-content/plugins//extendify/src//Shared/

NameTypeSizeLast ModifiedActions
api Directory - -
components Directory - -
hooks Directory - -
lib Directory - -
state Directory - -
utils Directory - -
app.css File 602 bytes March 26 2025 18:03:22.
shared.js File 1468 bytes March 28 2025 19:25:40.

Reading File: /home/codekrsu//ameliagraphics.com/wp-content/plugins//extendify/src//Shared//shared.js

import '@shared/app.css';
import { EditPageToolTip } from '@shared/components/EditPageToolTip';
import { render } from '@shared/lib/dom';
import { preFetchImages as preFetchUnsplashImages } from '@shared/lib/unsplash';

const isOnLaunch = () => {
	const query = new URLSearchParams(window.location.search);
	return query.get('page') === 'extendify-launch';
};

(() => {
	if (isOnLaunch()) return;

	preFetchUnsplashImages();

	// If they just finished launch and are on the home page,
	// then show the edit page modal tooltip
	const urlParams = new URLSearchParams(window.location.search);
	const justCompletedLaunch = urlParams.has('extendify-launch-success');
	if (justCompletedLaunch) {
		const hasEditButton = document.querySelector('#wp-admin-bar-edit');
		if (!hasEditButton) return;
		const currentUrl = new URL(window.location.href);
		const homeUrl = new URL(window.extSharedData.homeUrl);
		const isHomePage =
			currentUrl.origin === homeUrl.origin &&
			currentUrl.pathname === homeUrl.pathname;
		// Remove the query param so it doesn't show again
		urlParams.delete('extendify-launch-success');
		const newUrl = `${currentUrl.origin}${currentUrl.pathname}`;
		window.history.replaceState({}, '', newUrl);
		if (isHomePage) {
			// Add a div to render on
			const div = Object.assign(document.createElement('div'), {
				id: 'extendify-edit-page-modal-tooltip',
			});
			document.body.appendChild(div);
			render(<EditPageToolTip />, div);
		}
	}
})();

SILENT KILLER Tool