launchlet v0.0.1616773350
Launchlet package
The Launchlet package can be added to your own project as a module to quickly present a 'Jump to' functionality.
Setup
https://unpkg.com/launchlet/__compiled/launchlet.js https://unpkg.com/launchlet/__compiled/launchlet.css
npm install launchlet<link rel="stylesheet" href="https://launchlet.dev/launchlet.css" />
<script src="https://launchlet.dev/launchlet.js"></script>Usage
Commit Mode
Launchlet.LCHSingletonCreate({
LCHOptionRecipes: [{
LCHRecipeName: 'Alfa',
LCHRecipeCallback () {
alert('Alfa');
},
}],
LCHOptionMode: Launchlet.LCHModeCommit,
});Preview Mode
Launchlet.LCHSingletonCreate({
LCHOptionRecipes: [{
LCHRecipeName: 'Bravo',
LCHRecipeCallback () {
console.log('Bravo');
},
}, {
LCHRecipeName: 'Charlie',
LCHRecipeCallback () {
console.log('Charlie');
},
}],
LCHOptionMode: Launchlet.LCHModePreview,
});Pipe Mode
Launchlet.LCHSingletonCreate({
LCHOptionRecipes: [{
LCHRecipeName: 'Delta',
LCHRecipeCallback () {
alert('Delta');
},
}],
LCHOptionMode: Launchlet.LCHModePipe,
});If you have keyboard shortcuts on the page
Ignore keydown events if Launchlet is active:
window.addEventListener('keydown', function (event) {
if (Launchlet.LCHSingletonExists()) {
return;
}
// ...
});API
Launchlet.LCHSingletonCreate
Creates a singleton instance of the launcher. Destroys existing instance if there is one. Takes an optional configuration object.
Options
LCHOptionRecipes (array) –
[]- Recipe objects
LCHOptionMode (identifier) –
Launchlet.LCHModeCommitLaunchlet.LCHModeCommitLaunchlet.LCHModePreviewLaunchlet.LCHModePipe
LCHOptionIncludePageRecipes (boolean) –
falseLCHOptionRunAutomaticRecipes (boolean) –
falseLCHOptionCompletionHandler (function) –
undefinedLCHOptionLanguage (string) –
'en''en''fr''es''pt'
Launchlet.LCHSingletonExists
Returns true if there is a singleton instance of the launcher.
Launchlet.LCHSingletonDestroy
Destroys a singleton instance of the launcher.
Launchlet.LCHTasksRun
Runs each Task that matches the current URL unless LCHRecipeIsExcluded returns true.
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago