This is an example custom command for Backtick. A Backtick command consists of two files, a JavaScript file command.js
and a JSON file command.json
.
The contents of the JavaScript file is injected into the DOM of the current page when the command is run. This works just like any bookmarklet, you have full access to everything in the page that the script is injected into. In this example, we're just opening an alert box, but you can of course do much more interesting things with your command.
The JSON file is metadata for the command, including the command name and description. You can also optionally include an icon of size 60x60
and a link.
Custom commands can be used privately or shared with others, all you need to do is grab the id of the Gist (usually the last part of the Gist URL) and add it through the Backtick settings page. You can access the settings page by clicking the Backtick icon on the console where all commands are executed from, or by right clicking the icon in the Chrome extension toolbar. You can try it out by adding the ID of this command: 6859173
.
You can suggest to add one of your own commands to list of predefined commands that are included with Backtick, just contact me on Twitter (@JoelBesada) with a link to your command gist.