diff --git a/readthedocs/core/static-src/core/js/readthedocs-doc-embed.js b/readthedocs/core/static-src/core/js/readthedocs-doc-embed.js index 96b9ebc8205..4e8ba5fddd0 100644 --- a/readthedocs/core/static-src/core/js/readthedocs-doc-embed.js +++ b/readthedocs/core/static-src/core/js/readthedocs-doc-embed.js @@ -1,6 +1,5 @@ var sponsorship = require('./sponsorship'), - doc = require('./doc'), - util = require('./util'); + doc = require('./doc'); $(document).ready(function () { @@ -171,17 +170,14 @@ $(document).ready(function () { // Promos // TODO don't hardcode this promo and remove the util function to hide the // ad - var show_promo = util.get_param('promo'), - promo = null; - if (build.is_rtd_theme() && show_promo) { + var promo = null; + if (build.is_rtd_theme()) { var promo = sponsorship.Promo.from_experiment({ - experiment_id: '1PV0r2DbQrespD6x6Paxzw', + experiment_id: 'Q8yssnbeR3O8qRwS2-9cSA', variants: [ - 'Enjoy reading the docs? Join other developers and tech writers at Write the Docs!', - '<3 documentation? Join fellow developers and tech writers at Write the Docs!', + 'Enjoy reading the docs? Join fellow developers and tech writers at Write the Docs!', 'Love docs as much as we do? Come join the community at the Write The Docs conference', - 'Doing amazing things with docs? Submit a talk to Write the Docs, a conference about docs.', - 'Tickets for Write the Docs, a community conference about docs, are now on sale!', + 'Tickets are now on sale for Write the Docs, a community conference about documentation!', 'Come join us at Write the Docs, a community conference about documentation.' ], link: 'http://writethedocs.org/conf/na/2015/', diff --git a/readthedocs/core/static-src/core/js/sponsorship.js b/readthedocs/core/static-src/core/js/sponsorship.js index 74478b6668c..4316c4d731a 100644 --- a/readthedocs/core/static-src/core/js/sponsorship.js +++ b/readthedocs/core/static-src/core/js/sponsorship.js @@ -35,8 +35,7 @@ Promo.prototype.create = function () { '_trackEvent', 'Promo', 'Click', - 'wtdna2015', - self.variant + 'wtdna2015-' + self.variant ]); } }) diff --git a/readthedocs/core/static-src/core/js/util.js b/readthedocs/core/static-src/core/js/util.js deleted file mode 100644 index 7aaeff3f598..00000000000 --- a/readthedocs/core/static-src/core/js/util.js +++ /dev/null @@ -1,16 +0,0 @@ -/* UGGGGH at javascript */ - -exports.get_param = function (name) { - var url = window.location.search.substring(1), - vars = url.split('&'); - - for (n in vars) { - var param = vars[n].split('='), - param_name = param[0], - param_val = param[1]; - if (name == param_name) { - return param_val; - } - } - return false -} diff --git a/readthedocs/core/static/core/js/readthedocs-doc-embed.js b/readthedocs/core/static/core/js/readthedocs-doc-embed.js index 94bbc9c62e8..b6391a8341d 100644 --- a/readthedocs/core/static/core/js/readthedocs-doc-embed.js +++ b/readthedocs/core/static/core/js/readthedocs-doc-embed.js @@ -31,8 +31,7 @@ Build.prototype.is_rtd_theme = function () { },{}],3:[function(require,module,exports){ var sponsorship = require('./sponsorship'), - doc = require('./doc'), - util = require('./util'); + doc = require('./doc'); $(document).ready(function () { @@ -203,16 +202,15 @@ $(document).ready(function () { // Promos // TODO don't hardcode this promo and remove the util function to hide the // ad - var show_promo = util.get_param('promo'), - promo = null; - if (build.is_rtd_theme() && show_promo) { + var promo = null; + if (build.is_rtd_theme()) { var promo = sponsorship.Promo.from_experiment({ - experiment_id: '1PV0r2DbQrespD6x6Paxzw', + experiment_id: 'Q8yssnbeR3O8qRwS2-9cSA', variants: [ - 'Enjoy reading the docs? Join developers and tech writers at Write the Docs NA 2015!', - '<3 documentation? Join fellow developers and tech writers at Write the Docs NA 2015!', - 'Tickets for Write the Docs NA 2015 are now on sale!', - 'Write the Docs NA 2015 CFP is open and tickets are on sale' + 'Enjoy reading the docs? Join fellow developers and tech writers at Write the Docs!', + 'Love docs as much as we do? Come join the community at the Write The Docs conference', + 'Tickets are now on sale for Write the Docs, a community conference about documentation!', + 'Come join us at Write the Docs, a community conference about documentation.' ], link: 'http://writethedocs.org/conf/na/2015/', callback: function (p) { @@ -504,7 +502,7 @@ $(document).ready(function () { } }); -},{"./doc":2,"./sponsorship":4,"./util":5}],4:[function(require,module,exports){ +},{"./doc":2,"./sponsorship":4}],4:[function(require,module,exports){ /* Read the Docs - Documentation promotions */ var $ = window.$, @@ -542,8 +540,7 @@ Promo.prototype.create = function () { '_trackEvent', 'Promo', 'Click', - 'wtdna2015', - self.variant + 'wtdna2015-' + self.variant ]); } }) @@ -632,22 +629,4 @@ Promo.from_experiment = function (experiment_id, variants, link, callback) { return promo; }; -},{"./../../../../../bower_components/waypoints/lib/noframework.waypoints.min.js":1}],5:[function(require,module,exports){ -/* UGGGGH at javascript */ - -exports.get_param = function (name) { - var url = window.location.search.substring(1), - vars = url.split('&'); - - for (n in vars) { - var param = vars[n].split('='), - param_name = param[0], - param_val = param[1]; - if (name == param_name) { - return param_val; - } - } - return false -} - -},{}]},{},[3]) \ No newline at end of file +},{"./../../../../../bower_components/waypoints/lib/noframework.waypoints.min.js":1}]},{},[3]) \ No newline at end of file