Make generated iframe embed code work well with transparent background (#5672)
* Explicitly declare color scheme availability and preference
* Revert "Explicitly declare color scheme availability and preference"
This reverts commit e1e6242d29.
* Add `color-scheme: auto;` to generated iframe embed code
This commit is contained in:
parent
c3af79a115
commit
54641ccea6
|
|
@ -115,7 +115,7 @@ if (embedButton) {
|
|||
embedLink.searchParams.set('background', background)
|
||||
}
|
||||
|
||||
embedCode.value = `<iframe plausible-embed src="${embedLink.toString()}" scrolling="no" frameborder="0" loading="lazy" style="width: 1px; min-width: 100%; height: 1600px;"></iframe>
|
||||
embedCode.value = `<iframe plausible-embed src="${embedLink.toString()}" scrolling="no" frameborder="0" loading="lazy" style="width: 1px; min-width: 100%; height: 1600px; color-scheme: auto;"></iframe>
|
||||
<div style="font-size: 14px; padding-bottom: 14px;">Stats powered by <a target="_blank" style="color: #4F46E5; text-decoration: underline;" href="https://plausible.io">Plausible Analytics</a></div>
|
||||
<script async src="${baseUrl}/js/embed.host.js"></script>`
|
||||
} catch (e) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue