Skip to content

Commit

Permalink
GH #232 condense files for resultbrowser
Browse files Browse the repository at this point in the history
get HarViewer working again
- inline harPreview and define requireJS entry point
- fix broken link to HarViewer by explicitly defining the public URL to
use when builing the WebApp w/ ParcelJS
  • Loading branch information
Hartmut Arlt committed Jul 7, 2022
1 parent 2a097ce commit 301f55e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resultbrowser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"scripts": {
"init": "npm install",
"bundle": "parcel build",
"bundle": "parcel build --public-url '.'",
"inline-index": "inline-source --compress true --root ./dist dist/index.html > dist/index_bundle.html",
"inline-harviewer": "inline-source --compress true --root ./dist dist/harviewer.html > dist/harviewer_bundle.html",
"build": "npm run init && npm run bundle && npm run inline-index && npm run inline-harviewer",
Expand Down
6 changes: 5 additions & 1 deletion resultbrowser/src/harviewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
<title>HTTP Archive Viewer</title>
<link rel="stylesheet" href="css/harPreview.css" type="text/css" inline>
<script src="js/jquery-2.2.4.js" inline><!-- nothing --></script>
<script src="js/require-2.3.2.js" inline><!-- nothing --></script>
</head>
<body style="margin:0">
<div id="content" version="3.0.0" data-har="data.har" data-expand="true"></div>
<script data-main="js/harPreview" src="js/require-2.3.2.js" inline><!-- nothing --></script>
<script src="js/harPreview.js" inline><!-- nothing --></script>
<script type="application/javascript">
(function(){ require(['harPreview'], function(){ /* nothing */ }); })();
</script>
</body>
</html>

0 comments on commit 301f55e

Please sign in to comment.