您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
给WordPress网站站长提供文章自动容灾备份的小脚本
// ==UserScript== // @name WordPress编辑器文章备份 // @namespace https://gitcafe.net // @version 0.3.2 // @description 给WordPress网站站长提供文章自动容灾备份的小脚本 // @author 云落 // @include */wp-admin/post* // @require https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery/1.9.1/jquery.min.js // @grant none // @charset UTF-8 // @run-at document-end // ==/UserScript== (function () { 'use strict'; const GetId = name => { const searchParams = new URLSearchParams(window.location.search); return searchParams.get(name); }; const postid = GetId('post'); const TOKEN_KEY = postid ? postid : 'newpost'; const setPostCa = function () { window.localStorage.setItem(TOKEN_KEY, $("#content").val()); }; const delPostCa = function () { window.localStorage.removeItem(TOKEN_KEY); }; const restoreFromLocalStorage = function () { let c = window.localStorage.getItem(TOKEN_KEY); $("#content").val(c); delPostCa(); }; $(document).ready(function () { $("#content").on("input focus", setPostCa); $('#save-post, #delete-action, #publish').on("click", delPostCa); $('<a>', { href: 'javascript:void(0);', id: 'get_localstorage', class: 'button button-primary' }).html('↺ 一键恢复').appendTo("#wp-content-media-buttons"); jQuery(document).on("click", "#get_localstorage", restoreFromLocalStorage); }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址