Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
blazy
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
blazy
Commits
62ec0b76
Commit
62ec0b76
authored
2 months ago
by
Gaus Surahman
Browse files
Options
Downloads
Patches
Plain Diff
Added blazy bio.ajax library only if both core drupal.ajax and blazy exist.
parent
3323a373
No related branches found
No related tags found
No related merge requests found
Pipeline
#559211
passed with warnings
2 months ago
Stage: build
Stage: validate
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.txt
+5
-0
5 additions, 0 deletions
CHANGELOG.txt
src/BlazyAlter.php
+14
-2
14 additions, 2 deletions
src/BlazyAlter.php
with
19 additions
and
2 deletions
CHANGELOG.txt
+
5
−
0
View file @
62ec0b76
Blazy 3.0.x-dev, 2025-07-29
---------------------------
- Added blazy bio.ajax library only if both core drupal.ajax and blazy exist.
Blazy 3.0.x-dev, 2025-03-19
---------------------------
- git commit -m 'Issue #3513440 by bgreco: Responsive image preloads
...
...
This diff is collapsed.
Click to expand it.
src/BlazyAlter.php
+
14
−
2
View file @
62ec0b76
...
...
@@ -56,13 +56,20 @@ class BlazyAlter {
* Implements hook_library_info_alter().
*/
public
static
function
libraryInfoAlter
(
&
$libraries
,
$extension
)
:
void
{
static
$bajax
;
// @todo remove if core changed, right below core/drupal for being generic,
// and dependency-free and a dependency for many other generic ones.
// @todo watch out for core @todo to remove drupal namespace for debounce.
$debounce
=
'drupal.debounce'
;
if
(
$extension
===
'core'
&&
isset
(
$libraries
[
$debounce
]))
{
if
(
$extension
===
'core'
)
{
if
(
isset
(
$libraries
[
$debounce
]))
{
$libraries
[
$debounce
][
'js'
][
'misc/debounce.js'
]
=
[
'weight'
=>
-
16
];
}
if
(
!
isset
(
$bajax
)
&&
isset
(
$libraries
[
'drupal.ajax'
]))
{
$bajax
=
TRUE
;
}
}
if
(
$extension
===
'media'
&&
isset
(
$libraries
[
'oembed.frame'
]))
{
$libraries
[
'oembed.frame'
][
'dependencies'
][]
=
'blazy/oembed'
;
...
...
@@ -98,6 +105,11 @@ class BlazyAlter {
$libraries
[
'dblazy'
][
'dependencies'
][]
=
'blazy/dompurify'
;
}
}
// Add blazy/bio.ajax only if both core drupal.ajax and blazy exist.
if
(
isset
(
$bajax
)
&&
isset
(
$libraries
[
'load'
]))
{
$libraries
[
'load'
][
'dependencies'
][]
=
'blazy/bio.ajax'
;
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment