aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/features/common-global.js
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2022-08-12 23:03:41 +0200
committerGitHub <noreply@github.com>2022-08-12 17:03:41 -0400
commit20b3a904504d401cfc192b80440d76d787af94d9 (patch)
tree76e086bb19c9e6614aa4b872c7ec1f8073da19e3 /web_src/js/features/common-global.js
parent74515d3d17c578ee0083111951188cb159fd049b (diff)
downloadgitea-20b3a904504d401cfc192b80440d76d787af94d9.tar.gz
gitea-20b3a904504d401cfc192b80440d76d787af94d9.zip
Remove useless JS operation for relative time tooltips (#20756)
This operation that shifts the content from title to data-content is useless when we can directly render the expected HTML instead. This change does prevent these tooltips from working when the user has JS disabled in their browser, but I think we made it clear by now that JS is required for gitea to work properly. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'web_src/js/features/common-global.js')
-rw-r--r--web_src/js/features/common-global.js8
1 files changed, 0 insertions, 8 deletions
diff --git a/web_src/js/features/common-global.js b/web_src/js/features/common-global.js
index 259e409add..a3aebc0246 100644
--- a/web_src/js/features/common-global.js
+++ b/web_src/js/features/common-global.js
@@ -70,14 +70,6 @@ export function initGlobalTooltips() {
}
export function initGlobalCommon() {
- // Show exact time
- $('.time-since').each(function () {
- $(this)
- .addClass('tooltip')
- .attr('data-content', $(this).attr('title'))
- .attr('title', '');
- });
-
// Undo Safari emoji glitch fix at high enough zoom levels
if (navigator.userAgent.match('Safari')) {
$(window).resize(() => {