Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update tracking code to work whether the containing page is http or h…

…ttps.
  • Loading branch information...
commit 53ea3689f6f1e91ff068bea588b748918c9f4e83 1 parent 8fb030c
@brandon-beacher authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/rack_clicky.rb
View
6 lib/rack_clicky.rb
@@ -2,9 +2,9 @@ module Rack
class Clicky
TRACKING_CODE = <<-EOTC
- <script src="http://static.getclicky.com/js" type="text/javascript"></script>
- <script type="text/javascript">clicky.init({{CODE}});</script>
- <noscript><p><img alt="Clicky" width="1" height="1" src="http://in.getclicky.com/{{CODE}}ns.gif" /></p></noscript>
+ <script src="//static.getclicky.com/js" type="text/javascript"></script>
+ <script type="text/javascript">try{ clicky.init({{CODE}}); }catch(e){}</script>
+ <noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/{{CODE}}ns.gif" /></p></noscript>
EOTC
def initialize(app, site_id, options = {})
Please sign in to comment.
Something went wrong with that request. Please try again.