Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed javascript stuff except on prod

  • Loading branch information...
commit 60a90e526163849546982eef75e4e5e683e503e7 1 parent a93f70f
Mitchell Lane authored
View
2  app/assets/javascripts/main.js
@@ -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();
View
15 app/views/layouts/application.html.erb
@@ -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>
Please sign in to comment.
Something went wrong with that request. Please try again.