Help › Website plugin 1.0

Adding the plugin to your site

The script

Add these lines at the end of your page's <body>:

<script src="https://scripture.tips/widget/scripturetips.js"></script>
<script>
  ScriptureTips.run("main");
</script>

That is all. References inside the part of the page you name are linked, including text that is added later, such as comments that load afterwards.

Choosing the part of the page

run takes a CSS selector. Name the part that holds your writing, so that menus, footers and forms are left alone:

ScriptureTips.run("article");
ScriptureTips.run("#content, .comments");

Call run again to add another area. To leave out something inside an area, see what is linked.

With options

The first call to run can set the plugin up:

ScriptureTips.run("article", { translation: "bsb" });

All the options lists them.

Loading it without blocking the page

To let the page carry on while the script loads, load it with async and start it when it arrives:

<script async src="https://scripture.tips/widget/scripturetips.js"
  onload="ScriptureTips.run('main')"></script>

Content security policy

If your site sends a content security policy, allow the script and its passage requests from https://scripture.tips (script-src and connect-src). The tooltip's own styles are inside the tooltip and need style-src 'unsafe-inline'.