1- import * as fs from 'fs' ;
2- import { IPage } from '@ulixee/unblocked-specification/agent/browser/IPage' ;
31import { stringifiedTypeSerializerClass } from '@ulixee/commons/lib/TypeSerializer' ;
42import IDevtoolsSession from '@ulixee/unblocked-specification/agent/browser/IDevtoolsSession' ;
3+ import { IPage } from '@ulixee/unblocked-specification/agent/browser/IPage' ;
4+ import * as fs from 'fs' ;
55
66const pageScripts = {
77 domStorage : fs . readFileSync ( `${ __dirname } /../injected-scripts/domStorage.js` , 'utf8' ) ,
8- indexedDbRestore : fs . readFileSync ( `${ __dirname } /../injected-scripts/indexedDbRestore.js` , 'utf8' ) ,
8+ indexedDbRestore : fs
9+ . readFileSync ( `${ __dirname } /../injected-scripts/indexedDbRestore.js` , 'utf8' )
10+ . replace ( / # s o u r c e M a p p i n g U R L = .* \. j s \. m a p / g, '' ) ,
911 interactReplayer : fs . readFileSync ( `${ __dirname } /../injected-scripts/interactReplayer.js` , 'utf8' ) ,
1012 DomAssertions : fs . readFileSync ( `${ __dirname } /../injected-scripts/DomAssertions.js` , 'utf8' ) ,
1113 Fetcher : fs . readFileSync ( `${ __dirname } /../injected-scripts/Fetcher.js` , 'utf8' ) ,
@@ -30,7 +32,7 @@ window.HERO = {
3032 Fetcher,
3133 DomAssertions,
3234};
33- ` ;
35+ ` . replace ( / # s o u r c e M a p p i n g U R L = . * \. j s \. m a p / g , '' ) ;
3436
3537const injectedScript = `(function installInjectedScripts() {
3638${ heroIncludes }
@@ -40,7 +42,7 @@ ${heroIncludes}
4042})('${ pageEventsCallbackName } ');
4143
4244${ pageScripts . domStorage }
43- })();` ;
45+ })();` . replace ( / # s o u r c e M a p p i n g U R L = . * \. j s \. m a p / g , '' ) ;
4446
4547const showInteractionScript = `(function installInteractionsScript() {
4648const exports = {}; // workaround for ts adding an exports variable
@@ -56,7 +58,7 @@ if (!('getNodeById' in window)) {
5658}
5759
5860${ pageScripts . interactReplayer } ;
59- })();` ;
61+ })();` . replace ( / # s o u r c e M a p p i n g U R L = . * \. j s \. m a p / g , '' ) ;
6062
6163const installedSymbol = Symbol ( 'InjectedScripts.Installed' ) ;
6264
0 commit comments