Emirates announces new flights from the UK to a winter sun paradise, giving holidaymakers more choice

Expat shares her favourite thing about living in Dubai |

GB NEWS

GB News

By GB News


Published: 03/09/2025

- 04:28

Holidaymakers have more flexibility when booking their next trip

Britons will soon have more options when travelling to Dubai as Emirates is set to launch its fourth daily service from Gatwick Airport on February 8, 2026.

The new route will use the carrier's modern Airbus A350 aircraft and bring Emirates' total London capacity to 12 daily departures, spread across three airports.


This increased frequency offers travellers more options for planning their Dubai holidays.

The evening schedule proves particularly convenient for tourists. Departing Dubai at 17:05 and arriving at Gatwick by 20:50, the timing allows holidaymakers to enjoy a full final day in the emirate before their return journey.

al mamzar beach park in Dubai

Britons will have more options when travelling to and from Dubai

|
GETTY

The new service's departure schedule has been specifically designed to accommodate both business and leisure travellers. Flight EK069 leaves Dubai at 17:05, whilst the return service EK070 departs Gatwick at 23:55.

These timings allow business travellers to complete meetings in Dubai before catching the evening flight back to London. Similarly, tourists can maximise their final day with shopping or sightseeing activities.

For those heading to Dubai, the 11:00 arrival means no waiting around to check in at hotels. Travellers can then begin their days in Dubai without losing valuable holiday time to inconvenient flight schedules.

Emirates' new aircraft comes with a lot of exciting updates. Business Class passengers will benefit from wireless charging facilities, while premium cabins have electric window blinds displaying the Emirates Ghaf tree design when closed.

Digital menus will be available through the in-flight entertainment system, and passengers can enjoy modern amenities throughout all three cabin classes.

Beyond London's three airports, Emirates maintains services to Manchester, Birmingham, Newcastle, Glasgow and Edinburgh. The airline operates various aircraft types across its British routes, including A380s and Boeing 777s alongside the newer A350s.

Dubai Marina,

Dubai is a great holiday choice for some winter sun

|
GETTY

This comes as more airlines roll out new routes going to and from the UK, giving British holidaymakers more options for their next getaway.

A new route from the UK to the 'Maldives of Europe' will begin this year on October 26, 2025. The airline already connects London Luton with Tirana, making this its second connection between the UK capital and Albania.

Flights will start at just £19.99, making this an affordable way to get some sun and discover a new part of Europe.

More From GB News
}); window.REBELMOUSE_TASKS_QUEUE.push(function(){ // // Scroll position for primary navigation // const isMobile = window.innerWidth <= 768; // let menuButtonSize = 0; // const menuButton = document.querySelector('.navbar .nav .sticky-left-click'); // if (menuButton) { // menuButtonSize = menuButton.getBoundingClientRect().width; // } // var doc_body = document.body; // var pri_nav = document.querySelector('.navbar .nav'); // // Checking active primary menu item and calculating left scroll for the navigation // if (isMobile) { // const activeMenuItem = document.querySelector('.navbar .nav .nav--item.active'); // if (activeMenuItem) { // const activeMenuItemLeftPosition = activeMenuItem.offsetLeft; // const navigation = document.querySelector('.navbar .nav'); // const navigationComputedStyles = window.getComputedStyle(navigation); // const marginLeft = parseInt(navigationComputedStyles.getPropertyValue('margin-left')); // pri_nav.scrollLeft = activeMenuItemLeftPosition - marginLeft - menuButtonSize; // } // } else if (window.sessionStorage.getItem("pri_nav_pos")) { // pri_nav.scrollLeft = window.sessionStorage.getItem("pri_nav_pos"); // } // // The logic for the secondary menu wasn't changed // if (window.sessionStorage.getItem("sec_nav_pos") && window.sessionStorage.getItem("sec_nav_wrap")) { // var scrolli__item = document.querySelector('.'+window.sessionStorage.getItem("sec_nav_wrap")+' .list'); // if (scrolli__item) { // scrolli__item.scrollLeft = window.sessionStorage.getItem("sec_nav_pos"); // } // } // var pri_nav_items = pri_nav.querySelectorAll('a'); // var sec_nav_items = document.querySelectorAll('.navbar .secondary--nav a'); // // Function to restore active navigation states after page reload // function restoreActiveNavigation() { // // Restore active primary nav item // const activePriNavItem = sessionStorage.getItem('active_pri_nav_item'); // if (activePriNavItem) { // const priElement = document.querySelector(`[data-pri-nav-id="${activePriNavItem}"]`); // if (priElement) { // // Remove active class from all primary nav items first // document.querySelectorAll('.navbar .nav .nav--item').forEach(el => { // el.classList.remove('active'); // }); // priElement.classList.add('active'); // console.log('Restored active class to primary nav:', priElement); // } // } // // Restore active secondary nav item // const activeSecNavItem = sessionStorage.getItem('active_sec_nav_item'); // if (activeSecNavItem) { // const secElement = document.querySelector(`[data-sec-nav-id="${activeSecNavItem}"]`); // if (secElement) { // // Remove active class from all secondary nav items first // document.querySelectorAll('.navbar .secondary--nav .list__item').forEach(el => { // el.classList.remove('active'); // }); // secElement.classList.add('active'); // console.log('Restored active class to secondary nav:', secElement); // } // } // } // // Add unique identifiers to navigation items // function initializeNavigationIds() { // // Add IDs to primary nav items // pri_nav_items.forEach(function(item, index) { // const navItem = item.closest('.nav--item'); // if (navItem && !navItem.hasAttribute('data-pri-nav-id')) { // navItem.setAttribute('data-pri-nav-id', `pri-nav-${index}`); // } // }); // // Add IDs to secondary nav items // sec_nav_items.forEach(function(item, index) { // if (!item.hasAttribute('data-sec-nav-id')) { // item.setAttribute('data-sec-nav-id', `sec-nav-${index}`); // } // }); // } // // Primary navigation click handlers // pri_nav_items.forEach(function(item) { // item.onclick = function(event) { // console.log('Primary nav clicked:', event.target); // const navItem = event.target.closest('.nav--item'); // if (navItem) { // // Remove active class from all primary nav items // document.querySelectorAll('.navbar .nav .nav--item').forEach(el => { // el.classList.remove('active'); // }); // // Add active class to clicked primary nav item // navItem.classList.add('active'); // // Save active primary nav item to sessionStorage // const priNavId = navItem.getAttribute('data-pri-nav-id'); // if (priNavId) { // sessionStorage.setItem('active_pri_nav_item', priNavId); // console.log('Saved active primary nav item:', priNavId); // } // // Clear secondary nav active state when primary nav changes // sessionStorage.removeItem('active_sec_nav_item'); // document.querySelectorAll('.navbar .secondary--nav .list__item').forEach(el => { // el.classList.remove('active'); // }); // } // // Original sessionStorage handling // sessionStorage.removeItem("pri_nav_pos"); // sessionStorage.removeItem("sec_nav_wrap"); // sessionStorage.removeItem("sec_nav_pos"); // window.sessionStorage.setItem("pri_nav_pos", pri_nav.scrollLeft); // } // }); // // Secondary navigation click handlers (your existing code with modifications) // sec_nav_items.forEach(function(item) { // item.onclick = function(event) { // const target = event.target; // // Remove active class from all secondary nav items in current menu // const currentSecondaryNav = target.closest('.secondary--nav'); // if (currentSecondaryNav) { // currentSecondaryNav.querySelectorAll('.list__item').forEach(el => { // el.classList.remove('active'); // }); // } // // Add active class to clicked secondary nav item // target.classList.add('active'); // // Save active secondary nav item to sessionStorage // const secNavId = target.getAttribute('data-sec-nav-id'); // if (secNavId) { // sessionStorage.setItem('active_sec_nav_item', secNavId); // } // // Reset primary nav active state (optional, depending on your logic) // document.querySelectorAll('.navbar .nav .nav--item').forEach(el => { // el.classList.remove('active'); // }); // sessionStorage.removeItem('active_pri_nav_item'); // // Store scroll positions // sessionStorage.removeItem("sec_nav_wrap"); // sessionStorage.removeItem("sec_nav_pos"); // const sec_nav_wrap = target.closest('.list'); // if (sec_nav_wrap) { // sessionStorage.setItem("sec_nav_pos", sec_nav_wrap.scrollLeft); // const navItem = sec_nav_wrap.closest('.nav--item'); // if (navItem && navItem.classList[1]) { // sessionStorage.setItem("sec_nav_wrap", navItem.classList[1]); // } // } // sessionStorage.setItem("pri_nav_pos", pri_nav.scrollLeft); // }; // }); // // Hover effects for nav items // document.querySelectorAll('.nav--item').forEach(function(item) { // var timeout = null; // var timeout2 = null; // // Uncomment if you want hover effects // // item.onmouseover = function() { // // timeout = setTimeout(function(){ // // item.classList.add('hover_active') // // }, 300); // // clearTimeout(timeout2); // // } // // item.onmouseout = function() { // // timeout2 = setTimeout(function(){ // // item.classList.remove('hover_active') // // }, 300); // // clearTimeout(timeout); // // } // }); // // Initialize navigation system // function initializeNavigation() { // initializeNavigationIds(); // restoreActiveNavigation(); // } // // Initialize when DOM is ready // if (document.readyState === 'loading') { // document.addEventListener('DOMContentLoaded', initializeNavigation); // } else { // initializeNavigation(); // } // // Opinion section scroll handling // if (window.location.search=="?opinion") { // const opinionWidget = document.querySelector('.opinion-wrapper .widget'); // if (opinionWidget) { // if (/constructor/i.test(window.HTMLElement) || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || (typeof safari !== 'undefined' && window['safari'].pushNotification))) { // opinionWidget.scrollIntoView(true); // } else if(typeof InstallTrigger !== 'undefined') { // opinionWidget.scrollIntoView(true); // } else { // opinionWidget.scrollIntoView({ // block: 'nearest', // behavior: 'smooth' // }); // } // } // } // // Delay function for mouse interactions // var delay = function (elem, callback) { // var timeout = null; // elem.onmouseover = function() { // elem.classList.add('shit') // // Set timeout to be a timer which will invoke callback after 1s // timeout = setTimeout(callback, 1000); // }; // elem.onmouseout = function() { // doc_body.classList.remove('hide-sec_nav'); // clearTimeout(timeout); // } // }; }); window.REBELMOUSE_TASKS_QUEUE.push(function(){ // Scroll position for primary navigation function init() { const isMobile = window.innerWidth <= 768; let menuButtonSize = 0; const menuButton = document.querySelector(".navbar .nav .sticky-left-click"); if (menuButton) { menuButtonSize = menuButton.getBoundingClientRect().width; } var doc_body = document.body; var pri_nav = document.querySelector(".navbar .nav"); var hamb_nav = document.querySelector(".hamburger .nav"); // Checking active primary menu item and calculating left scroll for the navigation const activeMenuItem = document.querySelector( ".navbar .nav .nav--item.active" ); if (activeMenuItem) { const activeMenuItemLeftPosition = activeMenuItem.offsetLeft; const navigation = document.querySelector(".navbar .nav"); const navigationComputedStyles = window.getComputedStyle(navigation); const marginLeft = parseInt( navigationComputedStyles.getPropertyValue("margin-left") ); pri_nav.scrollLeft = activeMenuItemLeftPosition - marginLeft - menuButtonSize; } if (!isMobile && window.sessionStorage.getItem("pri_nav_pos")) { pri_nav.scrollLeft = window.sessionStorage.getItem("pri_nav_pos"); } // The logic for the secondary menu wasn't changed if ( window.sessionStorage.getItem("sec_nav_pos") && window.sessionStorage.getItem("sec_nav_wrap") ) { var scrolli__item = document.querySelector( "." + window.sessionStorage.getItem("sec_nav_wrap") + " .list" ); if (scrolli__item) { scrolli__item.scrollLeft = window.sessionStorage.getItem("sec_nav_pos"); } } window.pri_nav_items = pri_nav.querySelectorAll("a"); window.sec_nav_items = document.querySelectorAll(".navbar .secondary--nav a"); window.hamb_nav_items = hamb_nav.querySelectorAll("a"); // Primary navigation click handlers pri_nav_items.forEach(function (item) { item.onclick = function (event) { console.log("Primary nav clicked:", event.target); const watchLive = event.target?.classList.contains('watch-live-button'); const navItem = event.target.closest(".nav--item"); if (navItem) { // Remove active class from all primary nav items (both navbar and hamburger) document.querySelectorAll(".navbar .nav .nav--item").forEach((el) => { el.classList.remove("active"); }); document .querySelectorAll(".hamburger .nav .nav--item") .forEach((el) => { el.classList.remove("active"); }); // Add active class to clicked primary nav item navItem.classList.add("active"); // Find corresponding item in hamburger menu and activate it const href = item.getAttribute("href"); const correspondingHamb = Array.from(hamb_nav_items).find( (a) => a.getAttribute("href") === href ); if (correspondingHamb) { const corrHambNavItem = correspondingHamb.closest(".nav--item"); if (corrHambNavItem) { corrHambNavItem.classList.add("active"); } } // Save active primary nav item to sessionStorage const priNavId = navItem.getAttribute("data-pri-nav-id"); if (priNavId) { if(watchLive){ let watchChannelActive = document.querySelector('.nav--item.watch--channel__active'); let activeMenuItemLeftPosition = watchChannelActive.offsetLeft; let navigation = document.querySelector(".navbar .nav"); let navigationComputedStyles = window.getComputedStyle(navigation); let marginLeft = parseInt(navigationComputedStyles.getPropertyValue("margin-left")); let targetScrollPosition = activeMenuItemLeftPosition - marginLeft - menuButtonSize; watchLiveLink = document.querySelector('.navbar .nav--item.watch--channel__active') watchLive_navId = watchLiveLink.getAttribute("data-pri-nav-id") watchLive_secId = watchLiveLink.querySelector('[aria-label="Live"]').getAttribute("data-sec-nav-id") sessionStorage.setItem("active_pri_nav_item", watchLive_navId); sessionStorage.setItem("active_sec_nav_item", watchLive_secId); window.sessionStorage.setItem("pri_nav_pos", targetScrollPosition); } else { sessionStorage.setItem("active_pri_nav_item", priNavId); console.log("Saved active primary nav item:", priNavId); } } // Clear secondary nav active state when primary nav changes if(!watchLive){ sessionStorage.removeItem("active_sec_nav_item"); } document .querySelectorAll(".navbar .secondary--nav .list__item") .forEach((el) => { el.classList.remove("active"); }); } // Original sessionStorage handling sessionStorage.removeItem("pri_nav_pos"); sessionStorage.removeItem("sec_nav_wrap"); sessionStorage.removeItem("sec_nav_pos"); if(!watchLive){ window.sessionStorage.setItem("pri_nav_pos", pri_nav.scrollLeft); } }; }); // Secondary navigation click handlers sec_nav_items.forEach(function (item) { item.onclick = function (event) { const target = event.target; // Remove active class from all secondary nav list__items document .querySelectorAll(".navbar .secondary--nav .list__item") .forEach((el) => { el.classList.remove("active"); }); // Add active class to the closest .list__item const listItem = target.closest(".list__item"); if (listItem) { listItem.classList.add("active"); } // Save active secondary nav item to sessionStorage const secNavId = target.getAttribute("data-sec-nav-id"); if (secNavId) { sessionStorage.setItem("active_sec_nav_item", secNavId); } // KEEP primary nav active and save it (if it's a sub-menu) const navItem = target.closest(".nav--item"); if (navItem) { const priNavId = navItem.getAttribute("data-pri-nav-id"); if (priNavId) { sessionStorage.setItem("active_pri_nav_item", priNavId); } } // Store scroll positions sessionStorage.removeItem("sec_nav_wrap"); sessionStorage.removeItem("sec_nav_pos"); const sec_nav_wrap = target.closest(".list"); if (sec_nav_wrap) { sessionStorage.setItem("sec_nav_pos", sec_nav_wrap.scrollLeft); const navItem = sec_nav_wrap.closest(".nav--item"); if (navItem && navItem.classList[1]) { sessionStorage.setItem("sec_nav_wrap", navItem.classList[1]); } } sessionStorage.setItem("pri_nav_pos", pri_nav.scrollLeft); }; }); // Watch Live button click handler const watchLiveButton = document.querySelector('.sticky-left .watch-live-button'); if (watchLiveButton) { watchLiveButton.onclick = function(event) { console.log('Watch Live button clicked:', event.target); // Find the nav--item with watch--channel__active active classes const watchChannelActive = document.querySelector('.nav--item.watch--channel__active.active'); if (watchChannelActive) { // Get the secondary navigation from this element const secondaryNav = watchChannelActive.querySelector('.secondary--nav'); if (secondaryNav) { // Find the active secondary nav item (Live) const activeSecondaryItem = secondaryNav.querySelector('.list__item.active'); if (activeSecondaryItem) { const secNavId = activeSecondaryItem.getAttribute('data-sec-nav-id'); if (secNavId) { sessionStorage.setItem('active_sec_nav_item', secNavId); console.log('Saved active secondary nav item from watch channel:', secNavId); } } // Save the watch channel primary nav as active const priNavId = watchChannelActive.getAttribute('data-pri-nav-id'); if (priNavId) { sessionStorage.setItem('active_pri_nav_item', priNavId); console.log('Saved active primary nav item from watch channel:', priNavId); } // Store scroll positions for secondary nav const secNavList = secondaryNav.querySelector('.list'); if (secNavList) { sessionStorage.setItem("sec_nav_pos", secNavList.scrollLeft); if (watchChannelActive.classList[1]) { sessionStorage.setItem("sec_nav_wrap", watchChannelActive.classList[1]); } } // Store primary nav scroll position sessionStorage.setItem("pri_nav_pos", pri_nav.scrollLeft); } } }; } // Hamburger navigation click handlers hamb_nav_items.forEach(function (item) { item.onclick = function (event) { console.log("Hamburger nav clicked:", event.target); const navItem = event.target.closest(".nav--item"); if (navItem) { // Remove active class from all primary nav items document.querySelectorAll(".navbar .nav .nav--item").forEach((el) => { el.classList.remove("active"); }); document .querySelectorAll(".hamburger .nav .nav--item") .forEach((el) => { el.classList.remove("active"); }); // Add active class to clicked hamburger nav item navItem.classList.add("active"); // Find corresponding item in primary nav and activate it const href = item.getAttribute("href"); const corresponding = Array.from( document.querySelectorAll(".navbar .nav .nav--item a") ).find((a) => a.getAttribute("href") === href); if (corresponding) { const corrNavItem = corresponding.closest(".nav--item"); if (corrNavItem) { corrNavItem.classList.add("active"); } } // Save active primary nav item to sessionStorage const priNavId = navItem.getAttribute("data-pri-nav-id"); if (priNavId) { sessionStorage.setItem("active_pri_nav_item", priNavId); console.log("Saved active primary nav item:", priNavId); } // Clear secondary nav active state when primary nav changes sessionStorage.removeItem("active_sec_nav_item"); document .querySelectorAll(".navbar .secondary--nav .list__item") .forEach((el) => { el.classList.remove("active"); }); } // Original sessionStorage handling sessionStorage.removeItem("pri_nav_pos"); sessionStorage.removeItem("sec_nav_wrap"); sessionStorage.removeItem("sec_nav_pos"); window.sessionStorage.setItem("pri_nav_pos", pri_nav.scrollLeft); }; }); // Hover effects for nav items document.querySelectorAll(".nav--item").forEach(function (item) { var timeout = null; var timeout2 = null; // Uncomment if you want hover effects // item.onmouseover = function() { // timeout = setTimeout(function(){ // item.classList.add('hover_active') // }, 300); // clearTimeout(timeout2); // } // item.onmouseout = function() { // timeout2 = setTimeout(function(){ // item.classList.remove('hover_active') // }, 300); // clearTimeout(timeout); // } }); } function restoreActiveNavigation() { const isMobile = window.innerWidth <= 768; if (isMobile) { console.log("Mobile detected - skipping sessionStorage restore"); return; } const activePriNavItem = sessionStorage.getItem("active_pri_nav_item"); const activeSecNavItem = sessionStorage.getItem("active_sec_nav_item"); // Always restore primary nav first (if it exists) if (activePriNavItem) { const priElement = document.querySelector( `.navbar [data-pri-nav-id="${activePriNavItem}"]` ); if (priElement) { // Clear all primary nav items document .querySelectorAll(".navbar .nav .nav--item") .forEach((el) => el.classList.remove("active")); document .querySelectorAll(".hamburger .nav .nav--item") .forEach((el) => el.classList.remove("active")); // Set primary nav as active priElement.classList.add("active"); console.log("Restored active class to primary nav:", priElement); // Activate corresponding hamburger item const priLink = priElement.querySelector("a"); if (priLink) { const href = priLink.getAttribute("href"); const correspondingHamb = Array.from(window.hamb_nav_items).find( (a) => a.getAttribute("href") === href ); if (correspondingHamb) { const corrHambNavItem = correspondingHamb.closest(".nav--item"); if (corrHambNavItem) { corrHambNavItem.classList.add("active"); console.log( "Restored active class to hamburger nav:", corrHambNavItem ); } } } } } // Then restore secondary nav (if it exists) if (activeSecNavItem) { const secElement = document.querySelector( `[data-sec-nav-id="${activeSecNavItem}"]` ); if (secElement) { document .querySelectorAll(".navbar .secondary--nav .list__item") .forEach((el) => el.classList.remove("active")); const listItem = secElement.closest(".list__item"); if (listItem) { listItem.classList.add("active"); console.log("Restored active secondary nav:", listItem); } } } } // Add unique identifiers to navigation items function initializeNavigationIds() { // Add IDs to primary nav items pri_nav_items.forEach(function (item, index) { const navItem = item.closest(".nav--item"); if (navItem && !navItem.hasAttribute("data-pri-nav-id")) { navItem.setAttribute("data-pri-nav-id", `pri-nav-${index}`); } }); // Add IDs to hamburger nav items hamb_nav_items.forEach(function (item, index) { const navItem = item.closest(".nav--item"); if (navItem && !navItem.hasAttribute("data-pri-nav-id")) { navItem.setAttribute("data-pri-nav-id", `pri-nav-${index}`); } }); // Add IDs to secondary nav items sec_nav_items.forEach(function (item, index) { if (!item.hasAttribute("data-sec-nav-id")) { item.setAttribute("data-sec-nav-id", `sec-nav-${index}`); } }); } // Initialize navigation system function initializeNavigation() { init(); initializeNavigationIds(); if(window.location.pathname === "/watch/live"){ restoreActiveNavigation(); } } // Initialize when DOM is ready // if (document.readyState === 'loading') { // document.addEventListener('DOMContentLoaded', initializeNavigation); // } else { // initializeNavigation(); // } REBELMOUSE_STDLIB.createElementChangeListener(".hamburger", function () { initializeNavigation(); }); // Opinion section scroll handling if (window.location.search == "?opinion") { const opinionWidget = document.querySelector(".opinion-wrapper .widget"); if (opinionWidget) { if ( /constructor/i.test(window.HTMLElement) || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })( !window["safari"] || (typeof safari !== "undefined" && window["safari"].pushNotification) ) ) { opinionWidget.scrollIntoView(true); } else if (typeof InstallTrigger !== "undefined") { opinionWidget.scrollIntoView(true); } else { opinionWidget.scrollIntoView({ block: "nearest", behavior: "smooth", }); } } } // Delay function for mouse interactions var delay = function (elem, callback) { var timeout = null; elem.onmouseover = function () { elem.classList.add("shit"); // Set timeout to be a timer which will invoke callback after 1s timeout = setTimeout(callback, 1000); }; elem.onmouseout = function () { doc_body.classList.remove("hide-sec_nav"); clearTimeout(timeout); }; }; }); window.REBELMOUSE_TASKS_QUEUE.push(function(){ var pri_nav = document.querySelector('.navbar .nav'); var secondary_navs = Array.from(document.querySelectorAll('.secondary--nav')); var sec_nav_left_btn = document.querySelector(".secondary--nav__arrow.left"); var sec_nav_right_btn = document.querySelector(".secondary--nav__arrow.right"); secondary_navs.map(item => { const left = sec_nav_left_btn.cloneNode(true); const right = sec_nav_right_btn.cloneNode(true); item.append(left); item.append(right) }); REBELMOUSE_STDLIB.createElementChangeListener('.primary--nav__arrow', function (item) { buttonNextPrevVisiblity(0, item, pri_nav, ""); item.addEventListener("click", function () { const scroll_distance = item.classList.contains('left') ? -(pri_nav.clientWidth) : pri_nav.clientWidth; pri_nav.scrollBy({ left: scroll_distance, behavior: 'smooth' }); buttonNextPrevVisiblity(770,item,pri_nav,item.classList.contains('left')?"left":"right") }) }) REBELMOUSE_STDLIB.createElementChangeListener('.secondary--nav .secondary--nav__arrow', function (item) { const secondary_nav = item.closest('.secondary--nav').querySelector('.list'); if (secondary_nav) { buttonNextPrevVisiblity(0, item, secondary_nav, item, ""); } item.addEventListener("click", function () { if (secondary_nav) { const scroll_distance = item.classList.contains('left') ? -calculateScrollDistance(secondary_nav) : calculateScrollDistance(secondary_nav); secondary_nav.scrollBy({ left: scroll_distance, behavior: 'smooth' }); buttonNextPrevVisiblity(770, item, secondary_nav, item.classList.contains('left') ? "left" : "right"); } }); }); function calculateScrollDistance(secondary_nav) { const navLeft = secondary_nav.getBoundingClientRect().left; window.nav_leftttt = secondary_nav; const list = secondary_nav.querySelectorAll('a'); const navWidth = secondary_nav.clientWidth; let scroll_distance = 0; let j = 0; while (j < list.length) { //debugger const item = list[j++]; const itemWidth = item.clientWidth; const itemLeft = item.getBoundingClientRect().left; if (itemWidth + 20 + scroll_distance < navWidth + 20 && (itemLeft >= navLeft && itemLeft + 2 < navWidth + navLeft)) { scroll_distance=scroll_distance+itemWidth + 20; } else if (itemWidth + 20 + scroll_distance > navWidth) { break; } } return scroll_distance; } function buttonNextPrevVisiblity(timeOffset, btn, scrolling_item, clicked) { //console.log('scrolling item scroll - ', scrolling_item.scrollWidth); if (scrolling_item.scrollWidth <= scrolling_item.clientWidth + 5 && btn.classList.contains('right')) { btn.classList.remove("hidden"); } setTimeout(sccc => { if (btn.classList.contains('left')) { //console.log('scroll left - ', scrolling_item.scrollLeft); scrolling_item.scrollLeft > 0 ? btn.classList.remove("hidden") : btn.classList.add("hidden"); } if (btn.classList.contains('right')) { if (scrolling_item.scrollWidth <= scrolling_item.clientWidth + scrolling_item.scrollLeft + 5) { btn.classList.add("hidden"); } else { btn.classList.remove("hidden"); } } if (clicked == "left") { btn.nextElementSibling.classList.remove("hidden"); } if (clicked == "right") { btn.previousElementSibling.classList.remove("hidden") } }, timeOffset); } }); window.REBELMOUSE_TASKS_QUEUE.push(function(){ REBELMOUSE_STDLIB.createElementChangeListener('.show-only-if-post-present', function (item) { if (!item.querySelector('.widget')) { item.classList.add('hidden'); if(item.nextSibling.classList.contains('ad--placeholder')){ item.nextSibling.remove(); } } }); REBELMOUSE_STDLIB.createElementChangeListener('.show-only-if-four-post-present', function (item) { if (item.querySelectorAll('.widget').length <= 3) { item.classList.add('hidden'); } }) REBELMOUSE_STDLIB.createElementChangeListener('.rebellt-ecommerce--price', function (item) { item.innerHTML = item.innerHTML.replace(/\$/g, '£'); }) }); window.REBELMOUSE_TASKS_QUEUE.push(function(){ // Piano object tp = window['tp'] || []; const addInfoToTP = () => { const preDefinedInfo = document.querySelector('.js-all-tags'); let allTags = `${preDefinedInfo.dataset.tags.replace(/[\[\]']+/g,'')}`; let primarySectionTitle = preDefinedInfo.dataset.contentSection; let postAuthor = preDefinedInfo.dataset.author; let postType = preDefinedInfo.dataset.contentType; let cd1 = preDefinedInfo.dataset.cd1; let cd2 = preDefinedInfo.dataset.cd2; let cd9 = preDefinedInfo.dataset.cd9; let cd11 = window.matchMedia('(display-mode: standalone)').matches ? 'pwa' : 'web'; // console.log(cd11); let cd12 = preDefinedInfo.dataset.cd12; let cd13 = preDefinedInfo.dataset.cd13; let cd14 = preDefinedInfo.dataset.cd14; let cd15 = preDefinedInfo.dataset.cd15; let cd16 = preDefinedInfo.dataset.cd16; let cd17 = preDefinedInfo.dataset.cd17; let cd18 = preDefinedInfo.dataset.cd18; let cd19 = document.referrer.split("/")[2] || 'not set'; let cd23 = 'not set'; let cd25 = window.navigator.userAgent; const getInfo = (string) => string.split('\':')[1].replace(/[&#,+()$~%.'"*?<>{}]/g, '').trim(); const passDataToTp = (type, data) => tp.push([type, data]); const passCustomDataToTp = (name, data) => tp.push(['setCustomVariable', name, data]); primarySectionTitle = getInfo(primarySectionTitle); passDataToTp('setContentSection', primarySectionTitle); postAuthor = getInfo(postAuthor); passDataToTp('setContentAuthor', postAuthor); postType = getInfo(postType); passCustomDataToTp('content_type', postType); cd1 = getInfo(cd1); passCustomDataToTp('cd1', cd1); cd2 = getInfo(cd2); passCustomDataToTp('cd2', cd2); cd9 = getInfo(cd9); passCustomDataToTp('cd9', cd9); passCustomDataToTp('cd11', cd11); cd12 = getInfo(cd12); passCustomDataToTp('cd12', cd12); cd13 = getInfo(cd13); passCustomDataToTp('cd13', cd13); cd14 = getInfo(cd14); passCustomDataToTp('cd14', cd14); cd15 = getInfo(cd15); passCustomDataToTp('cd15', cd15); cd16 = getInfo(cd16); passCustomDataToTp('cd16', cd16); cd17 = getInfo(cd17); passCustomDataToTp('cd17', cd17); cd18 = getInfo(cd18); passCustomDataToTp('cd18', cd18); passCustomDataToTp('cd19', cd19); passCustomDataToTp('cd23', cd23); passCustomDataToTp('cd25', cd25); return allTags.length ? passDataToTp('setTags', allTags) : false; } addInfoToTP(); });