Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
onresize committed Jun 13, 2024
1 parent 2dae009 commit 5dc1c0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions docs/.vuepress/layouts/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,9 @@ watch(
}
)
const repo = console?.repo || void 0
onMounted(() => {
loadScript(
repo === 'github'
location.href.includes('github.io')
? '/web-blogs/static/js/auto-upgrade.js'
: '/static/js/auto-upgrade.js'
)
Expand Down
6 changes: 4 additions & 2 deletions docs/.vuepress/public/static/js/auto-upgrade.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ void (function () {
s = document.createElement('script')
s.type = 'text/javascript'
s.id = 'version-polling'
s.src =
'https://web-blogs-embrance-t-59e6df9d980ba7c216f8993005a68b570df639f055.gitlab.io/static/js/version-polling.js'

s.src = location.href.includes('github.io')
? '/web-blogs/static/js/version-polling.js'
: '/static/js/version-polling.js'

t = document.getElementsByTagName('script')[0]
t.parentNode.appendChild(s, t)
Expand Down

0 comments on commit 5dc1c0d

Please sign in to comment.