Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Helming2018-05-23 11:04:55 -0400
committerJonas Helming2018-05-23 11:07:15 -0400
commitbc241ce414c9dc823247f1bf137de6fa2de6f13d (patch)
treeab6813b6dd279bd1fd1f6ee7ef99266ba3897959
parentbb5259d5eaf54e56b0772029b3862461cfffce3d (diff)
downloadmodeling-bc241ce414c9dc823247f1bf137de6fa2de6f13d.tar.gz
modeling-bc241ce414c9dc823247f1bf137de6fa2de6f13d.tar.xz
modeling-bc241ce414c9dc823247f1bf137de6fa2de6f13d.zip
Removed Google Analytics, Integrated Check for Cookie consent before
displaying Twitter timeline
-rw-r--r--_projectCommon.php48
-rw-r--r--download.php19
-rwxr-xr-xemf/docs/index.php2
-rw-r--r--emf/gettingstarted.php2
-rw-r--r--emf/index.php2
-rw-r--r--emf/indexold.php2
-rw-r--r--graphical.php2
-rw-r--r--includes/downloads-common.php2
-rw-r--r--index.php2
-rw-r--r--more.php2
-rw-r--r--server.php2
-rw-r--r--support.php2
-rw-r--r--textual.php2
-rw-r--r--tools.php2
-rw-r--r--transformation.php2
-rw-r--r--ui.php2
-rw-r--r--web.php2
17 files changed, 53 insertions, 44 deletions
diff --git a/_projectCommon.php b/_projectCommon.php
index 2a4afb8b..2911a0a4 100644
--- a/_projectCommon.php
+++ b/_projectCommon.php
@@ -54,19 +54,47 @@ $Nav->addCustomNav("Mailing Lists", "http://www.eclipse.org/mail/index_project.p
-
+$App->AddExtraHtmlHeader('<meta name="twitter:dnt" content="on">');
$App->AddExtraHtmlHeader("<link rel=\"stylesheet\" type=\"text/css\" href=\"/modeling/includes/common.css\"/>\n");
-$App->AddExtraHtmlHeader("
-<script>
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
- })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+$App->AddExtraHtmlHeader('<script src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>');
+$App->AddExtraHtmlHeader('<script>
+// via https://stackoverflow.com/questions/5968196/check-cookie-if-cookie-exists
+function getCookie(name) {
+var dc = document.cookie;
+var prefix = name + "=";
+var begin = dc.indexOf("; " + prefix);
+if (begin === -1) {
+ begin = dc.indexOf(prefix);
+ if (begin !== 0) return null;
+} else {
+ begin += 2;
+ var end = document.cookie.indexOf(";", begin);
+ if (end === -1) {
+ end = dc.length;
+ }
+}
- ga('create', 'UA-55011482-1', 'auto');
- ga('send', 'pageview');
+return decodeURI(dc.substring(begin + prefix.length, end));
+}
+
+function createTimeline() {
+var twitterContainer = document.getElementById("twitter-timeline");
+twttr.widgets.createTimeline(
+ "503883842478809088",
+ twitterContainer,
+ {
+ height: 400
+ }
+);
+twitterContainer.innerText = '';
+}
-</script>");
+(function() {
+if (getCookie("eclipse_cookieconsent_status") === "allow") {
+ createTimeline();
+ }
+})()
+</script>');
diff --git a/download.php b/download.php
index b9c4e8bc..2827d9f8 100644
--- a/download.php
+++ b/download.php
@@ -11,25 +11,6 @@ $QS = str_replace("&","&amp;", $_SERVER["QUERY_STRING"]);
$html = <<<EOHTML
<html>
<body onload="document.location.href='/downloads/download.php?${QS}';">
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-var pageTracker = _gat._getTracker("UA-910670-2"); // www.eclipse.org
-pageTracker._initData();
-pageTracker._trackPageview();
-</script>
-
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-var pageTracker = _gat._getTracker("UA-2566337-8"); // www.eclipse.org/modeling
-pageTracker._initData();
-pageTracker._trackPageview();
-</script>
<noscript>
<p><blockquote style="margin:30px; border:2px purple dashed"><blockquote style="margin:30px">
diff --git a/emf/docs/index.php b/emf/docs/index.php
index b8e92104..1e51fef8 100755
--- a/emf/docs/index.php
+++ b/emf/docs/index.php
@@ -430,7 +430,7 @@ and Animations of the internals of XSD models</a>
</div>
<div class="sideitem">
<h6>News on Twitter</h6>
- <a class="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
+ <a id="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
</div>
diff --git a/emf/gettingstarted.php b/emf/gettingstarted.php
index 7a21345e..edf5beb5 100644
--- a/emf/gettingstarted.php
+++ b/emf/gettingstarted.php
@@ -51,7 +51,7 @@ include($App->getProjectCommon()); # All on the same line to unclutter the us
<div class="sideitem">
<h6>News on Twitter</h6>
- <a class="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
+ <a id="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
</div>
diff --git a/emf/index.php b/emf/index.php
index 66eeadda..1558cc22 100644
--- a/emf/index.php
+++ b/emf/index.php
@@ -130,7 +130,7 @@ weren't a little bit of exaggeration.</p>
</div>
<div class="sideitem">
<h6>News on Twitter</h6>
- <a class="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
+ <a id="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
</div>
diff --git a/emf/indexold.php b/emf/indexold.php
index 84f98128..eaf39ce2 100644
--- a/emf/indexold.php
+++ b/emf/indexold.php
@@ -56,7 +56,7 @@ ob_start();
<div class="sideitem">
<h6>News on Twitter</h6>
- <a class="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
+ <a id="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
diff --git a/graphical.php b/graphical.php
index 7bf5cb1d..e4c64fc1 100644
--- a/graphical.php
+++ b/graphical.php
@@ -95,7 +95,7 @@ include($App->getProjectCommon()); # All on the same line to unclutter the us
<div id="rightcolumn">
<div class="sideitem">
<h6>News on Twitter</h6>
- <a class="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
+ <a id="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
</div>
diff --git a/includes/downloads-common.php b/includes/downloads-common.php
index 594b0b21..b22b5b60 100644
--- a/includes/downloads-common.php
+++ b/includes/downloads-common.php
@@ -254,7 +254,7 @@ print "</div>\n";
<div id="rightcolumn">
<div class="sideitem">
<h6>News on Twitter</h6>
- <a class="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
+ <a id="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
</div>
diff --git a/index.php b/index.php
index d40e9115..ea47afe7 100644
--- a/index.php
+++ b/index.php
@@ -84,7 +84,7 @@ development technologies within the Eclipse community by providing a unified set
<div id="rightcolumn">
<div class="sideitem">
<h6>News on Twitter</h6>
- <a class="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
+ <a id="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
</div>
diff --git a/more.php b/more.php
index 16e71479..3f585082 100644
--- a/more.php
+++ b/more.php
@@ -97,7 +97,7 @@ include($App->getProjectCommon()); # All on the same line to unclutter the us
<div id="rightcolumn">
<div class="sideitem">
<h6>News on Twitter</h6>
- <a class="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
+ <a id="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
</div>
diff --git a/server.php b/server.php
index 4d02cac6..3f3b0f15 100644
--- a/server.php
+++ b/server.php
@@ -95,7 +95,7 @@ include($App->getProjectCommon()); # All on the same line to unclutter the us
<div id="rightcolumn">
<div class="sideitem">
<h6>News on Twitter</h6>
- <a class="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
+ <a id="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
</div>
diff --git a/support.php b/support.php
index fdaa3a7f..8573f6a3 100644
--- a/support.php
+++ b/support.php
@@ -84,7 +84,7 @@ include($App->getProjectCommon()); # All on the same line to unclutter the us
<div id="rightcolumn">
<div class="sideitem">
<h6>News on Twitter</h6>
- <a class="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
+ <a id="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
</div>
diff --git a/textual.php b/textual.php
index 4fe7df85..d8d1fa0e 100644
--- a/textual.php
+++ b/textual.php
@@ -75,7 +75,7 @@ include($App->getProjectCommon()); # All on the same line to unclutter the us
<div id="rightcolumn">
<div class="sideitem">
<h6>News on Twitter</h6>
- <a class="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
+ <a id="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
</div>
diff --git a/tools.php b/tools.php
index 68c10f51..6a8fc69d 100644
--- a/tools.php
+++ b/tools.php
@@ -116,7 +116,7 @@ include($App->getProjectCommon()); # All on the same line to unclutter the us
<div id="rightcolumn">
<div class="sideitem">
<h6>News on Twitter</h6>
- <a class="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
+ <a id="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
</div>
diff --git a/transformation.php b/transformation.php
index eb556a53..751c5fb6 100644
--- a/transformation.php
+++ b/transformation.php
@@ -100,7 +100,7 @@ include($App->getProjectCommon()); # All on the same line to unclutter the us
<div id="rightcolumn">
<div class="sideitem">
<h6>News on Twitter</h6>
- <a class="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
+ <a id="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
</div>
diff --git a/ui.php b/ui.php
index 537b0f48..73c6472b 100644
--- a/ui.php
+++ b/ui.php
@@ -85,7 +85,7 @@ include($App->getProjectCommon()); # All on the same line to unclutter the us
<div id="rightcolumn">
<div class="sideitem">
<h6>News on Twitter</h6>
- <a class="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
+ <a id="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
</div>
diff --git a/web.php b/web.php
index 5e77e9c9..56b45a11 100644
--- a/web.php
+++ b/web.php
@@ -76,7 +76,7 @@ include($App->getProjectCommon()); # All on the same line to unclutter the us
<div id="rightcolumn">
<div class="sideitem">
<h6>News on Twitter</h6>
- <a class="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
+ <a id="twitter-timeline" href="https://twitter.com/hashtag/eclipsemf" data-widget-id="503883842478809088">#eclipsemf Tweets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
</div>

Back to the top