Convert Email Address to Duckduckgo Anonymous email format

Converts an email to duckgo anonymous email format, now with minimize functionality

Version au 16/03/2025. Voir la dernière version.

Vous devrez installer une extension telle que Tampermonkey, Greasemonkey ou Violentmonkey pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey ou Violentmonkey pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey ou Userscripts pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey pour installer ce script.

Vous devrez installer une extension de gestionnaire de script utilisateur pour installer ce script.

(J'ai déjà un gestionnaire de scripts utilisateur, laissez-moi l'installer !)

Vous devrez installer une extension telle que Stylus pour installer ce style.

Vous devrez installer une extension telle que Stylus pour installer ce style.

Vous devrez installer une extension telle que Stylus pour installer ce style.

Vous devrez installer une extension du gestionnaire de style pour utilisateur pour installer ce style.

Vous devrez installer une extension du gestionnaire de style pour utilisateur pour installer ce style.

Vous devrez installer une extension du gestionnaire de style pour utilisateur pour installer ce style.

(J'ai déjà un gestionnaire de style utilisateur, laissez-moi l'installer!)

// ==UserScript==
// @name         Convert Email Address to Duckduckgo Anonymous email format
// @namespace    http://tampermonkey.net/
// @author       aspen138
// @version      1.1.3
// @description  Converts an email to duckgo anonymous email format, now with minimize functionality
// @match https://126.com/*
// @match https://abv.bg/*
// @match https://adelphia.net/*
// @match https://aim.com/*
// @match https://alice.it/*
// @match https://aol.com/*
// @match https://att.net/*
// @match https://bellsouth.net/*
// @match https://bigpond.com/*
// @match https://bluewin.ch/*
// @match https://blueyonder.co.uk/*
// @match https://bol.com.br/*
// @match https://btinternet.com/*
// @match https://charter.net/*
// @match https://comcast.net/*
// @match https://cox.net/*
// @match https://cs.com/*
// @match https://earthlink.net/*
// @match https://email.mail.com/*
// @match https://embarqmail.com/*
// @match https://excite.com/*
// @match https://exmail.qq.com/*
// @match https://work.weixin.qq.com/mail/
// @match https://fastmail.com/*
// @match https://free.fr/*
// @match https://frontiernet.net/*
// @match https://ge.com/*
// @match https://gmail.com/*
// @match https://gmx.com/*
// @match https://hetnet.nl/*
// @match https://home.nl/*
// @match https://hp.com/*
// @match https://icloud.com/mail/*
// @match https://ig.com.br/*
// @match https://insightbb.co/*
// @match https://juno.com/*
// @match https://laposte.net/*
// @match https://libero.it/*
// @match https://mac.com/*
// @match https://mail.126.com/*
// @match https://mail.163.com/*
// @match https://mail.apple.com/*
// @match https://mail.aol.com/*
// @match https://mail.fastmail.com/*
// @match https://mail.gmx.com/*
// @match https://mail.google.com/*
// @match https://mail.proton.me/*
// @match https://mail.qq.com/*
// @match https://mail.ru/*
// @match https://mail.sina.com/*
// @match https://mail.sina.com.cn/*
// @match https://mail.yahoo.com/*
// @match https://mail.yandex.com/*
// @match https://mail.zoho.com/*
// @match https://mchsi.com/*
// @match https://me.com/*
// @match https://mindspring.com/*
// @match https://msn.com/*
// @match https://netscape.net/*
// @match https://netzero.com/*
// @match https://netzero.net/*
// @match https://ntlworld.com/*
// @match https://optonline.net/*
// @match https://optusnet.com.au/*
// @match https://orange.fr/*
// @match https://outlook.com/*
// @match https://outlook.live.com/*
// @match https://pacbell.net/*
// @match https://peoplepc.com/*
// @match https://planet.nl/*
// @match https://prodigy.net/*
// @match https://proton.me/*
// @match https://rediffmail.com/*
// @match https://roadrunner.com/*
// @match https://rogers.com/*
// @match https://sbcglobal.net/*
// @match https://shaw.ca/*
// @match https://sky.com/*
// @match https://skynet.be/*
// @match https://sympatico.ca/*
// @match https://t-online.de/*
// @match https://talktalk.net/*
// @match https://telenet.be/*
// @match https://telus.net/*
// @match https://terra.com.br/*
// @match https://tiscali.co.uk/*
// @match https://tiscali.it/*
// @match https://trainingelite.com/*
// @match https://uol.com.br/*
// @match https://us.army.mil/*
// @match https://verizon.net/*
// @match https://videotron.ca/*
// @match https://virgilio.it/*
// @match https://wanadoo.fr/*
// @match https://web.de/*
// @match https://webtv.net/*
// @match https://windstream.net/*
// @match https://wp.pl/*
// @match https://www.mail.com/*
// @match https://xtra.co.nz/*
// @match https://yahoo.ca/*
// @match https://yahoo.co.id/*
// @match https://yahoo.co.in/*
// @match https://yahoo.co.uk/*
// @match https://yahoo.com/*
// @match https://yahoo.com.ar/*
// @match https://yahoo.com.au/*
// @match https://yahoo.com.br/*
// @match https://yahoo.com.cn/*
// @match https://yahoo.com.mx/*
// @match https://yahoo.com.sg/*
// @match https://yahoo.com/mail/*
// @match https://yahoo.de/*
// @match https://yahoo.es/*
// @match https://yahoo.fr/*
// @match https://yahoo.in/*
// @match https://yahoo.it/*
// @match https://ymail.com/*
// @match https://yandex.com/mail/*
// @match https://yandex.ru/*
// @match https://zoho.com/mail/*
// @icon         data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMTI4IDEyOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBmaWxsPSIjZGU1ODMzIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02NCAxMjhjMzUuMzQ2IDAgNjQtMjguNjU0IDY0LTY0IDAtMzUuMzQ2LTI4LjY1NC02NC02NC02NFMwIDI4LjY1NCAwIDY0YzAgMzUuMzQ2IDI4LjY1NCA2NCA2NCA2NHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPgogIDxwYXRoIGZpbGw9IiNkZGQiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTczIDExMS43NWMwLS41LjEyMy0uNjE0LTEuNDY3LTMuNzgyLTQuMjI0LTguNDU5LTguNDY5LTIwLjM4NC02LjUzOC0yOC4wNzUuMzUyLTEuMzk3LTMuOTc5LTUxLjc0NC03LjA0LTUzLjM2NS0zLjQwMy0xLjgxMy03LjU5LTQuNjktMTEuNDE5LTUuMzMtMS45NDMtLjMxLTQuNDktLjE2NC02LjQ4Mi4xMDUtLjM1NC4wNDctLjM2OC42ODQtLjAzLjc5OCAxLjMwNy40NDMgMi44OTUgMS4yMTIgMy44MyAyLjM3NS4xNzguMjItLjA2LjU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kzLTEuMzM4YTEuMDUgMS4wNSAwIDAgMC0yLjA5NyAwIDEuMDQ3IDEuMDQ3IDAgMCAwIDIuMDk3IDB6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz4KICA8L2c+CiAgPHBhdGggZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNjQgMTE3Ljc1YzI5LjY4NSAwIDUzLjc1LTI0LjA2NSA1My43NS01My43NVM5My42ODUgMTAuMjUgNjQgMTAuMjUgMTAuMjUgMzQuMzE1IDEwLjI1IDY0IDM0LjMxNSAxMTcuNzUgNjQgMTE3Ljc1em0wIDVjMzIuNDQ3IDAgNTguNzUtMjYuMzAzIDU4Ljc1LTU4Ljc1Uzk2LjQ0NyA1LjI1IDY0IDUuMjUgNS4yNSAzMS41NTMgNS4yNSA2NCAzMS41NTMgMTIyLjc1IDY0IDEyMi43NXoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPgo8L3N2Zz4K
// @iconbackup   https://ssl.gstatic.com/ui/v1/icons/mail/rfr/gmail.ico
// @license      MIT
// @grant        GM_getValue
// @grant        GM_setValue
// ==/UserScript==


(function() {
    'use strict';
    // Create a container for the floating box
    const container = document.createElement('div');
    container.id = 'emailConverter_container';
    container.style.position = 'fixed';
    container.style.bottom = '20px';
    container.style.left = '20px';
    container.style.zIndex = '9999';
    container.style.padding = '10px';
    container.style.backgroundColor = '#fff';
    container.style.border = '1px solid #ccc';
    container.style.borderRadius = '5px';
    container.style.boxShadow = '0 0 5px rgba(0,0,0,0.3)';
    container.style.fontFamily = 'Arial, sans-serif';
    container.style.maxWidth = '280px';

    // Title or heading
    const heading = document.createElement('h4');
    heading.id = 'emailConverter_heading';
    heading.textContent = 'Email Converter';
    heading.style.margin = '0 0 10px 0';
    container.appendChild(heading);

    // Close (minimize) button
    const minimizeButton = document.createElement('button');
    minimizeButton.id = 'emailConverter_minimizeBtn';
    minimizeButton.textContent = 'X';
    minimizeButton.style.position = 'absolute';
    minimizeButton.style.top = '5px';
    minimizeButton.style.right = '10px';
    minimizeButton.style.cursor = 'pointer';
    minimizeButton.style.border = 'none';
    minimizeButton.style.background = 'none';
    minimizeButton.style.fontSize = '16px';
    container.appendChild(minimizeButton);

    // This button will appear when the container is minimized
    const restoreButton = document.createElement('button');
    restoreButton.id = 'emailConverter_restoreBtn';
    restoreButton.textContent = 'Email Converter';
    restoreButton.style.position = 'fixed';
    restoreButton.style.left = '0';
    restoreButton.style.bottom = '20px';
    restoreButton.style.zIndex = '9999';
    restoreButton.style.padding = '6px 12px';
    restoreButton.style.cursor = 'pointer';
    restoreButton.style.border = '1px solid #ccc';
    restoreButton.style.borderRadius = '5px';
    restoreButton.style.fontFamily = 'Arial, sans-serif';
    restoreButton.style.backgroundColor = '#fff';
    restoreButton.style.boxShadow = '0 0 5px rgba(0,0,0,0.3)';
    container.style.display = 'none';
    restoreButton.style.display = 'block';
    document.body.appendChild(restoreButton);

    // Event listeners for minimize/restore
    minimizeButton.addEventListener('click', () => {
        container.style.display = 'none';
        restoreButton.style.display = 'block';
    });

    restoreButton.addEventListener('click', () => {
        container.style.display = 'block';
        restoreButton.style.display = 'none';
    });

    // Wrapper to neatly organize form elements
    const formWrapper = document.createElement('div');
    formWrapper.id = 'emailConverter_formWrapper';
    formWrapper.style.display = 'flex';
    formWrapper.style.flexDirection = 'column';
    formWrapper.style.gap = '5px';

    // Retrieve stored values (if any)
    const storedSendTo = GM_getValue('converterSendTo', '');
    const storedDdgo = GM_getValue('converterDdgo', '');

    // Label and input for "send email to who?"
    const labelSendTo = document.createElement('label');
    labelSendTo.id = 'emailConverter_labelSendTo';
    labelSendTo.textContent = 'Send email to who: ';
    labelSendTo.style.marginRight = '10px';

    const inputSendTo = document.createElement('input');
    inputSendTo.id = 'emailConverter_inputSendTo';
    inputSendTo.type = 'text';
    inputSendTo.placeholder = 'e.g. [email protected]';
    inputSendTo.style.width = '250px';
    inputSendTo.value = storedSendTo;

    const rowSendTo = document.createElement('div');
    rowSendTo.id = 'emailConverter_rowSendTo';
    rowSendTo.appendChild(labelSendTo);
    rowSendTo.appendChild(inputSendTo);

    // Label and input for "your ddgo mail?"
    const labelDdgo = document.createElement('label');
    labelDdgo.id = 'emailConverter_labelDdgo';
    labelDdgo.textContent = 'Your DuckduckGo address: ';
    labelDdgo.style.marginRight = '10px';

    const inputDdgo = document.createElement('input');
    inputDdgo.id = 'emailConverter_inputDdgo';
    inputDdgo.type = 'text';
    inputDdgo.placeholder = 'e.g. [email protected]';
    inputDdgo.style.width = '250px';
    inputDdgo.value = storedDdgo;

    const rowDdgo = document.createElement('div');
    rowDdgo.id = 'emailConverter_rowDdgo';
    rowDdgo.appendChild(labelDdgo);
    rowDdgo.appendChild(inputDdgo);

    // Convert button
    const buttonConvert = document.createElement('button');
    buttonConvert.id = 'emailConverter_convertBtn';
    buttonConvert.textContent = 'Convert';
    buttonConvert.style.marginRight = '10px';
    buttonConvert.style.cursor = 'pointer';
    buttonConvert.style.width = '258px';

    // Output field for converted email
    const labelOutput = document.createElement('label');
    labelOutput.id = 'emailConverter_labelOutput';
    labelOutput.textContent = 'Converted: ';
    labelOutput.style.marginRight = '10px';

    const outputEmail = document.createElement('input');
    outputEmail.id = 'emailConverter_outputEmail';
    outputEmail.type = 'text';
    outputEmail.readOnly = true;
    outputEmail.style.width = '250px';

    const rowOutput = document.createElement('div');
    rowOutput.id = 'emailConverter_rowOutput';
    rowOutput.appendChild(labelOutput);
    rowOutput.appendChild(outputEmail);

    // Feedback or error message area
    const feedback = document.createElement('p');
    feedback.id = 'emailConverter_feedback';
    feedback.style.color = 'red';
    feedback.style.fontSize = '14px';
    feedback.style.margin = '5px 0 0 0';
    feedback.style.minHeight = '18px';
    feedback.textContent = '';

    // Conversion function
    buttonConvert.addEventListener('click', () => {
        const originalEmail = inputSendTo.value.trim();
        const ddgoEmail = inputDdgo.value.trim();
        let errorMessage = '';

        if (!originalEmail) {
            errorMessage = 'Please enter an email address to convert.';
        } else if (!ddgoEmail) {
            errorMessage = 'Please enter your DDG address.';
        }

        if (errorMessage) {
            feedback.textContent = errorMessage;
            outputEmail.value = '';
            return;
        }

        const converted = originalEmail.replace(/@/g, '_at_') + '_' + ddgoEmail;
        outputEmail.value = converted;
        feedback.textContent = '';

        GM_setValue('converterSendTo', originalEmail);
        GM_setValue('converterDdgo', ddgoEmail);
    });

    // Assemble elements in the container
    formWrapper.appendChild(rowSendTo);
    formWrapper.appendChild(rowDdgo);
    formWrapper.appendChild(buttonConvert);
    formWrapper.appendChild(rowOutput);
    formWrapper.appendChild(feedback);

    container.appendChild(formWrapper);
    document.body.appendChild(container);
})();