diff --git a/kitsune/sumo/static/sumo/js/document.js b/kitsune/sumo/static/sumo/js/document.js index cbe7d941aa9..877b781148d 100644 --- a/kitsune/sumo/static/sumo/js/document.js +++ b/kitsune/sumo/static/sumo/js/document.js @@ -27,3 +27,19 @@ function addReferrerAndQueryToVoteForm() { .append($('').attr("value", referrer)) .append($('').attr("value", query)); } + +// For this singular document, we are going to load +// all images and then scroll to the anchor. +// TODO: We need a fix for the whole KB that won't +// break the lazy loading. +$(window).on("load", function() { + if(window.location.href.indexOf("relay-integration") > -1) { + $("img.lazy").loadnow(); // Load all images + // Wait for all content (including images) to load + var hash = window.location.hash; + window.location.hash = ""; // Clear the hash initially + setTimeout(function() { + window.location.hash = hash; // Restore the hash after all images are loaded + }, 0); + } +}); \ No newline at end of file