npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cy-plugin-ban

v2.0.1

Published

禁止浏览器操作

Readme

🚫 ban - 前端禁止系统行为 & 调试检测工具

一个轻量级的前端工具库,用于禁止常见的系统行为(右键、复制、粘贴、缩放等),并支持控制台调试检测(打开控制台后执行回调、重定向或替换页面内容)。

✨ 特性

  • 禁止右键菜单
  • 禁止文本选中
  • 禁止复制
  • 禁止粘贴
  • 禁止图片拖拽
  • 禁止快捷键打开 DevTools
  • 禁用双指缩放、双击放大(移动端)
  • 禁止键盘打开调试面板
  • 配置控制台回调函数,在控制台打开时执行
  • 支持控制台调试检测:
  • 控制台打开后执行回调函数

🚀 使用示例

import ban from 'cy-plugin-ban';

// 基础用法
  ban({
    disableContextMenu: true, // 禁止右键菜单
    disableSelection: true, // 禁止选中
    disableCopy: true, // 禁止复制
    disablePaste: true, // 禁止粘贴
    disableDragImage: true, // 禁止图片拖拽
    disableDoubleFingerScale: true, // 禁止双指缩放
    disableDoubleTouchAmplify: true, // 禁止双击放大
    disableOpenDevTool: true, // 禁止键盘打开调试面板
    callback: () => {
      console.log('callback 回调!!!!!!!!');
    }
    //控制台打开后重定向到目标页面  (优先级高于write)
    redirect: 'https://www.ifengniao.com',

    // 控制台打开后替换页面内容
    write: '<h1>检测到调试行为,页面已被替换!</h1>'
  });