
Research
/Security News
Malicious Chrome Extension Performs Hidden Affiliate Hijacking
A Chrome extension claiming to hide Amazon ads was found secretly hijacking affiliate links, replacing creators’ tags with its own without user consent.
canvas-polygon
Advanced tools
Create polygons with the Canvas API
yarn add canvas-polygon
This module exports a single function:
function polygon (ctx, x, y, radius, sides, startAngle, counterClockwise) { }
It takes the following arguments:
ctx - a canvas context objectx - a Numbery - a Numberradius - a Numbersides - a Number greater than 2. :)startAngle - a Number in radians. Math.PI is 180 degrees. Defaults to 0counterClockwise - a Boolean. Defaults to falseconst polygon = require('.')
const yellow = require('javascript-yellow')
const canvasSize = 400
window.addEventListener('DOMContentLoaded', draw)
function draw () {
var canvas = document.createElement('canvas')
var ctx = canvas.getContext('2d')
document.body.appendChild(canvas)
canvas.width = canvasSize
canvas.height = canvasSize
ctx.fillStyle = yellow
ctx.fillRect(0, 0, canvasSize, canvasSize)
ctx.fillStyle = '#000'
polygon(ctx, canvasSize / 2, canvasSize / 2, canvasSize / 3, 6, Math.PI / 2)
}
To see this in your browser:
yarn && yarn demo
Then open localhost:9966
You should see this:

npm install
npm test
None
MIT
FAQs
Create polygons with the Canvas API
We found that canvas-polygon 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
A Chrome extension claiming to hide Amazon ads was found secretly hijacking affiliate links, replacing creators’ tags with its own without user consent.

Security News
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.

Product
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.