Greasy Fork is available in English.

Date Display Full Timestamp for jpg4.su / jpg5.su / JPG Fish / imgbb.com / ibb.co

Replace relative time with actual date from title attribute on jpg4.su / jpg5.su / JPG Fish / imgbb.com / ibb.co

  1. // ==UserScript==
  2. // @name Date Display Full Timestamp for jpg4.su / jpg5.su / JPG Fish / imgbb.com / ibb.co
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.4
  5. // @description Replace relative time with actual date from title attribute on jpg4.su / jpg5.su / JPG Fish / imgbb.com / ibb.co
  6. // @match https://jpg4.su/*
  7. // @match https://jpg5.su/*
  8. // @match https://imgbb.com/*
  9. // @match https://ibb.co/*
  10. // @grant none
  11. // @author Aligator
  12. // @license GNU GPLv3
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. 'use strict';
  17.  
  18. function updateDateDisplay() {
  19. const elements = document.querySelectorAll('.description-meta');
  20. elements.forEach(element => {
  21. const span = element.querySelector('span[title]');
  22. if (span && span.title) {
  23. span.textContent = span.title;
  24. }
  25. });
  26. }
  27.  
  28. // Run the function when the DOM is fully loaded
  29. if (document.readyState === 'loading') {
  30. document.addEventListener('DOMContentLoaded', updateDateDisplay);
  31. } else {
  32. updateDateDisplay();
  33. }
  34.  
  35. // Run the function periodically in case of dynamic content loading
  36. setInterval(updateDateDisplay, 5000);
  37. })();