Reset Default Translation

Resets the language to auto because Google is always setting it to different unused languages

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

Advertisement:

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

Advertisement:

// ==UserScript==
// @name         Reset Default Translation
// @namespace    https://greasyfork.org/users/21515
// @version      0.1.0
// @description  Resets the language to auto because Google is always setting it to different unused languages
// @author       CennoxX
// @homepage     https://github.com/CennoxX/userscripts
// @supportURL   https://github.com/CennoxX/userscripts/issues/new?title=[Reset%20Default%20Translation]%20
// @include      https://translate.google.tld/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=translate.google.de
// @grant        none
// @license      MIT
// ==/UserScript==
/* jshint esversion: 10 */
/* eslint quotes: ["warn", "double", "avoid-escape"]*/
/* eslint curly: "off" */

(function() {
    "use strict";
    var i = setInterval(()=>{
        var buttonSelection = "c-wiz c-wiz c-wiz button";
        var firstButton = document.querySelector(buttonSelection);
        var firstSelectedButton = document.querySelector(buttonSelection + "[aria-selected=true]");
        var firstUnselectedButton = document.querySelector(buttonSelection + "[aria-selected=false]");
        if (firstButton == firstUnselectedButton)
            firstUnselectedButton.click();
        if (firstButton == firstSelectedButton)
            clearInterval(i);
    },50);
})();