Skip to content

leppert/nativ.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

nativ.js

A JS wrapper for easily providing Fluid and Prism SSB support.

Usage

is

Nativ provides a simple property for determining if you're currently being rendered in an SSB. For instance, you could use this to include a stylesheet:

if(nativ.is){ // .is contains 'fluid' or 'prism'
    $('head').append('<link rel="stylesheet" href="nativ.css" type="text/css">');
}
if(nativ.is == 'fluid'){
    $('head').append('<link rel="stylesheet" href="fluid.css" type="text/css">');
}
if(nativ.is == 'prism'){
    $('head').append('<link rel="stylesheet" href="prism.css" type="text/css">');
}

nofity

Nativ also gives you an easy api for Growl notifications

nativ.notify({
  title: 'This is the title',
  description: 'This it the description'
});

badge

And what would a nativ, errr, native experience be without dock badges?

nativ.badge('★'); // display
nativ.badge(''); // clear

fallback

Both notify and badge fallback to empty functions when Fluid and Prism aren't present so there's no need to wrap nativ.js code in conditionals, the calls will simply go into the void.

About

A JS wrapper for Fluid and Prism support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors