core/includes/theme.inc | 8 -------- core/modules/system/system.module | 6 ++++++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/core/includes/theme.inc b/core/includes/theme.inc index bec6026..4d134b5 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2092,14 +2092,6 @@ function template_preprocess_html(&$variables) { } $variables['page_top'][] = array('#markup' => $page->getBodyTop()); $variables['page_bottom'][] = array('#markup' => $page->getBodyBottom()); - - // On each page that uses JavaScript, add the mandatory JavaScript Web License - // Labels link. - if (count(drupal_get_js('header')) || count(drupal_get_js('footer'))) { - $variables['page_bottom'][] = array( - '#markup' => l(t('JavaScript license information'), 'system/jslicense', array('attributes' => array('rel' => 'jslicense', 'class' => 'hidden'))), - ); - } } /** diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 1205a9c..0935a59 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -975,6 +975,12 @@ function system_page_build(&$page) { ) ); } + + // Add the JavaScript Web License Labels link to all pages. + $page['#attached']['drupal_add_html_head_link'][][] = array( + 'rel' => 'jslicense', + 'href' => \Drupal::urlGenerator()->generateFromRoute('system.javascript_license_web_labels'), + ); } /**