jvc-nocaps

Get rid of POSTS on JVC where WORDS are UPPERCASED for some REASON.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name         jvc-nocaps
// @version      0.1
// @description  Get rid of POSTS on JVC where WORDS are UPPERCASED for some REASON.
// @author       kikakouti
// @match        http://www.jeuxvideo.com/forums/*
// @grant        none
// @namespace https://greatest.deepsurf.us/users/125911
// ==/UserScript==

(function() {
    'use strict';

    function regularReplacer(match, offset, string){
        return match.toLowerCase();
    }

    function removeUppercase(element) {

        if (element.childNodes && element.childNodes.length > 0) {
            for (var i in element.childNodes) {
                removeUppercase(element.childNodes[i]);
            }
        }

        if (element.nodeType == Node.TEXT_NODE && /\S/.test(element.nodeValue)) {
            var text = element.nodeValue;
            element.nodeValue = text.replace(/([A-ZÀÁÂÄÅÃÆÇÉÈÊËÍÌÎÏÑÓÒÔÖØÕOEÚÙÛÜÝY]{3,})/g, regularReplacer);
        }
    }

    var posts = document.getElementsByClassName("txt-msg");
    for (var i in posts) {
        removeUppercase(posts[i]);
    }

    var title = document.getElementById("bloc-title-forum");
    if (title) {
        removeUppercase(title);
    }

    var arianeCrumbs = document.getElementsByClassName("bloc-fil-ariane-crumb-forum");
    for (var j in arianeCrumbs) {
        removeUppercase(arianeCrumbs[j]);
    }

    var topicTitles = document.getElementsByClassName("topic-title");
    for (var k in topicTitles) {
        removeUppercase(topicTitles[k]);
    }

})();