Skip to content

Commit

Permalink
Self-hosting error placeholder image
Browse files Browse the repository at this point in the history
  • Loading branch information
verlok committed Apr 2, 2024
1 parent baa7db6 commit bdb6c7b
Show file tree
Hide file tree
Showing 32 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion demos/async.html
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ <h1>Async loading demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/async_multiple.html
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ <h1>Async loading, multiple instances demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/container_multiple.html
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ <h1>Multiple scrolling container demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/container_single.html
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ <h1>Single scrolling container demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/dynamic_content.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ <h1>Dynamic content demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/dynamic_content_nodeset.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ <h1>Dynamic content passing nodeset demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/esm.html
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ <h1>ESM version demo</h1>
};
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src = "https://via.placeholder.com/440x560/?text=Error+Placeholder";
element.src = "./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/fade_in.html
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ <h1>Fade in effect demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/hundreds.html
Original file line number Diff line number Diff line change
Expand Up @@ -3272,7 +3272,7 @@ <h1>Hundreds of items demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/iframes.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ <h1>Lazy iframes demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/image_basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ <h1>Basic demo</h1>
};
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src = "https://via.placeholder.com/440x560/?text=Error+Placeholder";
element.src = "./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/image_hidden.html
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ <h1>Hidden images demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/image_no_classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ <h1>Basic demo</h1>
};
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src = "https://via.placeholder.com/440x560/?text=Error+Placeholder";
element.src = "./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/image_ph_external.html
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ <h1>Images with external placeholder demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/image_ph_inline.html
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ <h1>Images with inline placeholder demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/image_srcset.html
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ <h1>Images with srcset without sizes demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/image_srcset_lazy_sizes.html
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ <h1>Images with srcset and lazy sizes demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/image_srcset_sizes.html
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ <h1>Images with srcset and eager sizes demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
Binary file added demos/images/440x560-ErrorPlaceholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion demos/lazily_load_lazyLoad.html
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ <h1>Lazyly load lazyload demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/lazy_functions.html
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ <h1>Lazy functions demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/load.html
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ <h1>Static load method demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/load_all.html
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ <h1>Load all demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/object.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ <h1>Lazy objects demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/picture_media.html
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ <h1>Picture with media attribute in source tags demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_cancel = function (element) {
logElementEvent("🔥 CANCEL", element);
Expand Down
2 changes: 1 addition & 1 deletion demos/picture_type_webp.html
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ <h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/popup_layer.html
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ <h1>Popup layer demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ <h1>Print demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_cancel = function (element) {
logElementEvent("🔥 CANCEL", element);
Expand Down
2 changes: 1 addition & 1 deletion demos/restore_destroy.html
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ <h1>Restore and Destroy demo</h1>
};
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src = "https://via.placeholder.com/440x560/?text=Error+Placeholder";
element.src = "./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/thresholds.html
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ <h1>Threshold and thresholds demo</h1>
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src =
"https://via.placeholder.com/440x560/?text=Error+Placeholder";
"./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/video.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ <h2>Preload = auto</h2>
};
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src = "https://via.placeholder.com/440x560/?text=Error+Placeholder";
element.src = "./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down
2 changes: 1 addition & 1 deletion demos/video_autoplay.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ <h2>Preload = auto</h2>
};
var callback_error = function (element) {
logElementEvent("💀 ERROR", element);
element.src = "https://via.placeholder.com/440x560/?text=Error+Placeholder";
element.src = "./images/440x560-ErrorPlaceholder.png";
};
var callback_finish = function () {
logElementEvent("✔️ FINISHED", document.documentElement);
Expand Down

0 comments on commit bdb6c7b

Please sign in to comment.