Skip to main content

Site Helpers

Insert content from your other open tabs, like the name on a LinkedIn profile or the order you have open in your store's admin, while you write somewhere else.

Let's say you're writing to someone in Gmail, and you have their LinkedIn profile open in another tab. Instead of copying their name and current role from one tab to the other, your template can read them from LinkedIn when you insert it.

In the examples below, the tabs under the template stand in for your other open tabs. Click a tab to see its address, and the page or the variables Briskine would read from it. Change them, or the template, and the Preview shows what would be inserted.

Site​

The site block helper finds an open tab whose address matches the one you give it. Inside the block, everything is read from that tab instead of the page you're writing on.

The address can be a whole website, like linkedin.com, or only part of it, like linkedin.com/in/*. See how to choose which tabs to match.

The tab is read when you insert the template, so you always get what's on it at that moment.

info

What Briskine reads from your other tabs stays in your browser, and is only used to insert your template. It's never sent to Briskine or anyone else.

Here are a few examples of how you can use it.

Insert variables from another tab​

Inside the block, the template variables come from the other tab. They're the same ones you'd get if you inserted the template on that tab.

Most variables are only available on some websites, like Gmail, Outlook, or LinkedIn. See which ones. On other websites, use the css helper to read the page instead.

Template
Variables (JSON)
Preview
Hi John,

Insert something else when the tab isn't open​

Use {{else}} to insert something when no open tab matches.

Template
Variables (JSON)
Preview
Hi there,

Change the address in the template to example.com, and the name from that tab is inserted instead.

info

Briskine gives each tab a few seconds to answer. A tab that's still loading, or that your browser put to sleep to save memory, may not answer in time. A tab on a website where Briskine isn't allowed to run can't answer at all. When that happens, the block is still inserted, but the variables and {{css}} inside it are empty. Open the tab once to wake it up.

To insert something in both cases, when the tab isn't open and when it didn't answer, use the or helper inside the block too.

Template
Variables (JSON)
Preview
Hi there,

Fill in the first_name in the tab variables, or change the address in the template, to see the other cases.

Insert content from the other page​

The css helper inside the block reads the other tab's page.

Template
Page (HTML)
Preview
I saw you are now Head of Sales at Briskine, congratulations!

Everything on the Page Helpers page works the same way inside the block, like reading attributes, form fields, or looping through all the matches.

The class names in the examples on this page, like .headline, are made up. To find the ones to use on a real page, inspect the page in the other tab.

Insert the address and title of the tab​

@site holds the address and the title of the tab. @site.url is useful for linking back to it.

Template
Preview
Order: https://shop.example.com/orders/1024
Title: Order #1024

You can also insert only part of the address. For https://shop.example.com/orders/1024?view=items#notes:

VariableValue
{{@site.url}}The full address
{{@site.title}}The title of the tab
{{@site.protocol}}https
{{@site.domain}}shop.example.com
{{@site.path}}/orders/1024
{{@site.query}}?view=items
{{@site.hash}}#notes

Use variables from the page you're writing on​

Inside the block, add ../ before a variable to read it from the page you're writing on, instead of the other tab.

Template
Variables (JSON)
Variables (JSON)
Preview
Hi John, this is Jane from Briskine.

When more than one tab matches​

site reads only one tab. When more than one matches, it picks the one you used most recently. If the page you're writing on matches too, it reads that one.

In the examples on this page, Briskine picks the first tab, as if it's the one you used most recently. To read every tab that matches, use eachSite.

Each site​

The eachSite block helper inserts its content once for every open tab that matches, in the same order as your tabs. The tabs in the current window come first.

The page you're writing on is included too, when its address matches.

Inside the block, everything works the same way as in site, reading a different tab each time.

For example, with a few LinkedIn profiles open, one template can list them all in Google Sheets, with a row for each profile.

Here are a few examples of how you can use it.

Insert content from every matching tab​

Template
Page (HTML)
Preview
- #1024: https://shop.example.com/orders/1024
- #1025: https://shop.example.com/orders/1025

Insert something else when no tab is open​

Use {{else}} to insert something when no open tab matches.

Template
Page (HTML)
Preview
No orders open.

Insert all the tabs on one line​

Same as with the each helper, @first and @last tell you if it's the first or the last tab, and @index is its position, starting from 0.

The example below puts a comma between the tabs, and "and" before the last one.

Template
Page (HTML)
Preview
Your orders: #1024, #1025 and #1026.

Choose which tabs to match​

The address you give site and eachSite starts with a domain, optionally followed by a path.

AddressMatches
example.comexample.com and shop.example.com, but not my-example.com
shop.example.comshop.example.com, but not www.example.com
example.com/orders/orders and /orders/1024, but not /orders-old or /customers
example.com/*/orders/eu/orders and /eu/fr/orders, but not /orders

A few things to keep in mind:

  • https:// and www. don't make a difference, so https://www.example.com is the same as example.com.
  • * stands for any part of the path, including several parts separated by /.
  • The part of the address after ? or # doesn't count, so example.com/orders?status=open is the same as example.com/orders.
  • Use a full domain, like example.com. *, com, or *.com don't match any tab.

Change the address in the template, or the addresses of the tabs, to see which tabs match.

Template
Preview
https://shop.example.com/orders/1024
info

Briskine never reads browser settings pages, extension pages, or tabs with a website you added to the Blocklist on the Settings page. Password, card, and one-time code fields always read as empty.

Templates you insert in a private window only read tabs in private windows, and templates you insert in a regular window only read tabs in regular windows.