Browse Source

Prevent duplicates when including script twice.

Syfaro 9 months ago
parent
commit
76edb0b60c
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      peppershrike.js

+ 6
- 0
peppershrike.js View File

@@ -18,6 +18,12 @@
18 18
             this.id = id;
19 19
             this.container = container;
20 20
 
21
+            if (this.container.dataset.processed === 'y') {
22
+                return;
23
+            }
24
+
25
+            this.container.dataset.processed = 'y';
26
+
21 27
             if (!host) {
22 28
                 this.host = defaultHost;
23 29
             } else {

Loading…
Cancel
Save