Skip to content

Instantly share code, notes, and snippets.

View yiningv's full-sized avatar
🌱

山不说 yiningv

🌱
View GitHub Profile
@JimLiu
JimLiu / block-by-comment-likes.js
Last active June 24, 2024 09:16
微博一键拉黑点赞
// 使用方法:
// 1. Chrome打开weibo.com
// 2. 打开Chrome Dev Tool(使用 Ctrl/Cmd + Shift + I)
// 3. 在Console中复制粘贴以下代码,修改评论id为你要一键拉黑的评论ID
// 4. 回车运行
// 获取评论id方法:
// 1. 在评论下点击投诉,在新窗口中可以得到评论id,例如 https://service.account.weibo.com/reportspam?rid=XXXXXXXXXX
const cId = 123456 // 修改为真实评论ID
@sindresorhus
sindresorhus / esm-package.md
Last active June 29, 2024 11:18
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.