Skip to content

Commit

Permalink
Chore(demo): Hide elements in Supernova component preview - change al…
Browse files Browse the repository at this point in the history
…lowed URLs
  • Loading branch information
curdaj committed Nov 28, 2024
1 parent f496c5a commit 0a47a06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/demo/partials/layout/base.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
// https://app.supernova.io/8830-alma-spirit/10180-spirit/10368-shared-draft/9731-default/documentation/settings/customization/footer
window.addEventListener('message', (event) => {
// Check if the postMessage is from the Supernova.io domain
if (event.origin === 'https://app.supernova.io' && event.data.action === 'hide-from-visual-tests') {
if ((event.origin === 'https://spirit.supernova-docs.io' || event.origin === 'https://spirit.preview.supernova-docs.io') && event.data.action === 'hide-from-visual-tests') {
const elements = document.querySelectorAll('.hide-from-visual-tests');
elements.forEach(element => {
element.style.cssText = event.data.style;
Expand Down

0 comments on commit 0a47a06

Please sign in to comment.