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
60e56b5e
Unverified
Commit
60e56b5e
authored
Mar 20, 2023
by
mergify[bot]
Committed by
GitHub
Mar 20, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5169 from ethereum-optimism/qbzzt/230315-auto-refresh-2
feat(docs/op-stack): @tremarkley 's autorefresh
parents
5bb850b4
a4f253e0
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 @
60e56b5e
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