npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ipad-cursor-hexo

v0.0.0

Published

ipad cursor style that can be used in your hexo framework

Downloads

14

Readme

Inspiration

Inspired by CatsJuice/ipad-cursor, Add ipad cursor into your hexo(NexT theme) blog in a configurable way.

See add ipad-cursor into my hexo blog for more details :)

Principle

core: add data-cursor='block' or data-cursor='text' to the tag with document.querySelector, like :

Before:

<div></div>
<p></p>

After:

<div data-cursor="block"></div>
<p data-cursor="text"></p>

principle of ipad-cursor:

When init called, it will remove default cursor, and generate a fake cursor use div element. Then listen mousemove event, and move the fake cursor to the mouse position.

After init finished, it will call updateCursor method, scan element with data-cursor attribute, detect the cursor type, and add event listener to the element.

When mouse enter the element, apply styles.

Install

In hexo, You can only install in this way:

import init from "https://unpkg.com/ipad-cursor-hexo@latest"

Usage

Basic Usage

  • Step1: Create a directory named ipad-cursor-hexo in ${SourcePath}/themes/next/source/js

  • Step2: Create a js file named index.js in ${SourcePath}/themes/next/source/js/ipad-cursor-hexo.

  • Step3: Write configuration

  • Step4: Let document listen DOMContentLoaded events, bind init function onto it.

    document.addEventListener('DOMContentLoaded', ()=>init());

  • Step5: link the above index.js file to hexo blog.

    • Step5.1: Open ${SourcePath}/themes/next/layout/_partials/head/head.swig
    • Step5.2: Add <script src="/js/ipad-cursor-hexo/index.js" type="module"></script> into the file

Advanced Usage

After excute the five steps in basic-usage, you will see a ipad-cursor ⚪️ in your blog.

Moreover, you can custom :

  1. which tag and what kind of style you want to config.
  2. What is your cursor look like.

See Config for more detail.

Config

For the first, you can config which tag and what kind of style you want to config, for example:

If you want to config the <div id="article"></div> to the text cursor style. you can write the configuration like this:

The key is you want to use in document.querySelectorAll,

const config = {
  "div#article":{
    type:'text',
  },
}

If you want to config its cursor-style, you can add the configuration like this:

const config = {
  "div#article":{
    type:'text',
    style:'radius:50%'
  },
}

If you want to configure all of the <a> in the <div id="article"> to the block style. you can add the configuration like this:

const config = {
  "div#article":{
    type:'text',
    style:'radius:50%'
    children:{
    	"a":{
          type:"block",
    	}
    }
  },
}

If you want to configure all the a tags in the article tag

For the second, you can config what is your cursor look like.

My Usage

import init from "https://unpkg.com/ipad-cursor-hexo@latest";

import { config, cursorConfig } from "./config.js" 
const effect = () => {
    document.querySelector('img').style.userSelect = 'none'
}

document.addEventListener('DOMContentLoaded', () => init(config, cursorConfig));

Notice

In hexo, some tags are very difficult to locate with id or class, like:

<a href="/" rel="section"></a>

or

<div id="menu-container">
  <ul id="menu">
    <li></li>
    <li></li>
    <li></li>
  </ul>
</div>

For the former, you have to add id locator into the .swig file (you can use global search in vscode to find them).

For the later, you can use a special selector that we support, like "div#menu-container>ul#menu":

const config = {
  "div#menu-container>ul#menu":{
      type:'block'
  }
}

Case

zqqcee.github.io

Reference

Great thanks for @CatsJuice, and this great project ipad-cursor.

Ref: