直接显示StackOverflow的答题日期

directly show the post date of answers at StackOverflow.com

  1. // ==UserScript==
  2. // @name 直接显示StackOverflow的答题日期
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description directly show the post date of answers at StackOverflow.com
  6. // @author You
  7. // @match https://stackoverflow.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict'
  13. var blocks = document.querySelectorAll('.user-action-time')
  14. blocks.forEach(function(ele) {
  15. var relativetime = ele.querySelector('.relativetime')
  16. var time = new Date(relativetime.title).toLocaleDateString()
  17. relativetime.innerText = time
  18. })
  19. })()

QingJ © 2025

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