forgejo/web_src/js
silverwind 73e32eae5b
[gitea] Fix gitea-origin-url with default ports (#29085)
When setting `url.host` on a URL object with no port specified (like is
the case of default port), the resulting URL's port will not change.
Workaround this quirk in the URL standard by explicitely setting port
for the http and https protocols.

Extracted the logic to a function for the purpose of testing. Initially
I wanted to have the function in utils.js, but it turns out esbuild can
not treeshake the unused functions which would result in the
webcomponents chunk having all 2kB utils.js inlined, so it seemed not
worth.

Fixes: https://github.com/go-gitea/gitea/issues/29084
(cherry picked from commit b6bf8041d8e8ee845728687b1f358f1d482afff2)
2024-02-10 10:53:43 +01:00
..
components Show whether a PR is WIP inside popups (#28975) 2024-02-04 22:37:45 +00:00
features [BRANDING] Rebrand default config settings for new installs (#140) 2024-02-05 16:02:13 +01:00
markup Strip trailing newline in markdown code copy (#29019) 2024-02-01 15:01:48 -06:00
modules Polyfill SubmitEvent for PaleMoon (#28441) 2023-12-15 07:26:36 +08:00
render Use vitest globals (#27102) 2023-09-27 04:37:13 +00:00
standalone [API] Forgejo API /api/forgejo/v1 2024-02-05 14:44:32 +01:00
test Avoid duplicate JS error messages on UI (#28873) 2024-01-21 14:23:08 +00:00
utils Polyfill SubmitEvent for PaleMoon (#28441) 2023-12-15 07:26:36 +08:00
vendor Vendor jquery.are-you-sure with strict mode fixes (#26901) 2023-09-06 00:02:44 +00:00
webcomponents [gitea] Fix gitea-origin-url with default ports (#29085) 2024-02-10 10:53:43 +01:00
bootstrap.js Avoid duplicate JS error messages on UI (#28873) 2024-01-21 14:23:08 +00:00
bootstrap.test.js Avoid duplicate JS error messages on UI (#28873) 2024-01-21 14:23:08 +00:00
htmx.js Introduce htmx and use it to avoid full page load on Subscribe and Follow (#28908) 2024-01-30 15:45:54 +01:00
index.js Hide archived labels by default from the suggestions when assigning labels for an issue (#27451) 2023-10-17 16:10:45 +02:00
jquery.js Upgrade jQuery to 3.5.0, remove jQuery-Migrate, fix deprecations (#11055) 2020-04-18 18:46:29 -04:00
svg.js Show whether a PR is WIP inside popups (#28975) 2024-02-04 22:37:45 +00:00
svg.test.js Use vitest globals (#27102) 2023-09-27 04:37:13 +00:00
utils.js Replace ajax with fetch, improve image diff (#27267) 2023-10-11 12:34:21 +00:00
utils.test.js Use vitest globals (#27102) 2023-09-27 04:37:13 +00:00