New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

crmenu

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crmenu

A beautiful right-click menu

latest
npmnpm
Version
1.7.4
Version published
Weekly downloads
4
33.33%
Maintainers
1
Weekly downloads
 
Created
Source

crmenu

A beautiful right-click menu,

Improved and encapsulated by the example of the original author knyttneve https://codepen.io/knyttneve/pen/YzxEBew

Install

npm install crmenu

How to use

import ContextMenu from "crmenu";
import "crmenu/style.css";

const copyIcon = `<svg viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" class="css-i6dzq1"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>`;

const menuItems = [
  {
    content: () => {
      return `${copyIcon}复制`;
    },
    events: {
      click: (e) => {
        console.log(rightMenu);
        console.log(`此处被点击了`);
      },
    },
  },
];

const rightMenu = new ContextMenu({
  target: ".rigth-menu-box",
  mode: "light", // dark
  menuItems,
});

rightMenu.init();

FAQs

Package last updated on 29 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts