Rule34.xxx: Date Fixer (MM-DD-YY)

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Rule34.xxx: Date Fixer (MM-DD-YY)
// @version      1.2.1
// @description  Changes all dates on Rule34.xxx to a MM-DD-YY format
// @match        *://rule34.xxx/*
// @author       Lemons22
// @copyright    2016+, Lemons22
// @namespace    https://greasyfork.org/en/users/46477
// @grant        none
// ==/UserScript==

/////////////////////////////////////////////////////////////////////////
// Original script by James Wood : https://greasyfork.org/en/users/516 //
/////////////////////////////////////////////////////////////////////////

(function commentsCommentDate(){
  var el = document.getElementById('comment-list');
  if (el != null) {
    el.innerHTML = el.innerHTML.replace(/\b\d\d\d\d-\d\d-\d\d\b/g, function commentsCommentDate(b) {
      var mdy = b.split('-');
      return mdy[1] + '-' + mdy[2] + '-' + mdy[0];
  });
  }
})();

(function postStatsDate(){
  var el = document.getElementById('stats');
  el.innerHTML = el.innerHTML.replace(/\b\d\d\d\d-\d\d-\d\d\b/g, function postStatsDate(d) {
    var mdy = d.split('-');
    return mdy[1] + '-' + mdy[2] + '-' + mdy[0];
  });
})();

(function postCommentsDate(){
  for (let el of [...document.querySelectorAll('div[id^=c]')]
    .filter(el => /^c(\d+)$/.test(el.id)))
  {
    el.innerHTML = el.innerHTML.replace(/\b\d\d\d\d-\d\d-\d\d\b/g, function postCommentsDate(e) {
      var mdy = e.split('-');
      return mdy[1] + '-' + mdy[2] + '-' + mdy[0];
    });
  };
})();