Unify behaviour between formatters and respect the original formatter functionality when cookies are accepted

Created on 8 October 2022, about 2 years ago
Updated 8 June 2023, over 1 year ago

Problem/Motivation

Now when using the default formatter, oembed, the module adds a thumbnail and the popup is displayed inside the iframe space.
The thumbnail is added by default, but if the cookie is accepted it is not destroyed, it is always displayed.
When adding a video with oembed lazy, the module is much more respectful as it only intercepts the thumbnail events and the popu covers the whole screen. If the cookie is accepted, the behaviour and appearance is that provided by the formatter.

Proposed resolution

When using the oembed formatter, the thumbnail is added, and when clicking on it, the popup pops up covering the whole screen. As with oembed_lazy cases
Once the cookie is accepted, the elements added by the youtube cookie should be completely deleted.

Changes list:

  • Removed removePopupOnAcceptedCategory method in favour of setAcceptedCookies
  • Accept popup is always displayed in full page
  • Once YouTube Cookies is fully applied the event youtubeCookiesEnabled is launched
  • Once YouTube Cookies is removed from an iframe the event youtubeCookiesDisabled is launched
🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇪🇸Spain frouco

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024