Add service for Issuu (www.issuu.com) Iframe embed
This commit is contained in:
parent
a7b5fb7e36
commit
7143dc9258
|
|
@ -85,6 +85,7 @@ Bonus:
|
||||||
* SlideShare
|
* SlideShare
|
||||||
* Vimeo
|
* Vimeo
|
||||||
* YouTube
|
* YouTube
|
||||||
|
* Issuu
|
||||||
|
|
||||||
|
|
||||||
## Visitors outside the EU
|
## Visitors outside the EU
|
||||||
|
|
|
||||||
|
|
@ -1848,3 +1848,48 @@ tarteaucitron.services.facebookpixel = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//Issuu
|
||||||
|
tarteaucitron.services.issuu = {
|
||||||
|
"key": "issuu",
|
||||||
|
"type": "other",
|
||||||
|
"name": "Issuu",
|
||||||
|
"uri": "https://issuu.com/legal/privacy",
|
||||||
|
"needConsent": true,
|
||||||
|
"cookies": ['__qca', 'iutk', 'mc'],
|
||||||
|
"js": function () {
|
||||||
|
"use strict";
|
||||||
|
tarteaucitron.fallback(['issuu_player'], function (x) {
|
||||||
|
var issuu_id = x.getAttribute("issuuID"),
|
||||||
|
issuu_width = x.getAttribute("width"),
|
||||||
|
frame_width = 'width=',
|
||||||
|
issuu_height = x.getAttribute("height"),
|
||||||
|
frame_height = 'height=',
|
||||||
|
issuu_frame;
|
||||||
|
|
||||||
|
if (issuu_id === undefined) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
if (issuu_width !== undefined) {
|
||||||
|
frame_width += '"' + issuu_width + '" ';
|
||||||
|
} else {
|
||||||
|
frame_width += '"" ';
|
||||||
|
}
|
||||||
|
if (issuu_height !== undefined) {
|
||||||
|
frame_height += '"' + issuu_height + '" ';
|
||||||
|
} else {
|
||||||
|
frame_height += '"" ';
|
||||||
|
}
|
||||||
|
issuu_frame = '<iframe type="text/html" ' + frame_width + frame_height + ' src="//e.issuu.com/embed.html#' + issuu_id + '" frameborder="0"></iframe>';
|
||||||
|
return issuu_frame;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
"fallback": function () {
|
||||||
|
"use strict";
|
||||||
|
var id = 'issuu';
|
||||||
|
tarteaucitron.fallback(['issuu_player'], function (elem) {
|
||||||
|
elem.style.width = elem.getAttribute('width') + 'px';
|
||||||
|
elem.style.height = elem.getAttribute('height') + 'px';
|
||||||
|
return tarteaucitron.engage(id);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue