Skip to content

node package to convert a javascript source string into a bookmarklet

Notifications You must be signed in to change notification settings

johnkpaul/bookmarkletify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bookmarkletify

convert javascript source into the format needed for a bookmarklet

Usage

As a module

npm install bookmarkletify
var bookmarkletify = require('bookmarkletify');
var source = 'alert( window.location    )';
var bookmarkletString = bookmarkletify(source);

console.log(bookmarkletString); //javascript:(function(){;alert(window.location);})()

or as a command line tool

npm install -g bookmarkletify
bookmarkletify input.js -o output.bookmarklet

license

MIT

About

node package to convert a javascript source string into a bookmarklet

Resources

Stars

Watchers

Forks

Packages

No packages published