Greasy Fork is available in English.

ar5iv helper

avoid translating formula on ar5iv

30.05.2023 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

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

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

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

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         ar5iv helper
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  avoid translating formula on ar5iv
// @author       superzero
// @license      MIT
// @match        https://ar5iv.labs.arxiv.org/html/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=arxiv.org
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...
    // 获取所有class为ltx_Math和ltx_equationgroup的元素
    var mathElems = document.querySelectorAll('.ltx_Math, .ltx_equationgroup, .ltx_equation, .ltx_figure, .ltx_table');

    // 遍历所有元素
    for (var i = 0; i < mathElems.length; i++) {
        // 给元素添加translate属性
        mathElems[i].setAttribute('translate', 'no');

        // 获取元素内部所有标签
        var tags = mathElems[i].getElementsByTagName('*');

        // 遍历所有标签
        for (var j = 0; j < tags.length; j++) {
            // 给标签添加translate属性
            tags[j].setAttribute('translate', 'no');
        }
    }


    // 获取所有class既是ltx_caption又是ltx_centering的元素
    var elems = document.querySelectorAll('.ltx_caption.ltx_centering');

    // 遍历所有元素
    for (var k = 0; k < elems.length; k++) {
        // 给元素添加属性,例如添加translate属性
        elems[k].setAttribute('translate', 'no');
    }
})();