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

electron-statusbar

v0.2.4

Published

Adds a status bar to electron!

Downloads

13

Readme

Electron Statusbar

Adds a status bar to Electron Please note: If you do not include this in your electron project in the correct way it will either not do anything or tell you that 'document' is undefined

Usage

On the page you want your statusbar on add the following code anywhere and remember to add const electron-statusbar = require("electron-statusbar") to your main javascript file and the html file you want the statusbar on.

    <div id="statusbar">
        <p id="statustext"></p>
    </div>

The scripts will automatically add the styles and make it stay at the bottom of the screen for you but if you add styles to the div's it will use yours not the default and remember to add visibility: hidden to the styles (please remember to not change the name of the div's or the script wont be able to find them) Then to change the statusbar, hide it, show it and much more you could do something like

const es = require("electron-statusbar")

es.setStatus("The application loaded", 6000, normal);
// This will show the statusbar and say "The application loaded" for 6
// seconds and the style of status will be normal

functions and commands

(presuming you used const es = require("electron-statusbar"))

  • es.setStatus([message], [timeInMilliseconds], [type: normal, error, succeeded]) - Shows the statusbar with the message for the amount of time and type of status given (you dont need to specify the time or type since the default is 6 seconds (6000 milliseconds) and a normal statusbar but you do however need to give a message or it will just show "electron-statusbar by floffah" also if you wan't to put a type but not a time it will send an error because you need to specify a number)
  • es.showStatus() - Shows the statusbar and if you have already done es.setStatus it will show that again
  • es.hideStatus() - to be used if you have just showed the statusbar
  • es.inject() - If you do not use this anywhere in your code the statusbar will not show unless you use this (reccomended to be used in the on ready event)
  • es.stop() - will stop the statusbar so none of the commands above apart from inject will work until you use es.inject() again I will add more soon if you request it but this is all i can think of for now!

Support me

follow me on Twitter, subscribe to me on YouTube and visit my website