Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

toolbar

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

toolbar - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

5

index.js

@@ -113,2 +113,4 @@ var keymaster = require('./lib/keymaster.js')

if (!opts) opts = {}
if (opts instanceof HTMLElement) opts = {el: opts}
this.opts = opts
this.el = opts.el || 'nav'

@@ -132,3 +134,3 @@ if (typeof this.el !== 'object') this.el = document.querySelector(this.el)

var self = this
window.addEventListener('keydown', this.onKeyDown.bind(this))
if (!this.opts.noKeydown) window.addEventListener('keydown', this.onKeyDown.bind(this))
var list = this.el.querySelectorAll('li')

@@ -142,2 +144,3 @@ list = Array.prototype.slice.call(list);

HUD.prototype.onItemClick = function(ev) {
ev.preventDefault()
var idx = this.toolbarIndexOf(ev.currentTarget)

@@ -144,0 +147,0 @@ if (idx > -1) this.switchToolbar(idx)

2

package.json

@@ -6,3 +6,3 @@ {

"repository": {"type": "git", "url": "git@github.com:maxogden/toolbar.git"},
"version": "0.0.2",
"version": "0.0.3",
"dependencies": {

@@ -9,0 +9,0 @@ "inherits": "1.0.0"

@@ -38,6 +38,6 @@ # toolbar

`
```javascript
var toolbar = require('toolbar')
toolbar('.bar-tab')
`
var bartab = toolbar('.bar-tab')
```

@@ -49,3 +49,3 @@ use [browserify](http://browserify.org/) to package toolbar for use in your client side app!

```javascript
toolbar.on('select', function(item) {
bartab.on('select', function(item) {
// item is the .tab-label innerText

@@ -52,0 +52,0 @@ })

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc