[pro-merge] Add charm initialization script if charm_key is available

This commit is contained in:
Piotr Sarnacki 2014-12-29 15:24:12 +01:00
parent b4573ff293
commit 284734ee65

View File

@ -195,6 +195,13 @@ Ember.LinkView.reopen
if Travis.config.pro
$('body').addClass('pro')
if charm_key = $('meta[name="travis.charm_key"]').attr('value')
@__CHARM =
key: $('meta[name="travis.charm_key"]').attr('value')
url: "https://charmscout.herokuapp.com/feedback"
$('head').append $('<script src="https://charmscout.herokuapp.com/charmeur.js?v=2" async defer></script>')
require 'travis/ajax'
require 'travis/adapter'
require 'travis/adapters/env_vars'