Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
664d9799
Commit
664d9799
authored
Mar 15, 2023
by
Ori Pomerantz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(docs/op-stack): @tremarkley 's autorefresh
parent
025de3de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
enhanceApp.js
docs/op-stack/src/.vuepress/enhanceApp.js
+14
-0
No files found.
docs/op-stack/src/.vuepress/enhanceApp.js
View file @
664d9799
import
event
from
'
@vuepress/plugin-pwa/lib/event
'
export
default
({
router
})
=>
{
registerAutoReload
();
router
.
addRoutes
([
{
path
:
'
/docs/
'
,
redirect
:
'
/
'
},
])
}
// When new content is detected by the app, this will automatically
// refresh the page, so that users do not need to manually click
// the refresh button. For more details see:
// https://linear.app/optimism/issue/FE-1003/investigate-archive-issue-on-docs
const
registerAutoReload
=
()
=>
{
event
.
$on
(
'
sw-updated
'
,
e
=>
e
.
skipWaiting
().
then
(()
=>
{
location
.
reload
(
true
);
}))
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment