mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 00:20:25 +08:00 
			
		
		
		
	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>
This commit is contained in:
		@@ -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(() => {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user