Add generic iframe service
This commit is contained in:
parent
2252217234
commit
8f7523b710
|
|
@ -1,6 +1,35 @@
|
||||||
/*global tarteaucitron, ga, Shareaholic, stLight, clicky, top, google, Typekit, FB, ferankReady, IN, stButtons, twttr, PCWidget*/
|
/*global tarteaucitron, ga, Shareaholic, stLight, clicky, top, google, Typekit, FB, ferankReady, IN, stButtons, twttr, PCWidget*/
|
||||||
/*jslint regexp: true, nomen: true*/
|
/*jslint regexp: true, nomen: true*/
|
||||||
|
|
||||||
|
// generic iframe
|
||||||
|
tarteaucitron.services.iframe = {
|
||||||
|
"key": "iframe",
|
||||||
|
"type": "other",
|
||||||
|
"name": "Web content",
|
||||||
|
"uri": "",
|
||||||
|
"needConsent": true,
|
||||||
|
"cookies": [],
|
||||||
|
"js": function () {
|
||||||
|
"use strict";
|
||||||
|
tarteaucitron.fallback(['tac_iframe'], function (x) {
|
||||||
|
var width = x.getAttribute("width"),
|
||||||
|
height = x.getAttribute("height"),
|
||||||
|
url = x.getAttribute("url");
|
||||||
|
|
||||||
|
return '<iframe src="' + url + '" width="' + width + '" height="' + height + '" frameborder="0" scrolling="no" allowtransparency allowfullscreen></iframe>';
|
||||||
|
});
|
||||||
|
},
|
||||||
|
"fallback": function () {
|
||||||
|
"use strict";
|
||||||
|
var id = 'iframe';
|
||||||
|
tarteaucitron.fallback(['tac_iframe'], function (elem) {
|
||||||
|
elem.style.width = elem.getAttribute('width') + 'px';
|
||||||
|
elem.style.height = elem.getAttribute('height') + 'px';
|
||||||
|
return tarteaucitron.engage(id);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// addthis
|
// addthis
|
||||||
tarteaucitron.services.addthis = {
|
tarteaucitron.services.addthis = {
|
||||||
"key": "addthis",
|
"key": "addthis",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue