{% extends "!layout.html" %}

{% block extrahead %}
<script type="text/javascript">
  /* Prevent injected analytics from running with a no-op, but
     let other scripts be injected (we need that for the readthedocs
     widget at the bottom-right of the screen) */
  (function(){
    var props = Object.getOwnPropertyDescriptor(HTMLScriptElement.prototype, 'src');
    var _set = props.set;
    Object.defineProperty(HTMLScriptElement.prototype, 'src', {
      configurable: false, /* Prevent further redefinition of this property */
      set: function(url) {
        if (url.indexOf('google-analytics.com') > -1) return;
        else _set.apply(this, arguments);
      }
    });
  }())
</script>
{% endblock %}
