0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-20 17:54:23 +01:00

hacky way of not showing ads or analytics in local dev

This commit is contained in:
Mark Otto 2013-07-19 14:08:16 -07:00
parent 4b0fa356f3
commit f25d8c0080
3 changed files with 32 additions and 26 deletions

View File

@ -9,9 +9,10 @@
<script src="/assets/js/application.js"></script>
<!-- Analytics
================================================== -->
<script>
{% unless site.port != "9001" %}
<!-- Analytics
================================================== -->
<script>
var _gauges = _gauges || [];
(function() {
var t = document.createElement('script');
@ -23,4 +24,5 @@
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(t, s);
})();
</script>
</script>
{% endunless %}

View File

@ -33,7 +33,8 @@
<link rel="apple-touch-icon-precomposed" href="/assets/ico/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="/assets/ico/favicon.png">
<script type="text/javascript">
{% unless site.port != "9001" %}
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-146052-10']);
_gaq.push(['_trackPageview']);
@ -42,4 +43,5 @@
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</script>
{% endunless %}

View File

@ -15,7 +15,9 @@
<div class="container">
<h1>{{ page.title }}</h1>
<p>{{ page.lead }}</p>
{% unless site.port != "9001" %}
{% include ads.html %}
{% endunless %}
</div>
</div>