lib/bigbro.rb in bigbro-0.9 vs lib/bigbro.rb in bigbro-0.9.1

- old
+ new

@@ -1,9 +1,9 @@ require 'bigbro/railtie' if defined? Rails module BigBro - Version = '0.9' + Version = '0.9.1' module Helpers # Embeds the optimized Analytics code and the noscript tag with # the direct path to the __utm.gif image into the current page. # @@ -23,17 +23,15 @@ ga_cmds.push ['_trackPageview'] if track code = '' code.concat javascript_tag(%( var _gaq = #{ga_cmds.to_json}; - $(document).ready (function () { // Because of Opera and FF <= 3.5 - try { - (function(d, t, a) { - var g=d.createElement(t),s=d.getElementsByTagName(t)[0]; - g[a]=a;g.src='#{ga_host}/ga.js';s.parentNode.insertBefore(g,s); - }) (document, 'script', 'async'); - } catch (err) {} - }); + try { + (function(d,t,a) { + var g=d.createElement(t),s=d.getElementsByTagName(t)[0]; + g[a]=a;g.src='#{ga_host}/ga.js';s.parentNode.insertBefore(g,s); + })(document, 'script', 'async'); + } catch (err) {} )) code.concat(content_tag(:noscript, image_tag(BigBro.noscript_image_path_for(request, ga_host), :border => '0', :alt => '').html_safe