Skip to content

Commit

Permalink
Add Seamlessaccess Fix #1233
Browse files Browse the repository at this point in the history
  • Loading branch information
AmauriC committed May 21, 2024
1 parent 3894433 commit 394421a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
38 changes: 38 additions & 0 deletions tarteaucitron.services.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,44 @@ tarteaucitron.services.iframe = {
}
};

// seamlessaccess
tarteaucitron.services.seamlessaccess = {
"key": "seamlessaccess",
"type": "api",
"name": "Seamlessaccess",
"uri": "https://seamlessaccess.org/about/trust/",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
if (tarteaucitron.user.seamlessaccessInitiator === undefined) {
return;
}
var uniqIds = [];
tarteaucitron.fallback(['seamlessaccess_button'], function(x) {
var uniqId = x.getAttribute('id');
if (uniqId === undefined) {
uniqId = '_' + Math.random().toString(36).substr(2, 9);
x.setAttribute('id', uniqId);
}
uniqIds.push(uniqId);
x.innerHTML = '';
}, true);
tarteaucitron.addScript('//service.seamlessaccess.org/thiss.js', 'seamlessaccessjs', function() {
for (var i = 0; i < uniqIds.length; i += 1) {
thiss.DiscoveryComponent.render({
loginInitiatorURL: tarteaucitron.user.seamlessaccessInitiator,
}, '#' + uniqIds[i]);
}
});
},
"fallback": function () {
"use strict";
var id = 'seamlessaccess';
tarteaucitron.fallback(['seamlessaccess_button'], tarteaucitron.engage(id));
}
};

// reddit
tarteaucitron.services.reddit = {
"key": "reddit",
Expand Down
2 changes: 1 addition & 1 deletion tarteaucitron.services.min.js

Large diffs are not rendered by default.

0 comments on commit 394421a

Please sign in to comment.