Greasy Fork is available in English.

pops

纯JavaScript编写的弹窗,内置方法confirm、alert、prompt、loading、iframe、isPhone、tooltip、folder、panel、rightClickMenu。

ของเมื่อวันที่ 23-04-2023 ดู เวอร์ชันล่าสุด

สคริปต์นี้ไม่ควรถูกติดตั้งโดยตรง มันเป็นคลังสำหรับสคริปต์อื่น ๆ เพื่อบรรจุด้วยคำสั่งเมทา // @require https://update.greasyfork.org/scripts/456485/1180208/pops.js

ผู้เขียน
WhiteSevs
เวอร์ชัน
0.0.1.20230423061321
สร้างเมื่อ
12-12-2022
อัปเดตเมื่อ
23-04-2023
สัญญาอนุญาต
ไม่มี

自定义弹窗

pops.alert  /* 普通信息框 */
pops.confirm  /* 询问框 */
pops.prompt  /* 输入框 */
pops.loading  /* 加载层 */
pops.iframe  /* iframe层 */
pops.isPhone  /* 判断是否是手机访问 */
# 部分使用方法

pops.alert({
  closeEnable: false,
  mask: true,
  only: true,
});

pops.prompt({
  position: "center",
  closeEnable: true,
  mask: true,
  only: true,
  title: {
    text: "prompt",
    position: "center",
  },
  content: {
    placeholder: "提示",
    text: "自带的内容",
    row: false /* 多行 */,
    focus: true /* 输入框自动聚焦 */,
  },
  btn: {
    ok: {
      callback: (event) => {
        console.log(event);
        alert("确定");
        event.close();
      },
    },
  },
});

pops.loading({
  parent: document.body,
  only: true,
});

详情参数请看代码