Skip to main content

Point a tour step at a tab of a new episode

Free Intermediate

screen: 'episode-editor' opens a new episode on its Details tab, and episode-tab:{tabId} (on a real episode) is dropped on a show with no episodes yet. episode-editor:{tabId} opens an empty episode editor on the tab you name, at /episodes/new?tab={tabId}, so it works on any site.

  • Benecaster’s own tabs (details, access, media, artwork, guests, references, notes, more) need no current show and are never dropped.
  • Your own tab (declared with benecaster_episode_editor_tabs) is checked against the current show first. The step is dropped, not navigated to, when there is no current show, your add-on is switched off for it, or the check fails.

Code

window.BenecasterExtensions.tours.push( {
    id: 'my-addon', label: 'My Add-on Tour',
    steps: [ {
        id:      'my-addon-guests',
        target:  '[data-tour="episode-guest-selector"]',
        screen:  'episode-editor:guests',   // one of Benecaster's tabs, or your own tab's `id`
        title:   'Link guests to episodes',
        content: 'Explain the selector here.',
        // The target only exists where Guest Manager is on for the current show.
        condition: ( showId ) => window.BenecasterExtensions.addonIsActive( 'benecaster-addon-guest-manager', showId ),
    } ],
} );

View on GitHub →

Need this built rather than just documented? See our services →