will merge later
This commit is contained in:
parent
c099e1a75f
commit
b904177520
|
@ -29,7 +29,7 @@ function fetchFrontendInstanceList(service, frontend, redirects, options, config
|
|||
for (const network in config.networks) {
|
||||
tmp.push(...redirects[network], ...options[frontend][network].custom)
|
||||
}
|
||||
} else if (config.services[service].frontends[frontend].singleInstance) tmp = config.services[service].frontends[frontend].singleInstance
|
||||
}
|
||||
return tmp
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,6 @@ function redirect(url, type, initiator, forceRedirection) {
|
|||
let randomInstance
|
||||
let frontend
|
||||
for (const service in config.services) {
|
||||
|
||||
if (!forceRedirection && !options[service].enabled) continue
|
||||
|
||||
if (config.services[service].embeddable && type != options[service].redirectType && options[service].redirectType != "both") continue
|
||||
|
@ -95,7 +94,7 @@ function redirect(url, type, initiator, forceRedirection) {
|
|||
}
|
||||
if (instanceList.length === 0) return
|
||||
randomInstance = utils.getRandomInstance(instanceList)
|
||||
} else if (config.services[service].frontends[frontend].singleInstance) randomInstance = config.services[service].frontends[frontend].singleInstance
|
||||
}
|
||||
break
|
||||
}
|
||||
if (!frontend || !randomInstance) return
|
||||
|
|
|
@ -447,8 +447,7 @@
|
|||
},
|
||||
"osm": {
|
||||
"name": "OpenStreetMap",
|
||||
"instanceList": false,
|
||||
"singleInstance": "https://www.openstreetmap.org"
|
||||
"instanceList": true
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
|
|
|
@ -117,6 +117,7 @@ def is_authenticate(url):
|
|||
return False
|
||||
return False
|
||||
|
||||
|
||||
def fetchCache(frontend, name):
|
||||
try:
|
||||
with open('./src/instances/data.json') as file:
|
||||
|
@ -436,13 +437,19 @@ def facil():
|
|||
fetchFromFile('facil', 'FacilMap')
|
||||
|
||||
|
||||
def osm():
|
||||
fetchFromFile('osm', 'OpenStreetMap')
|
||||
|
||||
|
||||
def libreTranslate():
|
||||
fetchRegexList('libreTranslate', 'LibreTranslate', 'https://raw.githubusercontent.com/LibreTranslate/LibreTranslate/main/README.md',
|
||||
r"\[(?:[^\s\/]+\.)+[a-zA-Z0-9]+\]\((https?:\/{2}(?:[^\s\/]+\.)+[a-zA-Z0-9]+)\/?\)\|")
|
||||
|
||||
|
||||
def breezeWiki():
|
||||
fetchJsonList('breezeWiki', 'BreezeWiki', 'https://docs.breezewiki.com/files/instances.json', 'instance', False)
|
||||
fetchJsonList('breezeWiki', 'BreezeWiki',
|
||||
'https://docs.breezewiki.com/files/instances.json', 'instance', False)
|
||||
|
||||
|
||||
def privateBin():
|
||||
fetchJsonList('privateBin', 'PrivateBin',
|
||||
|
@ -499,6 +506,7 @@ neuters()
|
|||
beatbump()
|
||||
hyperpipe()
|
||||
facil()
|
||||
osm()
|
||||
simpleertube()
|
||||
breezeWiki()
|
||||
privateBin()
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"clearnet": [
|
||||
"https://www.openstreetmap.org"
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue