
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
vuepress-plugin-code-copy
Advanced tools
A Vuepress plugin that adds copy code buttons to all code blocks.
A plugin for Vuepress that appends a copy button to every instance of a given selector (defaults to div[class*="language-"] pre
)
$ npm install vuepress-plugin-code-copy
# OR
$ yarn add vuepress-plugin-code-copy
The plugin can be added to .vuepress/config.js
in your Vuepress project under plugins
:
module.exports = {
plugins: [['vuepress-plugin-code-copy', true]]
}
The plugin takes a number of options, which can be passed in with the plugin config in an options object:
module.exports = {
plugins: [
["vuepress-plugin-code-copy", {
selector: String,
align: String,
color: String,
backgroundTransition: Boolean,
backgroundColor: String,
successText: String
}
]
]
}
String
div[class*="language-"] pre
This is the CSS selector to which the copy button component will be attached.
String
bottom
top
and bottom
This option describes the vertical position of the copy button component as well as the successText
String
#27b1ff
This sets the color of the copy button and can take any hex code.
Boolean
true
Enables the background transition animation of the attached code block when a user presses the copy button.
String
#0075b8
This sets the color of the background transition animation and can take any hex code.
String
Copied!
This sets the text that displays when a user presses the copy button.
Boolean
false
Copy icon is only visible when hovering over code block or is always visible.
FAQs
A Vuepress plugin that adds copy code buttons to all code blocks.
The npm package vuepress-plugin-code-copy receives a total of 2,612 weekly downloads. As such, vuepress-plugin-code-copy popularity was classified as popular.
We found that vuepress-plugin-code-copy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.