@glitchr/transparent 1.0.27 → 1.0.29
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 +1 -1
- package/src/js/transparent.js +18 -4
package/package.json
CHANGED
package/src/js/transparent.js
CHANGED
|
@@ -1208,6 +1208,16 @@
|
|
|
1208
1208
|
}
|
|
1209
1209
|
});
|
|
1210
1210
|
|
|
1211
|
+
var bodyScript = $(dom).find("body > script");
|
|
1212
|
+
bodyScript.each(function() {
|
|
1213
|
+
|
|
1214
|
+
var el = this;
|
|
1215
|
+
var found = false;
|
|
1216
|
+
|
|
1217
|
+
$("body").children().each(function() { found |= this.isEqualNode(el); });
|
|
1218
|
+
if(!found) $("body").append(this);
|
|
1219
|
+
});
|
|
1220
|
+
|
|
1211
1221
|
// Replace canvases..
|
|
1212
1222
|
Transparent.replaceCanvases(dom);
|
|
1213
1223
|
|
|
@@ -1235,7 +1245,8 @@
|
|
|
1235
1245
|
oldPage.remove();
|
|
1236
1246
|
|
|
1237
1247
|
if(Settings["global_code"] == true) Transparent.evalScript($(page)[0]);
|
|
1238
|
-
dispatchEvent(new Event('DOMContentLoaded'));
|
|
1248
|
+
document.dispatchEvent(new Event('DOMContentLoaded'));
|
|
1249
|
+
window.dispatchEvent(new Event('DOMContentLoaded'));
|
|
1239
1250
|
|
|
1240
1251
|
Transparent.addLayout();
|
|
1241
1252
|
|
|
@@ -1407,7 +1418,8 @@
|
|
|
1407
1418
|
|
|
1408
1419
|
var form = target != undefined && target.tagName == "FORM" ? target : undefined;
|
|
1409
1420
|
if (form) {
|
|
1410
|
-
|
|
1421
|
+
|
|
1422
|
+
data = new FormData(form);
|
|
1411
1423
|
$(form).find(':submit').attr('disabled', 'disabled');
|
|
1412
1424
|
}
|
|
1413
1425
|
|
|
@@ -1530,7 +1542,7 @@
|
|
|
1530
1542
|
// From here the page is valid..
|
|
1531
1543
|
// so the new page is added to history..
|
|
1532
1544
|
if(xhr)
|
|
1533
|
-
history.pushState({uuid: uuid, status:status, method: method, data:
|
|
1545
|
+
history.pushState({uuid: uuid, status:status, method: method, data: {}, href: responseURL}, '', responseURL);
|
|
1534
1546
|
|
|
1535
1547
|
var dom = new DOMParser().parseFromString(responseText, "text/html");
|
|
1536
1548
|
if(status != 200) // Blatant error received..
|
|
@@ -1610,7 +1622,9 @@
|
|
|
1610
1622
|
url: url.href,
|
|
1611
1623
|
type: type,
|
|
1612
1624
|
data: data,
|
|
1613
|
-
|
|
1625
|
+
cache: false,
|
|
1626
|
+
contentType: false,
|
|
1627
|
+
processData: false,
|
|
1614
1628
|
headers: Settings["headers"] || {},
|
|
1615
1629
|
xhr: function () { return xhr; },
|
|
1616
1630
|
success: function (html, status, request) { return handleResponse(uuid, request.status, type, data, xhr, request); },
|