diff --git a/packages/app-cli/tests/support/plugins/content_script/src/markdownItTestPluginRuntime.js b/packages/app-cli/tests/support/plugins/content_script/src/markdownItTestPluginRuntime.js index e846a4dc68..b3c0150ad0 100644 --- a/packages/app-cli/tests/support/plugins/content_script/src/markdownItTestPluginRuntime.js +++ b/packages/app-cli/tests/support/plugins/content_script/src/markdownItTestPluginRuntime.js @@ -1,14 +1,14 @@ const addClickHandlers = () => { - const postMessageLinks = document.querySelectorAll('.post-message-link'); - for (const link of postMessageLinks) { - const contentScriptId = link.getAttribute('data-content-script-id'); - link.onclick = async () => { - const response = await webviewApi.postMessage(contentScriptId, 'justtesting'); - link.textContent = 'Got response in content script: ' + response; - }; - } + const postMessageLinks = document.querySelectorAll('.post-message-link'); + for (const link of postMessageLinks) { + const contentScriptId = link.getAttribute('data-content-script-id'); + link.onclick = async () => { + const response = await webviewApi.postMessage(contentScriptId, 'justtesting'); + link.textContent = 'Got response in content script: ' + response; + }; + } }; document.addEventListener('joplin-noteDidUpdate', () => { - addClickHandlers(); + addClickHandlers(); });