-
Notifications
You must be signed in to change notification settings - Fork 122
Take away cookie? #139
Comments
Or, I see that may be an option in the code but what would I replace it with? Say, 1 hour, for example. |
battleforthenet-widget/src/widget.js Lines 97 to 103 in d3ae559
The expiration cookie value is set in days but it doesn't need to be a whole number, so for 1-hour expiry you can set the value to <script type="text/javascript">
var _bftn_options = {
viewCookieExpires: 1/24
}
</script>
<script src="https://widget.battleforthenet.com/widget.js" async></script> And to cause the pop-up to display on every page load you could set the value to 0: <script type="text/javascript">
var _bftn_options = {
viewCookieExpires: 0
}
</script>
<script src="https://widget.battleforthenet.com/widget.js" async></script> |
Ok, so this would work: <script>var _bftn_options = { theme: 'stop' ; viewcookieexpires: 0 };</script><script src="https://widget.battleforthenet.com/widget.js" async></script> |
Variable names are case-sensitive, so you'll need to ensure it matches <script type="text/javascript">
var _bftn_options = {
theme: 'stop',
viewCookieExpires: 0
}
</script>
<script src="https://widget.battleforthenet.com/widget.js" async></script> You can use jsfiddle.net to test out Javascript (and HTML, and CSS) if you're not sure if something will work or not, before pushing it live on your website. After opening jsfiddle.net, paste the above code into the HTML box (at the top left) and then click "Run" (above the HTML box) and you'll see in the bottom right the result of your code. I hope that helps! :) |
Thank you!
…On Tue, Dec 12, 2017 at 12:21 PM, Samuel Ryan ***@***.***> wrote:
Variable names are case-sensitive, so you'll need to ensure it matches
viewCookieExpires exactly. The following should work with no expiry and
the stop theme:
<script type="text/javascript"> var _bftn_options = { theme: 'stop', viewCookieExpires: 0 }</script>
<script src="https://widget.battleforthenet.com/widget.js" async></script>
You can use jsfiddle.net to test out Javascript (and HTML, and CSS) if
you're not sure if something will work or not, before pushing it live on
your website. After opening jsfiddle.net, paste the above code into the
HTML box (at the top left) and then click "Run" (above the HTML box) and
you'll see in the bottom right the result of your code.
I hope that helps! :)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#139 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AfY50sLVw20ZNw0uXyW2Jo6C_X55vRl2ks5s_tJGgaJpZM4Q-ThH>
.
--
Lisa M. Newcomb
@Newcomb_Lisa <https://twitter.com/Newcomb_Lisa>
lisanewcomb.com
PO Box 1343
Driggs, Idaho
83422
|
Hi, is there a way to make this appear every time a person visits the site?
The text was updated successfully, but these errors were encountered: