paywall_invoker:start
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| paywall_invoker:start [2021/01/01 01:04] – joaosaraiva | paywall_invoker:start [2026/03/27 17:24] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Interacting with the Paywall ====== | ||
| + | You can interact with the Paywall when you invoke it and when you listen to the events it fires. | ||
| + | |||
| + | ===== Loading the Paywall ===== | ||
| + | |||
| + | You load the Paywall by getting a small invoker Javascript file. The easiest way to do this is to include a '' | ||
| + | <code html> | ||
| + | <script src=" | ||
| + | </ | ||
| + | |||
| + | There are different versions of the Paywall invoker file, so that you can access the one that is most adequate to your needs.\\ | ||
| + | The available files are: | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | The file's name indicates whether the invoker supports both the declarative and imperative invocations of the Paywall, or only the declarative or imperative invocation. Like this: | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | Note that, if you wish to open the Paywall in sandbox mode, you need to adjust the above URLs to include the '' | ||
| + | '' | ||
| + | becomes\\ | ||
| + | '' | ||
| + | ===== Invoking the Paywall ===== | ||
| + | |||
| + | The Paperview Paywall can be summoned by one of the following means: | ||
| + | * [[paywall_invoker: | ||
| + | * [[paywall_invoker: | ||
| + | |||
| + | ===== Paywall events ===== | ||
| + | |||
| + | The Paywall also fires some DOM events during its lifecycle, regardless of the manner used to invoke it.\\ | ||
| + | You can listen for these DOM events by hooking a listener to the global '' | ||
| + | <code javascript> | ||
| + | window.addEventListener(" | ||
| + | // stuff you want to do when the event fires | ||
| + | }); | ||
| + | </ | ||
| + | |||
| + | You can find a comprehensive list of the supported DOM events [[paywall_invoker: | ||
