Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: mozilla/kuma
...
head fork: mozilla/kuma
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 2 contributors
View
5 settings.py
@@ -994,6 +994,11 @@ def read_only_mode(env):
'Google Analytics Tracking Account Number (0 to disable)',
),
+ OPTIMIZELY_PROJECT_ID = (
+ '',
+ 'The ID value for optimizely Project Code script'
+ ),
+
BLEACH_ALLOWED_TAGS = (
json.dumps([
'a', 'p', 'div',
View
4 templates/base.html
@@ -1,6 +1,8 @@
+{% from "includes/common_macros.html" import optimizely_script with context %}
<!DOCTYPE html>
<html lang="{{ LANG }}" dir="{{ DIR }}" id="developer-mozilla-org" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://ogp.me/ns#">
<head>
+ {{ optimizely_script() }}
<title>{% block title %}{{ _('Mozilla Developer Network') }}{% endblock %}</title>
<meta charset="utf-8">
@@ -188,4 +190,4 @@
<script src="/{{ request.locale }}/waffles.js" type="text/javascript"></script>
{# end js #}
</body>
-</html>
+</html>
View
6 templates/includes/common_macros.html
@@ -45,3 +45,9 @@
{{ field|safe }}
</div>
{% endmacro %}
+
+{% macro optimizely_script() %}
+ {% if waffle.flag('optimizely') and config.OPTIMIZELY_PROJECT_ID %}
+ <script src="//cdn.optimizely.com/js/{{ config.OPTIMIZELY_PROJECT_ID }}.js"></script>
+ {% endif %}
+{% endmacro %}

No commit comments for this range

Something went wrong with that request. Please try again.