Load our paddle.js if their CDN doesn't work
This commit is contained in:
parent
75ccc337a9
commit
47bf6646fc
|
@ -7,6 +7,14 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
|
<script src="https://cdn.paddle.com/paddle/paddle.js"></script>
|
||||||
|
<script>
|
||||||
|
if (window.Paddle === undefined) {
|
||||||
|
console.log("cannot load Paddle from CDN");
|
||||||
|
document.write('<script src="/static/vendor/paddle.js"><\/script>')
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block default_content %}
|
{% block default_content %}
|
||||||
|
@ -66,7 +74,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="https://cdn.paddle.com/paddle/paddle.js"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
Paddle.Setup({vendor: {{ PADDLE_VENDOR_ID }}});
|
Paddle.Setup({vendor: {{ PADDLE_VENDOR_ID }}});
|
||||||
|
|
Loading…
Reference in a new issue