[FFmpeg-devel] web/template_head2: Prevent battleforthenet widget to show again after being clicked away

Submitted by Michael Niedermayer on Nov. 4, 2017, 4:48 p.m.

Details

Message ID 20171104164857.30106-1-michael@niedermayer.cc
State New
Headers show

Commit Message

Michael Niedermayer Nov. 4, 2017, 4:48 p.m.
Also ensure that the widget does not use google analytics.
Iam not sure it actually did before, my box has too many layers that stop this.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 src/template_head2 | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Comments

Michael Niedermayer Nov. 5, 2017, 4:46 p.m.
On Sat, Nov 04, 2017 at 05:48:57PM +0100, Michael Niedermayer wrote:
> Also ensure that the widget does not use google analytics.
> Iam not sure it actually did before, my box has too many layers that stop this.
> 
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  src/template_head2 | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)

will apply


[...]

Patch hide | download patch | download mbox

diff --git a/src/template_head2 b/src/template_head2
index d7bb7bd..71daf07 100644
--- a/src/template_head2
+++ b/src/template_head2
@@ -3,6 +3,28 @@ 
       <script src="js/html5shiv.min.js"></script>
       <script src="js/respond.min.js"></script>
     <![endif]-->
+    <script type="text/javascript">
+    var _bftn_options = {
+        /*
+        * Specify view cookie expiration. After initial view, modal will not be
+        * displayed to a user again until after this cookie expires. Defaults to one
+        * day.
+        */
+        viewCookieExpires: 60, // @type {number}
+
+        /*
+        * Specify action cookie expiration. After initiating a call or clicking a
+        * donate link, modal will not be displayed to a user again until after this
+        * cookie expires. Defaults to one week.
+        */
+        actionCookieExpires: 60, // @type {number}
+
+        /*
+        * Prevents the widget iframe from loading Google Analytics. Defaults to false.
+        */
+        disableGoogleAnalytics: true, // @type {boolean}
+    };
+    </script>
     <script src="https://widget.battleforthenet.com/widget.js" async></script>
 
     <link href="main.rss" rel="alternate" type="application/rss+xml" title="ffmpeg.org" />