PluginProbe
Extendify / 2.2.0
Extendify v2.2.0
3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 0.7.0 All 126 releases
extendify / src / Assist / page.js

page.js in Extendify 2.2.0, at src/Assist/page.js

30 lines 824 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { render as renderDeprecated, createRoot } from '@wordpress/element';
2 import { __ } from '@wordpress/i18n';
3 import { AssistLandingPage } from '@assist/AssistLandingPage';
4 import '@assist/app.css';
5
6 const render = (component, node) => {
7 if (typeof createRoot !== 'function') {
8 renderDeprecated(component, node);
9 return;
10 }
11 createRoot(node).render(component);
12 };
13
14 const init = () => {
15 const assistPage = document.getElementById('extendify-assist-landing-page');
16 if (!assistPage) return;
17 // append skip link to get here
18 document
19 .querySelector('.screen-reader-shortcut')
20 .insertAdjacentHTML(
21 'afterend',
22 `<a href="#extendify-assist-landing-page" class="screen-reader-shortcut">${__(
23 'Skip to Assist',
24 'extendify-local',
25 )}</a>`,
26 );
27 render(<AssistLandingPage />, assistPage);
28 };
29 init();
30