You can now change engage string with the same method as other texts:

```
<script>
var tarteaucitronCustomText = {
    "engage-twitter": "Follow us on Twitter!",
};
</script>
```
This commit is contained in:
Amauri CHAMPEAUX 2018-10-03 08:25:01 +02:00 committed by GitHub
parent c31b2a1bb3
commit e20c3a90bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -1392,11 +1392,16 @@ var tarteaucitron = {
"engage": function (id) {
"use strict";
var html = '',
r = Math.floor(Math.random() * 100000);
r = Math.floor(Math.random() * 100000),
engage = tarteaucitron.services[id].name + ' ' + tarteaucitron.lang.fallback;
if (tarteaucitron.lang['engage-' + id] !== undefined) {
engage = tarteaucitron.lang['engage-' + id];
}
html += '<div class="tac_activate">';
html += ' <div class="tac_float">';
html += ' <strong>' + tarteaucitron.services[id].name + '</strong> ' + tarteaucitron.lang.fallback;
html += ' ' + engage;
html += ' <button class="tarteaucitronAllow" id="Eng' + r + 'ed' + id + '" onclick="tarteaucitron.userInterface.respond(this, true);">';
html += ' &#10003; ' + tarteaucitron.lang.allow;
html += ' </button>';