@internetstiftelsen/styleguide 5.0.15-beta.0.4 → 5.0.15-beta.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,17 +4,14 @@ var _hasCookieConsent = require('../../assets/js/hasCookieConsent');
|
|
|
4
4
|
|
|
5
5
|
var _hasCookieConsent2 = _interopRequireDefault(_hasCookieConsent);
|
|
6
6
|
|
|
7
|
-
var _getCookieByName = require('./getCookieByName');
|
|
8
|
-
|
|
9
|
-
var _getCookieByName2 = _interopRequireDefault(_getCookieByName);
|
|
10
|
-
|
|
11
7
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
8
|
|
|
9
|
+
console.log('readSpeakerHandling.js');
|
|
10
|
+
|
|
13
11
|
var readspeakerBtn = document.querySelector('#readspeakerBtn');
|
|
14
|
-
var OneTrustCookie = (0, _getCookieByName2.default)('OptanonConsent');
|
|
15
12
|
var consent = (0, _hasCookieConsent2.default)('C0003');
|
|
16
13
|
|
|
17
|
-
if (readspeakerBtn && !
|
|
14
|
+
if (readspeakerBtn && !consent) {
|
|
18
15
|
readspeakerBtn.removeAttribute('href');
|
|
19
16
|
readspeakerBtn.addEventListener('click', function (e) {
|
|
20
17
|
e.preventDefault();
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import hasCookieConsent from '../../assets/js/hasCookieConsent';
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
console.log('readSpeakerHandling.js');
|
|
3
4
|
|
|
4
5
|
const readspeakerBtn = document.querySelector('#readspeakerBtn');
|
|
5
|
-
const OneTrustCookie = getCookieByName('OptanonConsent');
|
|
6
6
|
let consent = hasCookieConsent('C0003');
|
|
7
7
|
|
|
8
|
-
if(readspeakerBtn && !
|
|
8
|
+
if(readspeakerBtn && !consent) {
|
|
9
9
|
readspeakerBtn.removeAttribute('href');
|
|
10
10
|
readspeakerBtn.addEventListener('click', (e) => {
|
|
11
11
|
e.preventDefault();
|