GitLab Local Time

Show local time in tooltips instead UTC

  1. // ==UserScript==
  2. // @name GitLab Local Time
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1.0
  5. // @description Show local time in tooltips instead UTC
  6. // @author Vyacheslav Shimarulin
  7. // @match https://gitlab.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. function gitlabTime() {
  15. const timeElementList = Array.from(document.getElementsByTagName('time'));
  16. timeElementList.forEach(function(elem) {
  17. const time = new Date(elem.getAttribute('datetime'))
  18. .toLocaleString();
  19.  
  20. elem.setAttribute('data-original-title', time)
  21. });
  22. }
  23.  
  24. setTimeout(() => {
  25. gitlabTime();
  26. }, 2000)
  27. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址