Commit 8007aa45 authored by Martin Bodin's avatar Martin Bodin
Browse files

Adding the possibility to control the language of the fake ad.

parent 14717780
Pipeline #169825 failed with stages
in 42 seconds
......@@ -442,11 +442,12 @@
let j = 0;
for (let i = 0; i < scripts.length; i += 1) {
if (scripts[i].getAttribute('data-sense3')) {
let [format, tags, colors, id] = scripts[i].getAttribute('data-sense3').split(';');
let [format, tags, colors, id, lg] = scripts[i].getAttribute('data-sense3').split(';');
format = format || '300x250';
tags = tags || '';
colors = colors || defaultColors.join().toLowerCase();
id = id || '';
lg = lg || s.pageLang() ;
const [w, h] = format.split('x');
sense3Baseurl = s.l(scripts[i].getAttribute('src').replace('sense3.js', './'));
......@@ -458,7 +459,7 @@
iframe.vspace = '0'; iframe.hspace = '0';
iframe.allowtransparency = 'true'; iframe.scrolling = 'no';
iframe.style = `width: ${w}px; height: ${h}px; border: none;`;
iframe.src = `${sense3Baseurl}sense3.html#${s.pageLang()};${tags};${colors};${id};${referrer}`;
iframe.src = `${sense3Baseurl}sense3.html#${lg};${tags};${colors};${id};${referrer}`;
iframe.className = 'sense3';
iframe.id = `sense3_${j}`;
if (!document.getElementById(`sense3_${j}`)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment