提供一些网页小工具,低代码开发专用
当前为
// ==UserScript==
// @name lcap_tools
// @namespace http://tampermonkey.net/
// @version 0.0.1
// @description 提供一些网页小工具,低代码开发专用
// @author 袁龙辉
// @match https://lcap.test.zte.com.cn/*
// @match https://lcap.dev.zte.com.cn/*
// @match https://lcap.uat.zte.com.cn/*
// @match https://lcapst.test.zte.com.cn/*
// @match https://uactest.zte.com.cn/*
// @match https://test55.ucs.zte.com.cn/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant GM_cookie
// ==/UserScript==
(function () {
'use strict';
var button = document.createElement("button");
button.innerHTML = "清空Cookie并刷新";
button.style.position = 'fixed';
button.style.bottom = '2px';
button.style.right = '12px';
button.style.zIndex = '99999';
button.style.opacity = '0.6';
function getAllCookieNames() {
return document.cookie.split(';').map(cookie => cookie.trim().split('=')[0]);
}
const cookies = getAllCookieNames();
button.addEventListener("click", function () {
cookies.forEach(item => {
GM_cookie.delete({ name: item }, function (error) {
if (error) {
console.error(error);
} else {
console.log('Cookie deleted successfully');
}
});
})
location.reload();
});
document.body.appendChild(button);
})();