R34 Date Fixer (DD-MM-YY)

Changes all dates on Rule34.xxx to a DD-MM-YY format

  1. // ==UserScript==
  2. // @name R34 Date Fixer (DD-MM-YY)
  3. // @version 1.0
  4. // @description Changes all dates on Rule34.xxx to a DD-MM-YY format
  5. // @match *://rule34.xxx/*
  6. // @author Lemons22
  7. // @copyright 2016+, Lemons22
  8. // @namespace https://greasyfork.org/en/users/46477
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. /////////////////////////////////////////////////////////////////////////
  13. // Original script by James Wood : https://greasyfork.org/en/users/516 //
  14. /////////////////////////////////////////////////////////////////////////
  15.  
  16. (function commentsPostDate(){
  17. var el = document.getElementById('comment-list');
  18. if (el != null) {
  19. el.innerHTML = el.innerHTML.replace(/\b([A-Z])\w{2}\s\d{1,2},\s\d\d\d\d/g, function commentsPostDate(a) {
  20. var mdy = a.split(' ');
  21. var day = mdy[1].replace(',','');
  22. return day + ' ' + mdy[0] + ' ' + mdy[2];
  23. });
  24. }
  25. })();
  26.  
  27. (function commentsCommentDate(){
  28. var el = document.getElementById('comment-list');
  29. if (el != null) {
  30. el.innerHTML = el.innerHTML.replace(/\b\d\d\d\d-\d\d-\d\d\b/g, function commentsCommentDate(b) {
  31. var mdy = b.split('-');
  32. return mdy[2] + '-' + mdy[1] + '-' + mdy[0];
  33. });
  34. }
  35. })();
  36.  
  37. (function forumDate(){
  38. var el = document.getElementById('forum');
  39. if (el != null) {
  40. el.innerHTML = el.innerHTML.replace(/\b\d\d\/\d\d\/\d\d\b/g, function forumDate(c) {
  41. var mdy = c.split('/');
  42. return mdy[1] + '/' + mdy[0] + '/' + mdy[2];
  43. });
  44. }
  45. })();
  46.  
  47. (function postStatsDate(){
  48. var el = document.getElementById('stats');
  49. el.innerHTML = el.innerHTML.replace(/\b\d\d\d\d-\d\d-\d\d\b/g, function postStatsDate(d) {
  50. var mdy = d.split('-');
  51. return mdy[2] + '-' + mdy[1] + '-' + mdy[0];
  52. });
  53. })();
  54.  
  55.  
  56.  
  57. (function postCommentsDate(){
  58. var el = document.getElementsByTagName("b");
  59. for(var i in el){
  60. el[i].innerHTML = el[i].innerHTML.replace(/\b\d\d\d\d-\d\d-\d\d\b/g, function postCommentsDate(e) {
  61. var mdy = e.split('-');
  62. return mdy[2] + '-' + mdy[1] + '-' + mdy[0];
  63. });
  64. }
  65. })();