mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +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
64 lines
1.3 KiB
JavaScript
Executable File
64 lines
1.3 KiB
JavaScript
Executable File
import * as path from 'path';
|
|
|
|
const baseTestOutput = path.join(__dirname, 'test', 'assets');
|
|
const noStrict = {
|
|
renderChunk(code) {
|
|
return code.replace("'use strict';", '');
|
|
}
|
|
};
|
|
|
|
export default [
|
|
{
|
|
input: 'src/wbWombat.js',
|
|
output: {
|
|
name: 'wombat',
|
|
file: path.join(baseTestOutput, 'wombat.js'),
|
|
sourcemap: false,
|
|
format: 'iife'
|
|
},
|
|
plugins: [noStrict]
|
|
},
|
|
{
|
|
input: 'src/wbWombatProxyMode.js',
|
|
output: {
|
|
name: 'wombat',
|
|
file: path.join(baseTestOutput, 'wombatProxyMode.js'),
|
|
sourcemap: false,
|
|
format: 'iife'
|
|
},
|
|
plugins: [noStrict]
|
|
},
|
|
{
|
|
input: 'src/wombatWorkers.js',
|
|
output: {
|
|
name: 'wombat',
|
|
file: path.join(baseTestOutput, 'wombatWorkers.js'),
|
|
format: 'es',
|
|
sourcemap: false,
|
|
exports: 'none'
|
|
},
|
|
plugins: [noStrict]
|
|
},
|
|
{
|
|
input: 'src/wbWombat.js',
|
|
output: {
|
|
name: 'wombat',
|
|
file: path.join(baseTestOutput, 'wombatDirect.js'),
|
|
sourcemap: false,
|
|
format: 'es'
|
|
},
|
|
plugins: [
|
|
noStrict,
|
|
{
|
|
renderChunk(code) {
|
|
return code.replace(
|
|
/(this\._wb_wombat\.actual\s=\strue;)/gi,
|
|
`this._wb_wombat.actual = true;
|
|
this.wombat = wombat;`
|
|
);
|
|
}
|
|
}
|
|
]
|
|
}
|
|
];
|