Skip to content

Commit

Permalink
fix(artl): 适配firebase的引用页面
Browse files Browse the repository at this point in the history
  • Loading branch information
ipcjs committed Nov 3, 2023
1 parent 923837d commit 403da95
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/android_redirect_to_lang.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ console.log(`option: ${JSON.stringify(option)}`)
main()

function main() {
// https://developer.android.com/reference/ 里面的页面不支持多语言
const isReferencePage = (location.host === URL_ANDROID || location.host === URL_ANDROID_CN) && location.pathname.startsWith('/reference')
// 引用页面不支持切换多语言, 例如:
// https://developer.android.com/reference/
// https://firebase.google.com/docs/reference/
const isReferencePage = location.pathname.startsWith('/reference') || location.pathname.startsWith('/docs/reference')
if (isReferencePage) {
GM_registerMenuCommand('(切换语言在当前页面无效)', () => { })
}
Expand Down

0 comments on commit 403da95

Please sign in to comment.