Skip to content

Commit c008a68

Browse files
committed
Only load on the top window.
This works for my purposes, however, what if an iFrame is the main target? Does it matter?
1 parent 227858e commit c008a68

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

simpletoast.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
* SimpleToast - A small library for toasts
33
*/
44
(() => {
5-
const version = buildVersion(1, 4);
5+
if (window !== window.top) return;
6+
const version = buildVersion(1, 4, 1);
67
if (window.SimpleToast) {
78
if (SimpleToast.version) {
89
if (SimpleToast.version >= version.number) return;

0 commit comments

Comments
 (0)