mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 17:41:40 -05:00
Show tutorial on first install of Tridactyl
This commit is contained in:
parent
252158791c
commit
061178649e
2 changed files with 6 additions and 12 deletions
|
@ -442,12 +442,13 @@ export async function help(excmd?: string) {
|
|||
}
|
||||
|
||||
/** Start the tutorial
|
||||
* @param newtab - whether to start the tutorial in a newtab. Defaults to current tab.
|
||||
*/
|
||||
//#background
|
||||
export async function tutor() {
|
||||
export async function tutor(newtab?: string) {
|
||||
const tutor = browser.extension.getURL("static/clippy/tutor.html")
|
||||
console.log(tutor)
|
||||
open(tutor)
|
||||
if (newtab) tabopen(tutor)
|
||||
else open(tutor)
|
||||
}
|
||||
|
||||
/** @hidden */
|
||||
|
@ -1922,15 +1923,8 @@ export async function bmark(url?: string, ...titlearr: string[]) {
|
|||
*/
|
||||
//#background_helper
|
||||
browser.runtime.onInstalled.addListener(details => {
|
||||
if (details.reason == "install") tabopen()
|
||||
if (details.reason == "install") tutor("newtab")
|
||||
// could add elif "update" and show a changelog. Hide it behind a setting to make it less annoying?
|
||||
// const docpage = browser.extension.getURL("static/docs/modules/_excmds_.html#")
|
||||
// if (excmd === undefined) excmd = "tridactyl-help-page"
|
||||
// if ((await activeTab()).url.startsWith(docpage)) {
|
||||
// open(docpage + excmd)
|
||||
// } else {
|
||||
// tabopen(docpage + excmd)
|
||||
// }
|
||||
})
|
||||
|
||||
// vim: tabstop=4 shiftwidth=4 expandtab
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Tridactyl tutorial
|
||||
|
||||
Hello.
|
||||
Hello. If you've just installed Tridactyl for the first time, welcome! Tridactyl has something of a learning cliff. If you haven't used an add-on like it before, such as Pentadactyl or Vimperator, we strongly recommend you spend the 10-15 minutes it will take you to read through this tutorial. If you're already familiar with add-ons like this, we still suggest you skim through everything as there are a few things we do differently. Without further ado:
|
||||
|
||||
Welcome to the Tridactyl tutorial. Here, you will learn how to get started with this extension. If you ever want to get back to this page, just type `:tutor`.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue