Browse Source

tron: ai url, fix double /

content-update
Clement Denis 4 years ago
parent
commit
de8a095abd
  1. 2
      subjects/tron/index.html

2
subjects/tron/index.html

@ -218,7 +218,7 @@ const remoteURL = (login, sha) =>
`https://git.${location.host}/${login}/tron/raw/branch/${sha || 'master'}/ai.js`
const formatURL = url => {
if (url.startsWith('/')) return `${location.pathname}/ai/${url}`
if (url.startsWith('/')) return `${location.pathname}/ai${url}`
if (url.startsWith('https://')) return url
if (url.includes(location.hostname)) return `https://${url}`
return url.includes('@') ? remoteURL(...url.split('@')) : `${location.origin}/${url}`

Loading…
Cancel
Save