Add pjax config for gitea and adjust getUrlForRedirect function.

This commit is contained in:
Bobson Lin 2021-01-03 23:22:38 +08:00
parent 80b8b32371
commit 33d270a671
2 changed files with 3 additions and 1 deletions

View file

@ -68,7 +68,7 @@ function getUrlForRedirect(
// `path => path.includes('#') ? path.replace(/#/g, '%23') : '...'
return `https://${
window.location.host
}/${userName}/${repoName}/${type}/${branchName}/${path
}/${userName}/${repoName}/src/branch/${branchName}/${path
.split('/')
.map(encodeURIComponent)
.join('/')}`

View file

@ -8,6 +8,8 @@ const config: Config = {
'.repository-content',
// gitee
'#git-project-content',
// gitea
'.repository > .ui.container'
],
update: {
css: false,