网页里面简单的提醒能力

网页一个简单的提醒

目前為 2023-07-03 提交的版本,檢視 最新版本

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.gf.qytechs.cn/scripts/470018/1214575/%E7%BD%91%E9%A1%B5%E9%87%8C%E9%9D%A2%E7%AE%80%E5%8D%95%E7%9A%84%E6%8F%90%E9%86%92%E8%83%BD%E5%8A%9B.js

// ==UserScript==
// @name         网页里面简单的提醒能力
// @namespace    https://leochan.me
// @version      1.0.0
// @description  网页一个简单的提醒
// @author       Leo
// @license      GPLv2
// @match        *://*/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=leochan.me
// @grant        none
// ==/UserScript==
 
(function() {
    'use strict';
    function webPageShowMessage(msg, duration){
        duration = duration || 5000;
        let e = document.createElement('div');
        e.style.cssText = "position:fixed;top:10%;background:rgba(0,0,0,0.7);color:#fff;padding:10px 0;width:200px;left:50%;margin-left:-50px;text-align:center;border-radius:5px;z-index:9999999;";
        e.textContent = "" + msg;
        document.body.appendChild(e);
        setTimeout(function(){
            document.body.removeChild(e);
        }, duration);
    }
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址