Optimisation

This commit is contained in:
fredtempez 2019-12-01 16:50:17 +01:00
parent 3e0525d2fe
commit 8bd34f7b44

View File

@ -1395,12 +1395,15 @@ class core extends common {
if($output['redirect']) {
// Redirection Lity
if ($output['script'] === 'redirectdatality') {
$this->addOutput ([
'content' => '<a href="' . $output['redirect'] . '" class="displayNone" data-lity id="redirectdatality">Lien</a>',
$this->addOutput ([
'script' => '$(document).on("lity:close", function(event, instance) {
location.replace("' . helper::baseURl() . '");
});
document.getElementById("redirectdatality").click();'
// Open a URL in a lightbox
var lightbox = lity("'. $output['redirect'] .'");
// Bind as an event handler
$(document).on("click", "[data-lightbox]", lity);'
]);
} else {
http_response_code(301);