diff --git a/apps/routerconsole/jsp/js/ajax.js b/apps/routerconsole/jsp/js/ajax.js index a07c2c4b02..d909525f68 100644 --- a/apps/routerconsole/jsp/js/ajax.js +++ b/apps/routerconsole/jsp/js/ajax.js @@ -55,7 +55,7 @@ function ajaxDone(url, target, refresh) { } } -document.addEventListener("DOMContentLoaded", function() { +function forceColorAdjustNone() { //var file = location.pathname.split("/").pop(); file = document.getElementById("pagestyle").href @@ -66,6 +66,16 @@ document.addEventListener("DOMContentLoaded", function() { link.media = "screen,print"; document.getElementsByTagName("head")[0].appendChild(link); -}) +} + +if (document.readyState == 'complete') { + forceColorAdjustNone(); +} else { + document.onreadystatechange = function() { + if (document.readyState === "complete") { + forceColorAdjustNone(); + } + } +} /* @license-end */