From 05fbca7bc11cb68c85c2b83d1f235b94adeea70b Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Sun, 6 Feb 2022 23:25:39 +0200 Subject: [PATCH] Weather: Disable scrolling in the widget --- ep_weather_host/ep_weather_provider_google_script.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ep_weather_host/ep_weather_provider_google_script.h b/ep_weather_host/ep_weather_provider_google_script.h index 85efed2..16101e7 100644 --- a/ep_weather_host/ep_weather_provider_google_script.h +++ b/ep_weather_host/ep_weather_provider_google_script.h @@ -96,6 +96,13 @@ ep_weather_part1();\n\ "; LPCWSTR ep_weather_provider_google_script2 = L"\ +function scrolldisable() {\n\ +TopScroll = window.pageYOffset || document.documentElement.scrollTop;\n\ +LeftScroll = window.pageXOffset || document.documentElement.scrollLeft;\n\ +window.onscroll = function() {\n\ +window.scrollTo(LeftScroll, TopScroll);\n\ + };\n\ +}\n\ function ep_weather_part2() {\n\ let h = document.getElementsByClassName(\"ULSxyf\")[0].offsetHeight;\n\ ////document.getElementsByClassName(\"google-weather-place\")[0].style.height = h + 'px';\n\ @@ -106,6 +113,7 @@ if (document.getElementsByClassName(\"QS5gu sy4vM\").length > 1) { document.getE //document.getElementById(\"search\").scrollIntoView(true);\n\ return ep_result;\n\ }\n\ +scrolldisable();\n\ ep_weather_part2();\n\ "; #endif \ No newline at end of file