Skip to content

Commit

Permalink
Add more app tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
tonning committed Dec 16, 2023
1 parent 0defe1f commit 9bf1408
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/OsanoServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,18 @@ public function registerApp(App $app)
AppToken::name('Cookie preferences drawer trigger')
->type(AppToken::TYPE_TEXT)
->key('cookie-preferences-drawer-trigger')
->value("event.preventDefault(); Osano.cm.showDrawer('osano-cm-dom-info-dialog-open')")
->description('To trigger the Storage/Cookie preferences drawer'),
->value("event.preventDefault(); window.Osano.cm.showDrawer()")
->description('To trigger the storage/cookie preferences drawer'),
AppToken::name('Cookie banner trigger')
->type(AppToken::TYPE_TEXT)
->key('cookie-preferences-dialog-trigger')
->value("event.preventDefault(); window.Osano.cm.showDialog()")
->description('To trigger the cookie dialog aka. banner'),
AppToken::name('Do Not Sell modal trigger')
->type(AppToken::TYPE_TEXT)
->key('cookie-preferences-dialog-trigger')
->value("event.preventDefault(); window.Osano.cm.showDoNotSell()")
->description('To trigger the Do Not Sell preferences modal'),
])
->includeFrontendViews(function (IncludeFrontendViews $frontendViews) {
return $frontendViews->addToHead(view: 'osano::script', priority: 100);
Expand Down

0 comments on commit 9bf1408

Please sign in to comment.