mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-25 20:32:46 +00:00
help: special url for .git mirror
Ref to 7a6bb5723a/options.js\#L57
Closes https://github.com/tuna/issues/issues/1703
This commit is contained in:
parent
60cd821146
commit
6e97a65364
|
|
@ -14,8 +14,12 @@ $(document).ready(() => {
|
|||
for (const target_selector of target_selectors) {
|
||||
const template_selector = $(target_selector).data("template");
|
||||
const select_selectors = $(target_selector).data("select").split(",");
|
||||
let url = "/" + window.mirrorId
|
||||
if (window.mirrorId.endsWith(".git")) {
|
||||
url = "/git/" + window.mirrorId
|
||||
}
|
||||
const template_data = {
|
||||
"mirror": "{{ site.hostname }}/" + window.mirrorId,
|
||||
"mirror": "{{ site.hostname }}" + url,
|
||||
};
|
||||
for (const select_selector of select_selectors) {
|
||||
const opt = $(select_selector).find('option:selected').data();
|
||||
|
|
|
|||
Loading…
Reference in New Issue