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 🙏

© 2024 – Pkg Stats / Ryan Hefner

fnonsticky

v1.0.2

Published

A simple javascript package to add a simple sticky notes to website.

Downloads

9

Readme

FnonSticky

Is a simple javascript file that creates a sticky note into a website similar to the windows sticky app.

Try me DEMO

Demo

Installation :

Use node package manager :

npm i fnonsticky

Add (css and js) to HTML

<link rel="stylesheet" href="fnonsticky.min.css" />

<script src="dist/fnonsticky.js"></script>

How to use:

// Simple Call
// @param1 {string}: Required, message text.
FnonSticky.Create("Good Morning Me\nCall your mother.");
// Advanced Call
// @param1 {string}: Required, message text.
// @param2 {Object}: Optional,update default settings if you need to.
FnonSticky.Create("Good Morning Me\nCall your mother.", {
  animate: true, // set false if you want to disable entrance animation
  background: null, // change the note background
  color: null, // change text color
  hidePin: false, // hide the red pin at the left-top corner
  identifier: null, // see explaination below...
  initWidth: null, // initial width of the note
  onClose: null, // function fires on note closing
  onLoaded: null, // function fires on note loaded
  saveOnRefresh: false, //if you want to save note in case of page refresh. note will be stored in sessionStorage and will load back on page loaded.
  showTime: true, // show time part at the bottom right corner
  time: null, // if null creating time will be placed. you can write anything here but the default was for time.
  zIndex: 10, // sticky z-index
});

identifier option

First of all, you need to know that identifier will not do any changes if saveOnRefresh is set to false. the identifier is a simple string that helps identify which notes belong to a user. In case you are going to use FnonSticky on a multiuser website and you want to store notes on sessionStorage and the current user just logged out and another user just logged in back within the same session, the notes will be displayed back if the identifier is not set to differentiate the users


Change Default Settings

You can change FnonSticky default settings simply as shown:

FnonSticky.DefaultSettings.identifier="Username";
FnonSticky.DefaultSettings.background="red";
FnonSticky.DefaultSettings.color="green";
FnonSticky.DefaultSettings.hidePin=true;

// if you call create function now,  changed options will be applied unless you provided another options in the create function second parameter

Final Word

Mother is an excellent example of love, affection, and sacrifice. So show the love to your mothers before it's too late, and PLEASE PRAY FOR MY MOTHER.

I love you 𝔉𝔫𝔬𝔫


License

MIT License