Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve cumulative layout shift #305

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion js/alert_banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
var cookie_tokens = typeof cookie !== 'undefined' ? cookie.split('+') : [];

$('.js-localgov-alert-banner').each(function() {
$(this).removeClass('hidden');
var token = $(this).data('dismiss-alert-token');
if ($.inArray(token, cookie_tokens) > -1) {
$(this).hide();
Expand Down
3 changes: 0 additions & 3 deletions localgov_alert_banner.module
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ function localgov_alert_banner_preprocess(&$variables) {
// Get token.
$token = $variables['elements']['#localgov_alert_banner']->getToken();

// Add a hidden class.
$variables['attributes']['class'][] = 'hidden';

// Token as attribute.
$variables['attributes']['data-dismiss-alert-token'] = $token;

Expand Down
Loading