Permalink
Browse files

Removed javascript stuff except on prod

  • Loading branch information...
1 parent a93f70f commit 60a90e526163849546982eef75e4e5e683e503e7 Mitchell Lane committed Dec 13, 2011
Showing with 16 additions and 1 deletion.
  1. +1 −1 app/assets/javascripts/main.js
  2. +15 −0 app/views/layouts/application.html.erb
@@ -49,7 +49,7 @@ function get_data (search) {
var api_url = "/api/"+search.replace(/[.,\-'"]/g,'')+".json";
query = $.getJSON(api_url, function (data) {
- _gaq.push(['_trackPageview', api_url]); // google analytics track api pageview
+ _gaq.push(['_trackPageview', api_url]); // google analytics track api pageview
$("#search").removeClass('loading');
$('#search-data').show();
@@ -49,6 +49,8 @@
<%= yield %>
</section>
+
+ <% if Rails.env.production? %>
<!-- GA Shit -->
<script type="text/javascript">
var _gaq = _gaq || [];
@@ -62,5 +64,18 @@
})();
</script>
<!-- End GA Shit -->
+
+ <!-- User Voice Shit -->
+ <script type="text/javascript">
+ var uvOptions = {};
+ (function() {
+ var uv = document.createElement('script'); uv.type = 'text/javascript'; uv.async = true;
+ uv.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'widget.uservoice.com/KPxNPe6gXFZNgxMHfgShaQ.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(uv, s);
+ })();
+ </script>
+ <!-- End User Voice Shit-->
+ <% end %>
+
</body>
</html>

0 comments on commit 60a90e5

Please sign in to comment.