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

cursor-traces

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cursor-traces

Leaves permanent cursor traces on links clicked, persisting across page reloads.

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
2
Created
Source

cursor-traces

Leaves a visual trace (custom cursor icon) at the location where you click a link. The traces persist across page reloads within the session.

Preview

Preview

Usage

Add the script and initialize it in your HTML.

<script src="https://unpkg.com/cursor-traces@1.1.0/min.js"></script>

<script>
    // Simple usage
    if(window.CursorTraces) {
        CursorTraces.startCursorTraces();
    }

    // Or with options
    /*
    if(window.CursorTraces) {
        CursorTraces.startCursorTraces({
            selector: 'a, button', // Track links and buttons
            zIndex: '9999',        // Custom z-index
            useCapture: true       // Force event capture
        });
    }
    */
</script>

2. Via NPM

npm install cursor-traces
const { startCursorTraces, destroy, clearHistory } = require('cursor-traces');

// Initialize with default settings (tracks <a> tags)
startCursorTraces();

// Or initialize with custom options
startCursorTraces({
    selector: 'a, .trace-me', // CSS selector for elements to trace
    zIndex: '999999',         // Z-Index of the cursor icon
    useCapture: true          // Use capture phase (recommended)
});

API

startCursorTraces(options?)

Initialize cursor tracing.

OptionTypeDefaultDescription
selectorstring'a'CSS selector for elements to track
zIndexstring | number'2147483647'Z-index of cursor traces
useCapturebooleantrueUse capture phase for click events

destroy()

Clean up all resources. Removes event listeners, disconnects ResizeObserver, and removes all cursor traces from the DOM.

// CommonJS
const { destroy } = require('cursor-traces');
destroy();

// Browser
CursorTraces.destroy();

clearHistory()

Clear the session storage history. This removes all saved cursor positions.

// CommonJS
const { clearHistory } = require('cursor-traces');
clearHistory();

// Browser
CursorTraces.clearHistory();

License

MIT

Keywords

cursor

FAQs

Package last updated on 03 Jan 2026

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