Double Confirm Publish

Double confirm when you want to directly publish an article.

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         Double Confirm Publish
// @namespace    http://tampermonkey.net/
// @version      2023-12-12
// @description  Double confirm when you want to directly publish an article.
// @author       Tony Su
// @match        https://card.weibo.com/article/v3/editor
// @icon         https://www.google.com/s2/favicons?sz=64&domain=weibo.com
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    window.addEventListener('load', () => {
     setTimeout(() => {
         var saved = null;
         var replace = document.createElement('a');
         replace.classList.add("S_txt1");
         replace.textContent = '确认发布';
         replace.addEventListener('click', (event) => {
             replace.replaceWith(saved);
         });
         var a = document.querySelectorAll(".next .W_btn_a");
         for (var i = 0; i < a.length; i++) {
             if (a[i].innerHTML.trim() == "立即发布") {
                 saved = a[i];
                 a[i].replaceWith(replace);
             }
         }}, 3000);
    }, false);
})();