ProtonMail Beta

A basic userscript to automatically switch to ProtonMail's beta subdomain by redirecting mail.protonmail.com to beta.protonmail.com.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το 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.

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

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

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.

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

// ==UserScript==
// @name         ProtonMail Beta
// @version      1.2
// @author       openpaige
// @description  A basic userscript to automatically switch to ProtonMail's beta subdomain by redirecting mail.protonmail.com to beta.protonmail.com.
// @icon         https://gitlab.com/openpaige-user-scripts/protonmail-beta/-/raw/master/media/protonmail-sign-dark.png
// @match        *://mail.protonmail.com/*
// @run-at       document-start
// @namespace https://greasyfork.org/users/668007
// ==/UserScript==

function checkURL(url){
    return !!url.match(/^(|http(s?):\/\/)(|mail.)protonmail.com(\/.*|$)/gim);
}

function newURL(url){
    return 'https://beta.protonmail.com' + url.split('protonmail.com').pop();
}

if(checkURL(window.location.href)){window.location.assign(newURL(window.location.href));}