Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
github-buttons
Advanced tools
Get started quickly with github:button configurator.
import { render } from 'github-buttons'
// export function render(options: object, callback: (el: HTMLElement) => void): void;
render(options, function (el) {
document.body.appendChild(el)
})
// export function render(anchor: HTMLAnchorElement, callback: (el: HTMLElement) => void): void;
render(anchor, function (el) {
anchor.parentNode.replaceChild(el, anchor)
})
<a>
element.options
object.href
string
'#'
Assign href
attribute (GitHub link) for button.
title
string
undefined
Assign title
attribute for button.
data-icon
string
'octicon-mark-github'
Set icon on button. A subset of Octicons is bundled.
data-color-scheme
string
undefined
Define a mapping of system color scheme to widget color scheme in css-like syntax.
This is an opt-in feature in version >=2.3.0
. It means if data-color-scheme
is undefined
, it would still behave like version <2.3.0
, where light color scheme is used under all conditions.
Once data-color-scheme
is set to a string, it will inherit the default mapping: no-preference: light; light: light; dark: dark;
.
no-preference: light;
means when system has no preference on color scheme, light color scheme will be used.light: light;
means when system prefers light color scheme, light color scheme will be used.dark: dark;
means when system prefers dark color scheme, dark color scheme will be used.User declarations would override the default. For example:
data-color-scheme=""
.data-color-scheme="no-preference: dark;"
.data-color-scheme="dark: light;"
.data-color-scheme="no-preference: dark; light: dark;"
.data-size
string
undefined
Set button size. Possible values are undefined
and 'large'
.
data-show-count
boolean
false
Show a dynamic count based on button type (detected from href
):
https://github.com/:user
(follow)https://github.com/:user/:repo
(star)https://github.com/:user/:repo/subscription
(watch)https://github.com/:user/:repo/fork
(fork)https://github.com/:user/:repo/issues
(issues)https://github.com/:user/:repo/issues/new
(issues)Tailing slash, query string, and hash in the href
won't affect type detection:
https://github.com/:user/
(follow)https://github.com/:user?tab=repositories
(follow)https://github.com/:user/:repo#readme
(star)https://github.com/:user/:repo/#readme
(star)data-text
string
undefined
Set button text. When button is generated from <a>
element and data-text
is undefined
, the button text will be anchor's textContent
.
aria-label
string
undefined
Set aira-label
for button.
See LICENSE.
FAQs
GitHub Buttons
The npm package github-buttons receives a total of 20,324 weekly downloads. As such, github-buttons popularity was classified as popular.
We found that github-buttons demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.