Opti_Mobile_Et_Firefox

Patch bugs des MP sur Firefox.

当前为 2025-05-23 提交的版本,查看 最新版本

// ==UserScript==
// @name         Opti_Mobile_Et_Firefox
// @namespace    Opti_Mobile_Et_Firefox
// @version      0.33.0
// @description  Patch bugs des MP sur Firefox.
// @author       Atlantis
// @icon         https://blog.mozilla.org/design/files/2019/06/Glyph.png
// @match        *://www.jeuxvideo.com/forums/*
// @match        *://www.jeuxvideo.com/recherche/forums/*
// @match        *://www.jeuxvideo.com/messages-prives/nouveau.php*
// @match        *://www.jeuxvideo.com/messages-prives/message.php*
// @run-at       document-end
// @grant        GM_addStyle
// @license      MIT
// ==/UserScript==


//Patch_mobile_UNIQUEMENT_

var userAgent = navigator.userAgent.toLowerCase();
if (userAgent.includes('mobile')) {
/*
    //css_risibank_hide
    GM_addStyle('.risibank-cleanup button:nth-of-type(3) { display: none !important; }');
*/
}


//Bug_Firefox_MP_____
if (window.location.href.indexOf("jeuxvideo.com/messages-prives/message.php") > -1) {
    if (userAgent.includes('firefox')) {
        resetTextFields(); //vide la zone de texte quand actualisé
    }
}

// vide la zone de texte en actualisant
function resetTextFields() {
    var textField1 = document.getElementById('message');
    if (textField1) {
        textField1.value = '';
        const changeEvent = new Event('change');
        textField1.dispatchEvent(changeEvent);
    }
}

QingJ © 2025

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