PluginProbe
Parse.ly / 3.0.0
Parse.ly v3.0.0
3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 3.20.2 3.20.3 All 105 releases
wp-parsely / src / js / lib / admin-page / index.js

index.js in Parse.ly 3.0.0, at src/js/lib/admin-page/index.js

29 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import domReady from '@wordpress/dom-ready';
2 import { __, sprintf } from '@wordpress/i18n';
3
4 domReady( () => {
5 const keyEl = document.querySelector( '#apikey' );
6 const requiresRecrawlNotice = document.querySelectorAll(
7 '.parsely-form-controls[data-requires-recrawl="true"] .help-text'
8 );
9 if ( ! ( keyEl && requiresRecrawlNotice.length ) ) {
10 return;
11 }
12
13 const notice = sprintf(
14 /* translators: %s: The API Key that will be used to request a recrawl */
15 __(
16 '<strong style="color:#d63638">Important:</strong> changing this value on a site currently tracked with Parse.ly will require reprocessing of your Parse.ly data. Once you have changed this value, please contact <a href="mailto:support@parsely.com?subject=Please reprocess %s">support@parsely.com</a>',
17 'wp-parsely'
18 ),
19 keyEl.value
20 );
21
22 [].forEach.call( requiresRecrawlNotice, function( node ) {
23 const descWrapper = document.createElement( 'p' );
24 descWrapper.className = 'description';
25 descWrapper.innerHTML = notice;
26 node.appendChild( descWrapper );
27 } );
28 } );
29