@glitchr/transparent 1.0.34 → 1.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glitchr/transparent",
3
- "version": "1.0.34",
3
+ "version": "1.0.35",
4
4
  "description": "Transparent SPA Application",
5
5
  "main": "src/index.js",
6
6
  "access": "public",
@@ -1208,9 +1208,16 @@
1208
1208
 
1209
1209
  $("head").children().each(function() { found |= this.isEqualNode(el); });
1210
1210
  if(!found) {
1211
+
1212
+
1213
+ if(this.tagName != "SCRIPT" || Settings["global_code"] == true) {
1214
+
1215
+ $("head").append(this.cloneNode(true));
1216
+
1217
+ } else {
1211
1218
 
1212
- if(this.tagName != "SCRIPT" || Settings["global_code"] == true) $("head").append(this.cloneNode(true));
1213
- else $("head").append(this);
1219
+ $("head").append(this);
1220
+ }
1214
1221
  }
1215
1222
  });
1216
1223
 
@@ -1221,7 +1228,14 @@
1221
1228
  var found = false;
1222
1229
 
1223
1230
  $("body").children().each(function() { found |= this.isEqualNode(el); });
1224
- if(!found) $("body").append(this);
1231
+ if(!found) {
1232
+
1233
+ if(this.tagName != "SCRIPT" || Settings["global_code"] == true) {
1234
+ $("body").append(this.cloneNode(true));
1235
+ } else {
1236
+ $("body").append(this);
1237
+ }
1238
+ }
1225
1239
  });
1226
1240
 
1227
1241
  // Replace canvases..
@@ -1252,7 +1266,7 @@
1252
1266
 
1253
1267
  if(Settings["global_code"] == true) Transparent.evalScript($(page)[0]);
1254
1268
  document.dispatchEvent(new Event('DOMContentLoaded'));
1255
- window.dispatchEvent(new Event('DOMContentLoaded'));
1269
+ window.dispatchEvent(new Event('DOMContentLoaded'));
1256
1270
 
1257
1271
  Transparent.addLayout();
1258
1272