Commit 0168f396 authored by Simon's avatar Simon

release 1.6.6

parent ab1cb605
......@@ -149,7 +149,7 @@
<?php
endif;
?>
<script src="/wp-content/themes/biuro/js/main-d5fdceb0.min.js" async></script>
<script src="/wp-content/themes/biuro/js/main-c31866c5.min.js" async></script>
<?php
// global $time_start;
......
......@@ -748,18 +748,44 @@ document.querySelectorAll('.c-accordion--content').forEach((content) => {
content.classList.add('c-accordion--content--is-collapsed');
});
const messenger = document.querySelector('.js-share-messenger');
if (messenger) {
messenger.addEventListener('click', (e) => {
e.preventDefault();
const target = e.currentTarget;
const now = new Date().valueOf();
setTimeout(function () {
if (new Date().valueOf() - now > 100) {
return;
}
window.open(target.href, '_blank');
}, 25);
window.location = 'fb-messenger://share/?link=' + encodeURIComponent(window.location.href);
});
}
const whatsapp = document.querySelector('.js-share-whatsapp');
if (whatsapp) {
whatsapp.addEventListener('click', (e) => {
e.preventDefault();
const ua = navigator.userAgent.toLowerCase();
const target = e.currentTarget;
if (ua.indexOf('android') > -1) {
window.open('whatsapp://send?text=' + encodeURIComponent(window.location.href), '_blank');
} else {
window.open('https://wa.me/?text=' + encodeURIComponent(window.location.href), '_blank');
}
const now = new Date().valueOf();
setTimeout(function () {
if (new Date().valueOf() - now > 100) {
return;
}
window.open(target.href, '_blank');
}, 25);
window.location = 'whatsapp://send?text=' + encodeURIComponent(target.dataset.text);
});
}
......@@ -48,7 +48,7 @@
<use xlink:href="#ico--job-facebook"></use>
</svg>
</a>
<a target="_blank" rel="noopener" href="https://www.facebook.com/dialog/share?app_id=463001014486058&amp;display=popup&amp;href=<?php echo $requestURL; ?>&redirect_uri=<?php echo $requestURL; ?>" class="gtm-share-click c-share--option c-share--option-messenger" data-label="Messenger">
<a target="_blank" rel="noopener" href="https://www.facebook.com/dialog/share?app_id=463001014486058&amp;display=popup&amp;href=<?php echo $requestURL; ?>&redirect_uri=<?php echo $requestURL; ?>" class="gtm-share-click js-share-messenger c-share--option c-share--option-messenger" data-label="Messenger">
<svg width="15px" height="15px" class="c-ico--share-messenger">
<use xlink:href="#ico--job-messenger"></use>
</svg>
......@@ -66,7 +66,10 @@
<?php _e('The link copied to the clipboard', 'biuro'); ?>
</div>
</a>
<a target="_blank" rel="noopener" href="https://wa.me/?text=<?php echo urlencode($requestURL); ?>" class="js-share-whatsapp gtm-share-click c-share--option c-share--option-phone" data-label="WhatsApp">
<?php
$waText = urlencode(__('I think you might like this job offer', 'biuro') . ': ' . $requestURL);
?>
<a target="_blank" rel="noopener" href="https://wa.me/?text=<?php echo $waText; ?>" data-text="<?php echo $waText; ?>" class="js-share-whatsapp gtm-share-click c-share--option c-share--option-phone" data-label="WhatsApp">
<svg width="17px" height="18px" class="c-ico--share-whatsapp">
<use xlink:href="#ico--job-whatsapp"></use>
</svg>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment