twitter toLocaltime for new UI

Rewrite twitter timestamp to localtime for new UI.

目前为 2014-10-18 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name twitter toLocaltime for new UI
  3. // @version 2.8.1
  4. // @namespace http://twitter.com/inmoutan
  5. // @auther inmoutan
  6. // @description Rewrite twitter timestamp to localtime for new UI.
  7. // @include https://twitter.com/*
  8. // @include http://twitter.com/*
  9. // @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js
  10. // ==/UserScript==
  11.  
  12.  
  13. (function() {
  14. var filter = function(elem){
  15. $(elem).find('[class*=timestamp]').each(function(){
  16. if(!$(this).find('span.localtime').length){
  17. var data = $(this).attr('title');
  18. if(data!=null){
  19. $(this).append('<span class="localtime"> - '+data+'</span>');
  20. }
  21. }
  22. });
  23. }
  24. $.event.add(window, "load", function(){
  25. filter('.js-stream-tweet');
  26. });
  27. $(document).on("DOMNodeInserted", '.js-stream-tweet', function() {
  28. filter($(this));
  29. });
  30.  
  31. })();

QingJ © 2025

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