Skip to content

Commit

Permalink
Merge pull request #4 from digitalutsc/not_found_in_archive_issue
Browse files Browse the repository at this point in the history
add 1.8.13 replaywebpage libraries locally to fix the service worker …
  • Loading branch information
kylehuynh205 authored Nov 7, 2023
2 parents 6e66343 + 44c8f5c commit 5b327ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
19 changes: 5 additions & 14 deletions replaywebpage.libraries.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
# Custom module library for general purposes.
replaywebpage:
js:
js/replaywebpage.js: {}
css:
component:
css/replaywebpage.css: {}
dependencies:
- core/drupalSettings

# ReplayWebPage Js Library
# 1.8.0 ui.js and 1.8.13 sw.js (sw.js is in relative path replay/sw.js)
replayweb:
version: 1.5
version: 1.8
license:
name: AGPLv3
url: https://github.com/webrecorder/replayweb.page/blob/master/LICENSE
gpl-compatible: true
js:
https://cdn.jsdelivr.net/npm/[email protected]/ui.js: { preprocess: false, external: true, minified: true }


https://cdn.jsdelivr.net/npm/[email protected]/ui.js: { preprocess: false, external: true, minified: true }

2 changes: 1 addition & 1 deletion src/Controller/JsWorkerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class JsWorkerController extends ControllerBase {
*/
public function servereplay() {
$response = new Response(
'importScripts("https://cdn.jsdelivr.net/npm/replaywebpage@1.5.0/sw.js");'
'importScripts("https://cdn.jsdelivr.net/npm/replaywebpage@1.8.13/sw.js");'
);
// Alternative https://unpkg.com/[email protected]/sw.js
$response->headers->set('Content-Type', 'text/javascript');
Expand Down

0 comments on commit 5b327ea

Please sign in to comment.