betterplace-content 0.7.93 → 0.7.94
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_layouts/default.html +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ada2a033b97d7c0d460b697c1b13d33b9511c7e96166b0bd1ee90d219f7d112
|
4
|
+
data.tar.gz: 3449c1698af4e209e9ab7e7c4aa69436df4609a987e3f1a03d83662a5abc604c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1f2736c64eb69ca164376d01928045acdb1e70e5b1f3b5d1bfb54c7200c5d8513f43c7893d0eec17462d2d8e5a6971dd6ef7f7d6d14f787cd454dfa8ad5c01e
|
7
|
+
data.tar.gz: c3ccc3e1f37f827452ab841f7397ee7d25429806bca6e1f2ba26a920b6f387fd534ec41c14bfe844a5a9bd9604101bc30e7bfbd843f2601bede65949b4b6237e
|
data/_layouts/default.html
CHANGED
@@ -122,8 +122,14 @@ Update 2019-07-19: Another problem that came us is, that URLs endet in .html whi
|
|
122
122
|
// The attribute data-host-replaced=true is meant as a heads up when using the inspector that something was change here.
|
123
123
|
// We cannot use the same logic for JS – more at https://github.com/betterplace/content--theme/commit/cff6293.
|
124
124
|
// We work around checking for bp42 here to not expose the staging domain.
|
125
|
+
// www.betterplace.org, .dev: do nothing
|
126
|
+
// app.cloudcannon.com, proxy.cloudcannon.com: do nothing
|
127
|
+
// www.bp42.com: replace
|
125
128
|
{% endcomment -%}
|
126
|
-
|
129
|
+
const prd = window.location.hostname.indexOf('.org') !== -1
|
130
|
+
const dev = window.location.hostname.indexOf('.dev') !== -1
|
131
|
+
const edit = window.location.hostname.indexOf('.cloud') !== -1
|
132
|
+
if (!prd && !dev && !edit) {
|
127
133
|
document.querySelectorAll("[href]").forEach(element => {
|
128
134
|
if (element.href.includes('www.betterplace.org')) {
|
129
135
|
element.href = element.href.replace('www.betterplace.org', window.location.hostname)
|