메일플러그 개별발송 자동해제

메일플러그 개별발송이 체크되어 있는 것을 자동으로 해제

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @license      MIT
// @name         메일플러그 개별발송 자동해제
// @namespace    shuggie
// @version      2024-05-23
// @description  메일플러그 개별발송이 체크되어 있는 것을 자동으로 해제
// @author       장민석
// @match        https://*.mailplug.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Function to execute custom code when #page2 is in the URL
    function executeCustomScript() {
        if (window.location.hash.includes('write')) {
            (function checkElement() {
                const element = document.getElementsByName('in_div');
                if (element.length > 0) {
                    var ind=document.getElementsByName('in_div')[0];
                    ind.value='N';
                    ind.checked=false;
                } else {
                    setTimeout(checkElement, 100); // Check again after 100ms
                }
            })();
        }
    }

    // Initial check
    executeCustomScript();

    // Check hash change
    window.addEventListener('hashchange', executeCustomScript);
})();