您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a confirmation to the "Post" button on Archive of Our Own.
// ==UserScript== // @name AO3: Add Confirmation before Posting Works // @author Quihi // @version 1.0 // @namespace https://gf.qytechs.cn/en/users/812553-quihi // @description Adds a confirmation to the "Post" button on Archive of Our Own. // @match https://archiveofourown.org/*works*/* // @match https://www.archiveofourown.org/*works*/* // ==/UserScript== // when posting a work try { document.getElementById("work-form").querySelectorAll("input[name='post_button']")[0].setAttribute("data-confirm", "Are you sure you're ready to post this?"); } catch (error) {} // when posting a chapter try { document.getElementById("chapter-form").querySelectorAll("input[name='post_without_preview_button']")[0].setAttribute("data-confirm", "Are you sure you're ready to post this?"); } catch (error) {} // when editing a draft try { document.getElementById("previewpane").querySelectorAll("input[name='post_button']")[0].setAttribute("data-confirm", "Are you sure you're ready to post this?"); } catch (error) {} // other times editing a chapter try { document.getElementsByClassName("edit_chapter")[0].querySelectorAll("input[name='post_button']")[0].setAttribute("data-confirm", "Are you sure you're ready to post this?"); } catch (error) {} // other times editing a chapter try { document.getElementsByClassName("edit_chapter")[0].querySelectorAll("input[name='update_button']")[0].setAttribute("data-confirm", "Are you sure you're ready to post this?"); } catch (error) {} // other times editing a work try { document.getElementsByClassName("edit_work")[0].querySelectorAll("input[name='update_button']")[0].setAttribute("data-confirm", "Are you sure you're ready to post this?"); } catch (error) {} // on the drafts page try { let draftspage = document.getElementsByClassName("works-drafts dashboard region")[0]; let buttons = draftspage.getElementsByClassName("actions"); for (let i = 0; i < buttons.length; i++) { buttons[i].children[3].children[0].setAttribute("data-confirm", "Are you sure you're ready to post this?"); } } catch (error) {}
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址