mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 16:14:48 +01:00
- fixed edge case in jsonP rewriting where no callback name is supplied only ? but body has normal jsonP callback (url = https://geolocation.onetrust.com/cookieconsentpub/v1/geo/countries/EU?callback=?) - made the `!self.__WB_pmw` server side inject match the client side one done via wombat - added regex's for eval override to JSWombatProxyRules wombat: - added eval override in order to ensure AD network JS does not lockup the browser (cnn.com) - added returning a proxied value for window.parent from the window proxy object in order to ensure AD network JS does not lock up browser (cnn.com, boston.com, et. al.) - ensured that the read only storageArea property of 'StorageEvents' fired by the custom storage class is present (spec) - ensured that userland cannot create new instances of Storage and that localStorage instanceof Storage works with our override (spec) - ensured that assignments to SomeElement.[innerHTML|outerHTML], iframe.srcdoc, or style.textContent are more correctly handled in particular doing script.[innerHTML|outerHTML] = <JS> - ensured that the test used in the isArgumentsObj function does not throw errors IFF the pages JS has made it so when toString is called (linkedin.com) - ensured that Web Worker construction when using the optional options object, the options get supplied to the create worker (spec) - ensured that the expected TypeError exception thrown from DomConstructors of overridden interfaces are thrown when their pre-conditions are not met (spec) - ensured that wombat worker rewriting skipes data urls which should not be rewritten - ensured the bound function returned by the window function is the same on subsequent retrievals fixes #474 tests: - added direct testing of wombat's parts
197 lines
6.3 KiB
HTML
197 lines
6.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<title>Test Page</title>
|
|
<link rel="stylesheet" href="./bootstrap.min.css" />
|
|
<style>
|
|
#wombatSandbox {
|
|
width: 0;
|
|
height: 0;
|
|
margin: 0;
|
|
padding: 0;
|
|
border: 0;
|
|
overflow: hidden;
|
|
}
|
|
.bottomBoarder {
|
|
border-bottom: 1px solid rgba(0, 0, 0, 0.125);
|
|
}
|
|
</style>
|
|
<script src="./testPageBundle.js"></script>
|
|
</head>
|
|
<body>
|
|
<div class="container mt-2">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<h5 class="text-center">Messages sent by wombat</h5>
|
|
</div>
|
|
</div>
|
|
<div class="row mt-4 align-items-center bottomBoarder pb-1">
|
|
<div class="col-2 align-self-center">
|
|
<h5 class="mb-0 text-center">Load:</h5>
|
|
</div>
|
|
<div class="col-10 h-100">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<p class="mb-0 lead" id="load-url"><b>url:</b></p>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<p class="mb-0 lead" id="load-title"><b>title:</b></p>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<p class="mb-0 lead" id="load-readyState"><b>readyState:</b></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mt-1 align-items-center bottomBoarder pb-1">
|
|
<div class="col-2 align-self-center">
|
|
<h5 class="mb-0 text-center">Replace URL:</h5>
|
|
</div>
|
|
<div class="col-10 h-100">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<p class="mb-0 lead" id="replace-url-url"><b>url:</b></p>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<p class="mb-0 lead" id="replace-url-title"><b>title:</b></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mt-1 align-items-center bottomBoarder pb-1">
|
|
<div class="col-2 align-self-center">
|
|
<h5 class="mb-0 text-center">Cookie:</h5>
|
|
</div>
|
|
<div class="col-10 h-100">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<p class="mb-0 lead" id="cookie-domain"><b>domain:</b></p>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<p class="mb-0 lead" id="cookie-cookie"><b>cookie:</b></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mt-1 align-items-center bottomBoarder pb-1">
|
|
<div class="col-2 align-self-center">
|
|
<h5 class="mb-0 text-center">Title</h5>
|
|
</div>
|
|
<div class="col-10 h-100">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<p class="mb-0 lead" id="title-title"><b>title:</b></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mt-1 align-items-center bottomBoarder pb-1">
|
|
<div class="col-2 align-self-center">
|
|
<h5 class="mb-0 text-center">Hash Change</h5>
|
|
</div>
|
|
<div class="col-10 h-100">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<p class="mb-0 lead" id="hash-hash"><b>hash:</b></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mt-1 align-items-center bottomBoarder pb-1">
|
|
<div class="col-2 align-self-center">
|
|
<h5 class="mb-0 text-center">Unknown</h5>
|
|
</div>
|
|
<div class="col-10 h-100">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<p class="mb-0 lead" id="unknown-msg"></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<iframe
|
|
id="wombatSandbox"
|
|
src="/live/20180803160549mp_/https://tests.wombat.io/"
|
|
></iframe>
|
|
<script>
|
|
const defaultText = ' not sent';
|
|
const domStructure = {
|
|
load: {
|
|
url: document.createTextNode(defaultText),
|
|
title: document.createTextNode(defaultText),
|
|
readyState: document.createTextNode(defaultText),
|
|
reset() {
|
|
this.url.data = defaultText;
|
|
this.title.data = defaultText;
|
|
this.readyState.data = defaultText;
|
|
}
|
|
},
|
|
replaceURL: {
|
|
url: document.createTextNode(defaultText),
|
|
title: document.createTextNode(defaultText),
|
|
reset() {
|
|
this.url.data = defaultText;
|
|
this.title.data = defaultText;
|
|
}
|
|
},
|
|
cookie: {
|
|
domain: document.createTextNode(defaultText),
|
|
cookie: document.createTextNode(defaultText),
|
|
reset() {
|
|
this.cookie.data = defaultText;
|
|
this.domain.data = defaultText;
|
|
}
|
|
},
|
|
titleMsg: document.createTextNode(defaultText),
|
|
hashchange: document.createTextNode(defaultText),
|
|
unknown: document.createTextNode(defaultText),
|
|
reset() {
|
|
this.load.reset();
|
|
this.replaceURL.reset();
|
|
this.cookie.reset();
|
|
this.titleMsg.data = defaultText;
|
|
this.hashchange.data = defaultText;
|
|
this.unknown.data = defaultText;
|
|
}
|
|
};
|
|
document.getElementById('load-url').appendChild(domStructure.load.url);
|
|
document
|
|
.getElementById('load-title')
|
|
.appendChild(domStructure.load.title);
|
|
document
|
|
.getElementById('load-readyState')
|
|
.appendChild(domStructure.load.readyState);
|
|
document
|
|
.getElementById('replace-url-url')
|
|
.appendChild(domStructure.replaceURL.url);
|
|
document
|
|
.getElementById('replace-url-title')
|
|
.appendChild(domStructure.replaceURL.title);
|
|
document
|
|
.getElementById('cookie-cookie')
|
|
.appendChild(domStructure.cookie.cookie);
|
|
document
|
|
.getElementById('cookie-domain')
|
|
.appendChild(domStructure.cookie.domain);
|
|
document.getElementById('title-title').appendChild(domStructure.titleMsg);
|
|
document.getElementById('hash-hash').appendChild(domStructure.hashchange);
|
|
document.getElementById('unknown-msg').appendChild(domStructure.unknown);
|
|
window.overwatch = new TestOverwatch({
|
|
domStructure,
|
|
sandbox: document.getElementById('wombatSandbox'),
|
|
direct: false
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|