From 968d969df60a8d62c2994c46bc913e67494b5a70 Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Fri, 21 Apr 2023 21:49:01 -0700 Subject: [PATCH 1/3] Weather: Fixed widget failing to load when using the Microsoft icon pack Unfortunately, besides updating the code to work with Google's latest changes, commit 2a1aad2 introduced a bug when using the Microsoft icon pack that prevented the widget from loading. Thus, this commit: * Fixes that (there was no need for `getElementById('wob_tci').children[0]` apparently) * Besides checking for blobs in `src`, it also checks for image names, since `wob_tci` (main icon) still contains a URL, not a blob * Fixes `wob_tci` to update with proper icon when interacting with the widget, for example when selecting a day with a different forecast than the current conditions * Simplifies some logic, seems the widget works fine without it Hopefully this fixes the widget properly. --- .../ep_weather_provider_google_script.h | 141 ++++-------------- 1 file changed, 33 insertions(+), 108 deletions(-) diff --git a/ep_weather_host/ep_weather_provider_google_script.h b/ep_weather_host/ep_weather_provider_google_script.h index 70a2bbd55..2ed7f8ea6 100644 --- a/ep_weather_host/ep_weather_provider_google_script.h +++ b/ep_weather_host/ep_weather_provider_google_script.h @@ -170,182 +170,107 @@ is_day1 = IsDay(0, 0, 0);\n\ "; LPCWSTR ep_weather_provider_google_script010 = L"\ -var im = document.getElementById('wob_tci').children[0];\n\ function replaceImage(im, is_day) {\n\ var final_img = 0;\n\ -if (im.src) {\n\ -if ( im.src.endsWith('AAAAAAAAAAAAAAAA+Pf6Bm5v6/1bJGiwAAAAAElFTkSuQmCC') || im.src.endsWith('MYe78v+ACIiACIiACJTEEyDCTi8sMWUSAAAAAElFTkSuQmCC')) {\n\ +if (!im.src) { return; }\n\ +if ( im.src.endsWith('/sunny_s_cloudy.png') || im.src.endsWith('AAAAAAAAAAAAAAAA+Pf6Bm5v6/1bJGiwAAAAAElFTkSuQmCC') || im.src.endsWith('MYe78v+ACIiACIiACJTEEyDCTi8sMWUSAAAAAElFTkSuQmCC')) {\n\ if (is_day) final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949438-4e0c0e0d-67bc-4c76-b75e-e0ffcead3f48.png');\n\ else final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949442-63f14d44-ec0e-40b2-aa1b-8e4a27ec10f5.png');\n\ -} else if (im.src.endsWith('Ls8fJgAAAAAAAADg1nkDlR7XfJiH1ggAAAAASUVORK5CYII=') || im.src.endsWith('NzjYbzHpLqUCFKCAJfkAq7RimK7qUtAAAAAASUVORK5CYII=')) {\n\ +} else if (im.src.endsWith('/sunny.png') || im.src.endsWith('Ls8fJgAAAAAAAADg1nkDlR7XfJiH1ggAAAAASUVORK5CYII=') || im.src.endsWith('NzjYbzHpLqUCFKCAJfkAq7RimK7qUtAAAAAASUVORK5CYII=')) {\n\ if (is_day) final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949449-9320c6f5-15ef-4c17-9e72-740708f4828c.png');\n\ else final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949451-269d02a3-08cb-4237-9789-f1e60fdc723d.png');\n\ -} else if (im.src.endsWith('AiAAAiAAAiAAAiAAl48fFVnRpiVnD+AAAAAASUVORK5CYII=') || im.src.endsWith('gAAIgAAIgAAIgAC86wECCuvGtH3EIQAAAABJRU5ErkJggg==')) {\n\ +} else if (im.src.endsWith('/cloudy.png') || im.src.endsWith('AiAAAiAAAiAAAiAAl48fFVnRpiVnD+AAAAAASUVORK5CYII=') || im.src.endsWith('gAAIgAAIgAAIgAC86wECCuvGtH3EIQAAAABJRU5ErkJggg==')) {\n\ if (is_day) final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949452-f347fe27-5005-48f2-9c9a-899bb7b8825e.png');\n\ else final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949452-f347fe27-5005-48f2-9c9a-899bb7b8825e.png');\n\ -} else if (im.src.endsWith('CQABIAAEgAAQAAJAAB6iPy4FckaI/hnJAAAAAElFTkSuQmCC') || im.src.endsWith('lFRe7S+mBtAAGkADeFsvKpKWeAy6FowAAAAASUVORK5CYII=')) {\n\ +} else if (im.src.endsWith('/rain_s_cloudy.png') || im.src.endsWith('CQABIAAEgAAQAAJAAB6iPy4FckaI/hnJAAAAAElFTkSuQmCC') || im.src.endsWith('lFRe7S+mBtAAGkADeFsvKpKWeAy6FowAAAAASUVORK5CYII=')) {\n\ if (is_day) final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949458-dc66775d-8bb9-4d04-838e-7f550d305c26.png');\n\ else final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949458-dc66775d-8bb9-4d04-838e-7f550d305c26.png');\n\ -} else if (im.src.endsWith('1S6F6f8CBIAAEAACcEP9AsAciK6YtipuAAAAAElFTkSuQmCC') || im.src.endsWith('A8DsIAvZ0J98BEAA//oBqG5a70gUjuIAAAAASUVORK5CYII=')) {\n\ +} else if (im.src.endsWith('/cloudy_s_rain.png') || im.src.endsWith('1S6F6f8CBIAAEAACcEP9AsAciK6YtipuAAAAAElFTkSuQmCC') || im.src.endsWith('A8DsIAvZ0J98BEAA//oBqG5a70gUjuIAAAAASUVORK5CYII=')) {\n\ if (is_day) final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949458-dc66775d-8bb9-4d04-838e-7f550d305c26.png');\n\ else final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949458-dc66775d-8bb9-4d04-838e-7f550d305c26.png');\n\ -} else if (im.src.endsWith('LTAzVDExOjEzOjA0KzAyOjAw/lWSQAAAAABJRU5ErkJggg==') || im.src.endsWith('LTAzVDExOjEzOjA0KzAyOjAw/lWSQAAAAABJRU5ErkJggg==')) {\n\ +} else if (im.src.endsWith('/rain_light.png') || im.src.endsWith('LTAzVDExOjEzOjA0KzAyOjAw/lWSQAAAAABJRU5ErkJggg==') || im.src.endsWith('LTAzVDExOjEzOjA0KzAyOjAw/lWSQAAAAABJRU5ErkJggg==')) {\n\ if (is_day) final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949458-dc66775d-8bb9-4d04-838e-7f550d305c26.png');\n\ else final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949458-dc66775d-8bb9-4d04-838e-7f550d305c26.png');\n\ -} else if (im.src.endsWith('FEABFEABFEABFOB3fgDsHp230RVQOwAAAABJRU5ErkJggg==') || im.src.endsWith('MeRa9W/WClABKkAFiKofRnoGaQBkK9wAAAAASUVORK5CYII=')) {\n\ +} else if (im.src.endsWith('/rain.png') || im.src.endsWith('FEABFEABFEABFOB3fgDsHp230RVQOwAAAABJRU5ErkJggg==') || im.src.endsWith('MeRa9W/WClABKkAFiKofRnoGaQBkK9wAAAAASUVORK5CYII=')) {\n\ if (is_day) final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949460-7c132d89-efb7-457f-8810-9bf235f5737f.png');\n\ else final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949460-7c132d89-efb7-457f-8810-9bf235f5737f.png');\n\ -} else if (im.src.endsWith('oP1rrAFoABqABqAS/QFSaJKDZ1ZY3QAAAABJRU5ErkJggg==') || im.src.endsWith('U4t1idb1T/0FcAF86g/VgX+0644VVAAAAABJRU5ErkJggg==')) {\n\ +} else if (im.src.endsWith('/rain_heavy.png') || im.src.endsWith('oP1rrAFoABqABqAS/QFSaJKDZ1ZY3QAAAABJRU5ErkJggg==') || im.src.endsWith('U4t1idb1T/0FcAF86g/VgX+0644VVAAAAABJRU5ErkJggg==')) {\n\ if (is_day) final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949460-7c132d89-efb7-457f-8810-9bf235f5737f.png');\n\ else final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949460-7c132d89-efb7-457f-8810-9bf235f5737f.png');\n\ -} else if (im.src.endsWith('6n+NVQAVQAVQAfwS/QNrOJYuXyjUGAAAAABJRU5ErkJggg==') || im.src.endsWith('DTTcSfRpAO//1L8B/hnAD9B4AcpTDEFdAAAAAElFTkSuQmCC')) {\n\ +} else if (im.src.endsWith('/thunderstorms.png') || im.src.endsWith('6n+NVQAVQAVQAfwS/QNrOJYuXyjUGAAAAABJRU5ErkJggg==') || im.src.endsWith('DTTcSfRpAO//1L8B/hnAD9B4AcpTDEFdAAAAAElFTkSuQmCC')) {\n\ if (is_day) final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949450-7e03a3f5-580e-4414-aaeb-3a0898afd1da.png');\n\ else final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949450-7e03a3f5-580e-4414-aaeb-3a0898afd1da.png');\n\ -} else if (im.src.endsWith('gAAQAAJAAAgAASAATqNfCT6dqrbpoPYAAAAASUVORK5CYII=') || im.src.endsWith('VwAEQAAEQAAEQAD+KcA3AodABBLnBp0AAAAASUVORK5CYII=')) {\n\ +} else if (im.src.endsWith('/cloudy_s_sunny.png') || im.src.endsWith('gAAQAAJAAAgAASAATqNfCT6dqrbpoPYAAAAASUVORK5CYII=') || im.src.endsWith('VwAEQAAEQAAEQAD+KcA3AodABBLnBp0AAAAASUVORK5CYII=')) {\n\ if (is_day) final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949462-f50c21dd-85dd-4d9c-a4eb-516e6cddfb1f.png');\n\ else final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949463-a427edfb-3d7f-4167-bd6f-f5019c482ea1.png');\n\ "; LPCWSTR ep_weather_provider_google_script011 = L"\ -} else if (im.src.endsWith('AlAACkABKAAFoABOp1+6Bd0LJ+BorgAAAABJRU5ErkJggg==') || im.src.endsWith('UD8fqAJVoApUgSrwqfwCJ6xaZshM+xMAAAAASUVORK5CYII=')) {\n\ +} else if (im.src.endsWith('/partly_cloudy.png') || im.src.endsWith('AlAACkABKAAFoABOp1+6Bd0LJ+BorgAAAABJRU5ErkJggg==') || im.src.endsWith('UD8fqAJVoApUgSrwqfwCJ6xaZshM+xMAAAAASUVORK5CYII=')) {\n\ if (is_day) final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949465-54dd31c6-7e3a-464a-8e64-8b54b6fb7a65.png');\n\ else final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949461-1f058cf3-6fdd-4aeb-80b7-68fa27b02845.png');\n\ -} else if (im.src.endsWith('+/JUWP5fQAAIAAEgAA6iPyWP6kEiMYUSAAAAAElFTkSuQmCC') || im.src.endsWith('EphMZLo+8U++KBAFpnwBEAqlYwd30/wAAAAASUVORK5CYII=')) {\n\ +} else if (im.src.endsWith('/sunny_s_rain.png') || im.src.endsWith('+/JUWP5fQAAIAAEgAA6iPyWP6kEiMYUSAAAAAElFTkSuQmCC') || im.src.endsWith('EphMZLo+8U++KBAFpnwBEAqlYwd30/wAAAAASUVORK5CYII=')) {\n\ if (is_day) final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949443-062a0fa9-88c1-4e07-b6b1-8e52ff64f4f3.png');\n\ else final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949444-d3aea936-4c22-4f17-a201-02155396684d.png');\n\ -} else if (im.src.endsWith('gAgQASJABIgAESACXpxfGkmKjZKKoRQAAAAASUVORK5CYII=') || im.src.endsWith('S30fyJ+YskAWyAJZIIUf+u496Ifu2YkAAAAASUVORK5CYII=')) {\n\ +} else if (im.src.endsWith('/rain_s_sunny.png') || im.src.endsWith('gAgQASJABIgAESACXpxfGkmKjZKKoRQAAAAASUVORK5CYII=') || im.src.endsWith('S30fyJ+YskAWyAJZIIUf+u496Ifu2YkAAAAASUVORK5CYII=')) {\n\ if (is_day) final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949443-062a0fa9-88c1-4e07-b6b1-8e52ff64f4f3.png');\n\ else final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949444-d3aea936-4c22-4f17-a201-02155396684d.png');\n\ -} else if (im.src.endsWith('/wsIQAACEIAABCCAb6hfRzSoz4hgnE4AAAAASUVORK5CYII=') || im.src.endsWith('EC30ZRbiv5QMwAAM8PF6AtMRIwMJwimNAAAAAElFTkSuQmCC')) {\n\ +} else if (im.src.endsWith('/fog.png') || im.src.endsWith('/wsIQAACEIAABCCAb6hfRzSoz4hgnE4AAAAASUVORK5CYII=') || im.src.endsWith('EC30ZRbiv5QMwAAM8PF6AtMRIwMJwimNAAAAAElFTkSuQmCC')) {\n\ if (is_day) final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949454-81d5d47d-1f33-4859-a112-5a64ceb549a1.png');\n\ else final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949454-81d5d47d-1f33-4859-a112-5a64ceb549a1.png');\n\ -} else if (im.src.endsWith('dMq/xgqAAqAAKABW4g+Q1luByt+ugAAAAABJRU5ErkJggg==') || im.src.endsWith('kKRD6Xzx+qvBCyCw/ABgjEYCwIT8wQAAAABJRU5ErkJggg==')) {\n\ +} else if (im.src.endsWith('/snow.png') || im.src.endsWith('dMq/xgqAAqAAKABW4g+Q1luByt+ugAAAAABJRU5ErkJggg==') || im.src.endsWith('kKRD6Xzx+qvBCyCw/ABgjEYCwIT8wQAAAABJRU5ErkJggg==')) {\n\ if (is_day) final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949459-dfe70eba-6c2c-4b1c-b51b-27c13ce7c08c.png');\n\ else final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949459-dfe70eba-6c2c-4b1c-b51b-27c13ce7c08c.png');\n\ -} else if (im.src.endsWith('+jJWB6R/m0sAEoAEIBb7BcA+hV/gbM+pAAAAAElFTkSuQmCC') || im.src.endsWith('cUH9DYB6xvNfDZ4GIuMbUY1SYGBaleEAAAAASUVORK5CYII=')) {\n\ +} else if (im.src.endsWith('/snow_heavy.png') || im.src.endsWith('+jJWB6R/m0sAEoAEIBb7BcA+hV/gbM+pAAAAAElFTkSuQmCC') || im.src.endsWith('cUH9DYB6xvNfDZ4GIuMbUY1SYGBaleEAAAAASUVORK5CYII=')) {\n\ if (is_day) final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949456-04a4bdbd-ff3b-4484-bb30-8909baff8aa8.png');\n\ else final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949456-04a4bdbd-ff3b-4484-bb30-8909baff8aa8.png');\n\ -} else if (im.src.endsWith('AP5lhgAEIAABCEAAAnzlBYgKVujL4rwkAAAAAElFTkSuQmCC') || im.src.endsWith('88Tmfn8L1e/EFVABFZA0LkcjEH9Eoxa+AAAAAElFTkSuQmCC')) {\n\ +} else if (im.src.endsWith('/snow_light.png') || im.src.endsWith('AP5lhgAEIAABCEAAAnzlBYgKVujL4rwkAAAAAElFTkSuQmCC') || im.src.endsWith('88Tmfn8L1e/EFVABFZA0LkcjEH9Eoxa+AAAAAElFTkSuQmCC')) {\n\ if (is_day) final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949459-dfe70eba-6c2c-4b1c-b51b-27c13ce7c08c.png');\n\ else final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949459-dfe70eba-6c2c-4b1c-b51b-27c13ce7c08c.png');\n\ -} else if (im.src.endsWith('SwMAAAAAAAAAAAAAAFxEL1Fe7CEOIBaKAAAAAElFTkSuQmCC') || im.src.endsWith('lfcC1L+YKkAFqAAVIFa/mfArO5CvUjAAAAAASUVORK5CYII=')) {\n\ +} else if (im.src.endsWith('/snow_s_cloudy.png') || im.src.endsWith('SwMAAAAAAAAAAAAAAFxEL1Fe7CEOIBaKAAAAAElFTkSuQmCC') || im.src.endsWith('lfcC1L+YKkAFqAAVIFa/mfArO5CvUjAAAAAASUVORK5CYII=')) {\n\ if (is_day) final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949447-a6658710-567e-4977-9316-a80007df3076.png');\n\ else final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949448-cd1b69af-4028-4153-8e40-288526577b58.png');\n\ -} else if (im.src.endsWith('+Lc4AAAAAAAAAAAA+AGv/oIwYDUGyQAAAABJRU5ErkJggg==') || im.src.endsWith('1/kcsNXU/8gqQAWoAGXpGzmRTGmgvhAvAAAAAElFTkSuQmCC')) {\n\ +} else if (im.src.endsWith('/snow_s_rain.png') || im.src.endsWith('+Lc4AAAAAAAAAAAA+AGv/oIwYDUGyQAAAABJRU5ErkJggg==') || im.src.endsWith('1/kcsNXU/8gqQAWoAGXpGzmRTGmgvhAvAAAAAElFTkSuQmCC')) {\n\ if (is_day) final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156950233-ccaadb4a-2e9a-4934-b41c-acd36a7f0d9c.png');\n\ else final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156950233-ccaadb4a-2e9a-4934-b41c-acd36a7f0d9c.png');\n\ -} else if (im.src.endsWith('ASAABIAAEAACQABepj8dv4hCnMCVbgAAAABJRU5ErkJggg==') || im.src.endsWith('EuzIGPqHhgAIgAAIAE1vnG7TKhwgdU4AAAAASUVORK5CYII=')) {\n\ +} else if (im.src.endsWith('/cloudy_s_snow.png') || im.src.endsWith('ASAABIAAEAACQABepj8dv4hCnMCVbgAAAABJRU5ErkJggg==') || im.src.endsWith('EuzIGPqHhgAIgAAIAE1vnG7TKhwgdU4AAAAASUVORK5CYII=')) {\n\ if (is_day) final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949447-a6658710-567e-4977-9316-a80007df3076.png');\n\ else final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949448-cd1b69af-4028-4153-8e40-288526577b58.png');\n\ -} else if (im.src.endsWith('ABAAAkAACAABIAAEwIfoF/D2gpORVfhJAAAAAElFTkSuQmCC') || im.src.endsWith('i/HUv5gqQAWoABUgWj/U6dmtXHN0sAAAAABJRU5ErkJggg==')) {\n\ +} else if (im.src.endsWith('/rain_s_snow.png') || im.src.endsWith('ABAAAkAACAABIAAEwIfoF/D2gpORVfhJAAAAAElFTkSuQmCC') || im.src.endsWith('i/HUv5gqQAWoABUgWj/U6dmtXHN0sAAAAABJRU5ErkJggg==')) {\n\ if (is_day) final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949445-60d12efa-a21d-40e0-b9a8-1b7a84e58944.png');\n\ else final_img = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949445-60d12efa-a21d-40e0-b9a8-1b7a84e58944.png');\n\ }\n\ +if (final_img != 0) {\n\ + if (im.id != document.getElementById('wob_tci').id) { im.width = 48; im.height = 48; }\n\ + im.src = final_img;\n\ +}\n\ }\n\ "; LPCWSTR ep_weather_provider_google_script020 = L"\ -if (final_img != 0) {\n\ - if (im.id == document.getElementById('wob_tci').children[0].id) {\n\ - final_img2 = final_img;\n\ - final_int = setInterval(ep_set_final_img, 5000);\n\ -\n\ -var final_img3 = 0;\n\ -if (im.src) {\n\ -if ( im.src.endsWith('AAAAAAAAAAAAAAAA+Pf6Bm5v6/1bJGiwAAAAAElFTkSuQmCC') || im.src.endsWith('MYe78v+ACIiACIiACJTEEyDCTi8sMWUSAAAAAElFTkSuQmCC')) {\n\ - if (is_day) final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949438-4e0c0e0d-67bc-4c76-b75e-e0ffcead3f48.png');\n\ - else final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949442-63f14d44-ec0e-40b2-aa1b-8e4a27ec10f5.png');\n\ -} else if (im.src.endsWith('Ls8fJgAAAAAAAADg1nkDlR7XfJiH1ggAAAAASUVORK5CYII=') || im.src.endsWith('NzjYbzHpLqUCFKCAJfkAq7RimK7qUtAAAAAASUVORK5CYII=')) {\n\ - if (is_day) final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949449-9320c6f5-15ef-4c17-9e72-740708f4828c.png');\n\ - else final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949451-269d02a3-08cb-4237-9789-f1e60fdc723d.png');\n\ -} else if (im.src.endsWith('AiAAAiAAAiAAAiAAl48fFVnRpiVnD+AAAAAASUVORK5CYII=') || im.src.endsWith('gAAIgAAIgAAIgAC86wECCuvGtH3EIQAAAABJRU5ErkJggg==')) {\n\ - if (is_day) final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949452-f347fe27-5005-48f2-9c9a-899bb7b8825e.png');\n\ - else final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949452-f347fe27-5005-48f2-9c9a-899bb7b8825e.png');\n\ -} else if (im.src.endsWith('CQABIAAEgAAQAAJAAB6iPy4FckaI/hnJAAAAAElFTkSuQmCC') || im.src.endsWith('lFRe7S+mBtAAGkADeFsvKpKWeAy6FowAAAAASUVORK5CYII=')) {\n\ - if (is_day) final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949458-dc66775d-8bb9-4d04-838e-7f550d305c26.png');\n\ - else final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949458-dc66775d-8bb9-4d04-838e-7f550d305c26.png');\n\ -} else if (im.src.endsWith('1S6F6f8CBIAAEAACcEP9AsAciK6YtipuAAAAAElFTkSuQmCC') || im.src.endsWith('A8DsIAvZ0J98BEAA//oBqG5a70gUjuIAAAAASUVORK5CYII=')) {\n\ - if (is_day) final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949458-dc66775d-8bb9-4d04-838e-7f550d305c26.png');\n\ - else final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949458-dc66775d-8bb9-4d04-838e-7f550d305c26.png');\n\ -} else if (im.src.endsWith('LTAzVDExOjEzOjA0KzAyOjAw/lWSQAAAAABJRU5ErkJggg==') || im.src.endsWith('LTAzVDExOjEzOjA0KzAyOjAw/lWSQAAAAABJRU5ErkJggg==')) {\n\ - if (is_day) final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949458-dc66775d-8bb9-4d04-838e-7f550d305c26.png');\n\ - else final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949458-dc66775d-8bb9-4d04-838e-7f550d305c26.png');\n\ -} else if (im.src.endsWith('FEABFEABFEABFOB3fgDsHp230RVQOwAAAABJRU5ErkJggg==') || im.src.endsWith('MeRa9W/WClABKkAFiKofRnoGaQBkK9wAAAAASUVORK5CYII=')) {\n\ - if (is_day) final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949460-7c132d89-efb7-457f-8810-9bf235f5737f.png');\n\ - else final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949460-7c132d89-efb7-457f-8810-9bf235f5737f.png');\n\ -} else if (im.src.endsWith('oP1rrAFoABqABqAS/QFSaJKDZ1ZY3QAAAABJRU5ErkJggg==') || im.src.endsWith('U4t1idb1T/0FcAF86g/VgX+0644VVAAAAABJRU5ErkJggg==')) {\n\ - if (is_day) final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949460-7c132d89-efb7-457f-8810-9bf235f5737f.png');\n\ - else final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949460-7c132d89-efb7-457f-8810-9bf235f5737f.png');\n\ -} else if (im.src.endsWith('6n+NVQAVQAVQAfwS/QNrOJYuXyjUGAAAAABJRU5ErkJggg==') || im.src.endsWith('DTTcSfRpAO//1L8B/hnAD9B4AcpTDEFdAAAAAElFTkSuQmCC')) {\n\ - if (is_day) final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949450-7e03a3f5-580e-4414-aaeb-3a0898afd1da.png');\n\ - else final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949450-7e03a3f5-580e-4414-aaeb-3a0898afd1da.png');\n\ -} else if (im.src.endsWith('gAAQAAJAAAgAASAATqNfCT6dqrbpoPYAAAAASUVORK5CYII=') || im.src.endsWith('VwAEQAAEQAAEQAD+KcA3AodABBLnBp0AAAAASUVORK5CYII=')) {\n\ - if (is_day) final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949462-f50c21dd-85dd-4d9c-a4eb-516e6cddfb1f.png');\n\ - else final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949463-a427edfb-3d7f-4167-bd6f-f5019c482ea1.png');\n\ "; LPCWSTR ep_weather_provider_google_script021 = L"\ -} else if (im.src.endsWith('AlAACkABKAAFoABOp1+6Bd0LJ+BorgAAAABJRU5ErkJggg==') || im.src.endsWith('UD8fqAJVoApUgSrwqfwCJ6xaZshM+xMAAAAASUVORK5CYII=')) {\n\ - if (is_day) final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949465-54dd31c6-7e3a-464a-8e64-8b54b6fb7a65.png');\n\ - else final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949461-1f058cf3-6fdd-4aeb-80b7-68fa27b02845.png');\n\ -} else if (im.src.endsWith('+/JUWP5fQAAIAAEgAA6iPyWP6kEiMYUSAAAAAElFTkSuQmCC') || im.src.endsWith('EphMZLo+8U++KBAFpnwBEAqlYwd30/wAAAAASUVORK5CYII=')) {\n\ - if (is_day) final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949443-062a0fa9-88c1-4e07-b6b1-8e52ff64f4f3.png');\n\ - else final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949444-d3aea936-4c22-4f17-a201-02155396684d.png');\n\ -} else if (im.src.endsWith('gAgQASJABIgAESACXpxfGkmKjZKKoRQAAAAASUVORK5CYII=') || im.src.endsWith('S30fyJ+YskAWyAJZIIUf+u496Ifu2YkAAAAASUVORK5CYII=')) {\n\ - if (is_day) final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949443-062a0fa9-88c1-4e07-b6b1-8e52ff64f4f3.png');\n\ - else final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949444-d3aea936-4c22-4f17-a201-02155396684d.png');\n\ -} else if (im.src.endsWith('/wsIQAACEIAABCCAb6hfRzSoz4hgnE4AAAAASUVORK5CYII=') || im.src.endsWith('EC30ZRbiv5QMwAAM8PF6AtMRIwMJwimNAAAAAElFTkSuQmCC')) {\n\ - if (is_day) final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949454-81d5d47d-1f33-4859-a112-5a64ceb549a1.png');\n\ - else final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949454-81d5d47d-1f33-4859-a112-5a64ceb549a1.png');\n\ -} else if (im.src.endsWith('dMq/xgqAAqAAKABW4g+Q1luByt+ugAAAAABJRU5ErkJggg==') || im.src.endsWith('kKRD6Xzx+qvBCyCw/ABgjEYCwIT8wQAAAABJRU5ErkJggg==')) {\n\ - if (is_day) final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949459-dfe70eba-6c2c-4b1c-b51b-27c13ce7c08c.png');\n\ - else final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949459-dfe70eba-6c2c-4b1c-b51b-27c13ce7c08c.png');\n\ -} else if (im.src.endsWith('+jJWB6R/m0sAEoAEIBb7BcA+hV/gbM+pAAAAAElFTkSuQmCC') || im.src.endsWith('cUH9DYB6xvNfDZ4GIuMbUY1SYGBaleEAAAAASUVORK5CYII=')) {\n\ - if (is_day) final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949456-04a4bdbd-ff3b-4484-bb30-8909baff8aa8.png');\n\ - else final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949456-04a4bdbd-ff3b-4484-bb30-8909baff8aa8.png');\n\ -} else if (im.src.endsWith('AP5lhgAEIAABCEAAAnzlBYgKVujL4rwkAAAAAElFTkSuQmCC') || im.src.endsWith('88Tmfn8L1e/EFVABFZA0LkcjEH9Eoxa+AAAAAElFTkSuQmCC')) {\n\ - if (is_day) final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949459-dfe70eba-6c2c-4b1c-b51b-27c13ce7c08c.png');\n\ - else final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949459-dfe70eba-6c2c-4b1c-b51b-27c13ce7c08c.png');\n\ -} else if (im.src.endsWith('SwMAAAAAAAAAAAAAAFxEL1Fe7CEOIBaKAAAAAElFTkSuQmCC') || im.src.endsWith('lfcC1L+YKkAFqAAVIFa/mfArO5CvUjAAAAAASUVORK5CYII=')) {\n\ - if (is_day) final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949447-a6658710-567e-4977-9316-a80007df3076.png');\n\ - else final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949448-cd1b69af-4028-4153-8e40-288526577b58.png');\n\ -} else if (im.src.endsWith('+Lc4AAAAAAAAAAAA+AGv/oIwYDUGyQAAAABJRU5ErkJggg==') || im.src.endsWith('1/kcsNXU/8gqQAWoAGXpGzmRTGmgvhAvAAAAAElFTkSuQmCC')) {\n\ - if (is_day) final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156950233-ccaadb4a-2e9a-4934-b41c-acd36a7f0d9c.png');\n\ - else final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156950233-ccaadb4a-2e9a-4934-b41c-acd36a7f0d9c.png');\n\ -} else if (im.src.endsWith('ASAABIAAEAACQABepj8dv4hCnMCVbgAAAABJRU5ErkJggg==') || im.src.endsWith('EuzIGPqHhgAIgAAIAE1vnG7TKhwgdU4AAAAASUVORK5CYII=')) {\n\ - if (is_day) final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949447-a6658710-567e-4977-9316-a80007df3076.png');\n\ - else final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949448-cd1b69af-4028-4153-8e40-288526577b58.png');\n\ -} else if (im.src.endsWith('ABAAAkAACAABIAAEwIfoF/D2gpORVfhJAAAAAElFTkSuQmCC') || im.src.endsWith('i/HUv5gqQAWoABUgWj/U6dmtXHN0sAAAAABJRU5ErkJggg==')) {\n\ - if (is_day) final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949445-60d12efa-a21d-40e0-b9a8-1b7a84e58944.png');\n\ - else final_img3 = ep_download_image_blob('https://user-images.githubusercontent.com/6503598/156949445-60d12efa-a21d-40e0-b9a8-1b7a84e58944.png');\n\}\n\ -}\n\ -\n\ - if (final_img3 != 0) { final_im = new Image(); final_im.src = final_img3; }\n\ - }\n\ - if (im.id != document.getElementById('wob_tci').children[0].id) { im.width = 48; im.height = 48; }\n\ - im.src = final_img;\n\ -}\n\ -}\n\ "; LPCWSTR ep_weather_provider_google_script03 = L"\ -replaceImage(document.getElementById('wob_tci').children[0], is_day1);\n\ +replaceImage(document.getElementById('wob_tci'), is_day1);\n\ for (const element of document.getElementsByClassName(\"uW5pk\")){ replaceImage(element.children[0], 1); }\n\ var observer = new MutationObserver((changes) => {\n\ changes.forEach(change => {\n\ - if(change.attributeName.includes('src') && document.getElementById('wob_tci').children[0].src.includes('data:image/png;base64,')){\n\ + if(change.attributeName.includes('src') && (document.getElementById('wob_tci').src.includes('gstatic.com') || document.getElementById('wob_tci').src.includes('data:image/png;base64,'))){\n\ let includes_time = document.getElementById(\"wob_dts\").innerText.includes(\":\");\n\ if (includes_time) {\n\ let sp = document.getElementById(\"wob_dts\").innerText.split(':');\n\ let hrs = parseInt(sp[0].split(' ')[1]);\n\ let mins = parseInt(sp[1]);\n\ - if (is_first_time) { replaceImage(document.getElementById('wob_tci').children[0], is_day1); is_first_time = 0 }\n\ - else replaceImage(document.getElementById('wob_tci').children[0], IsDay(1, hrs, mins));\n\ - } else { replaceImage(document.getElementById('wob_tci').children[0], 1); }\n\ + if (is_first_time) { replaceImage(document.getElementById('wob_tci'), is_day1); is_first_time = 0 }\n\ + else replaceImage(document.getElementById('wob_tci'), IsDay(1, hrs, mins));\n\ + } else { replaceImage(document.getElementById('wob_tci'), 1); }\n\ }\n\ });\n\ });\n\ -observer.observe(document.getElementById('wob_tci').children[0], {attributes : true});\n\ +observer.observe(document.getElementById('wob_tci'), {attributes : true});\n\ function ep_weather_part0() {\n\ return \"run_part_0\";\n\ }\n\ @@ -434,7 +359,7 @@ if (!unit.includes(p)) {\n\ unit = 'x';\n\ }\n\ createImageBitmap(\n\ - (final_im != 0) ? final_im : document.getElementById('wob_tci').children[0], \n\ + (final_im != 0) ? final_im : document.getElementById('wob_tci'), \n\ { resizeWidth: %d, resizeHeight: %d, resizeQuality: 'high' }\n\ )\n\ .then(imageBitmap => \n\ From a95a6881ccb36548503ec15cc1d804744d657604 Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Fri, 21 Apr 2023 23:00:55 -0700 Subject: [PATCH 2/3] Version: 22621.1555.55.1 --- CHANGELOG.md | 10 ++++++++++ version.h | 10 +++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7730d4ca..dab6583a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ This document includes the same release notes as in the [Releases](https://github.com/valinet/ExplorerPatcher/releases) section on GitHub. +## 22621.1555.55 + +Tested on OS build 22621.1555. Installer requires Internet connectivity. + +#### Details + +##### 1 + +* Weather: Fixed a bug that prevented the widget from loading when using the Microsoft icon pack. (968d969) + ## 22621.1413.54 Tested on OS build 22621.1413. diff --git a/version.h b/version.h index c12c166ee..a92236e60 100644 --- a/version.h +++ b/version.h @@ -1,7 +1,7 @@ #define VER_MAJOR 22621 -#define VER_MINOR 1413 -#define VER_BUILD_HI 54 -#define VER_BUILD_LO 5 +#define VER_MINOR 1555 +#define VER_BUILD_HI 55 +#define VER_BUILD_LO 1 #define VER_FLAGS VS_FF_PRERELEASE @@ -12,5 +12,5 @@ #define VER_STR(arg) #arg // The String form of the version numbers -#define VER_FILE_STRING VALUE "FileVersion", "22621.1413.54.5" -#define VER_PRODUCT_STRING VALUE "ProductVersion", "22621.1413.54.5" +#define VER_FILE_STRING VALUE "FileVersion", "22621.1555.55.1" +#define VER_PRODUCT_STRING VALUE "ProductVersion", "22621.1555.55.1" From 6fb998eb751245c6357387ab0a59a4cdd167e74a Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Mon, 24 Apr 2023 04:15:27 +0300 Subject: [PATCH 3/3] Version: 22621.1555.55.2 --- CHANGELOG.md | 11 +++++++++++ ExplorerPatcher/GUI.c | 2 +- ExplorerPatcher/settings.reg | 8 ++++---- ExplorerPatcher/settings10.reg | 8 ++++---- libs/sws | 2 +- version.h | 6 +++--- 6 files changed, 24 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dab6583a3..62973d066 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,17 @@ Tested on OS build 22621.1555. Installer requires Internet connectivity. * Weather: Fixed a bug that prevented the widget from loading when using the Microsoft icon pack. (968d969) +##### 2 + +* Simple Window Switcher + * Support for individual list and grouping for UWP apps (implemented grouping and naming enhancements based on using information associated with `AppUserModelID`s) + * Ability to switch between global and local window lists when the switcher is shown. + * Maintain position in the list when certain events occur, like closing windows or switching between the global and local window lists. + * `Del` key closes the currently selected window(s). + * Fixed a bug that prevented newly spawned windows while the switcher is open from going to the back of the list. + * Fixed a bug that prevented window lists from building properly when windows were slow to close. + * Fixed a bug that prevented proper activation of pop-up windows under certain conditions. For example, the switcher is now able to correctly switch to the "Error Checking" window in This PC - right click C: - Properties - Tools - Error checking - Check. + ## 22621.1413.54 Tested on OS build 22621.1413. diff --git a/ExplorerPatcher/GUI.c b/ExplorerPatcher/GUI.c index 23609e48c..14e0a3ff0 100644 --- a/ExplorerPatcher/GUI.c +++ b/ExplorerPatcher/GUI.c @@ -3143,7 +3143,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) 1, 0 ); - swprintf(text + 3, MAX_LINE_LENGTH, L"Disable per-application window list ( Alt + %c )", key); + swprintf(text + 3, MAX_LINE_LENGTH, L"Disable the interaction list for individual apps ( Alt + %c )", key); } if (tabOrder == _this->tabOrder) { diff --git a/ExplorerPatcher/settings.reg b/ExplorerPatcher/settings.reg index e866f219d..6beb14301 100644 --- a/ExplorerPatcher/settings.reg +++ b/ExplorerPatcher/settings.reg @@ -342,13 +342,13 @@ "AltTabSettings"=dword:00000000 ;s WindowSwitcher_SWS IsSWSEnabled [HKEY_CURRENT_USER\Software\ExplorerPatcher\sws] -;b Include desktop +;b Show the desktop as the last window in the interaction list "IncludeWallpaper"=dword:00000001 -;b Always show on primary monitor +;b Always display switcher on primary monitor "PrimaryOnly"=dword:00000000 -;b Show windows only from current monitor +;b Display windows only from the monitor containing the cursor "PerMonitor"=dword:00000000 -;b Display only the most recent window (per application switcher) +;b Group windows of the same app "SwitcherIsPerApplication"=dword:00000000 ;b %PLACEHOLDER_0001% "NoPerApplicationList"=dword:00000000 diff --git a/ExplorerPatcher/settings10.reg b/ExplorerPatcher/settings10.reg index c8bc2b5b8..25c78aa5c 100644 --- a/ExplorerPatcher/settings10.reg +++ b/ExplorerPatcher/settings10.reg @@ -255,13 +255,13 @@ "AltTabSettings"=dword:00000000 ;t The following settings only apply to the Simple Window Switcher: [HKEY_CURRENT_USER\Software\ExplorerPatcher\sws] -;b Include desktop +;b Show the desktop as the last window in the interaction list "IncludeWallpaper"=dword:00000001 -;b Always show on primary monitor +;b Always display switcher on primary monitor "PrimaryOnly"=dword:00000000 -;b Show windows only from current monitor +;b Display windows only from the monitor containing the cursor "PerMonitor"=dword:00000000 -;b Display only the most recent window (per application switcher) +;b Group windows of the same app "SwitcherIsPerApplication"=dword:00000000 ;b %PLACEHOLDER_0001% "NoPerApplicationList"=dword:00000000 diff --git a/libs/sws b/libs/sws index a8b25cd96..586fe7d6b 160000 --- a/libs/sws +++ b/libs/sws @@ -1 +1 @@ -Subproject commit a8b25cd96e4481c0c89c280e07e3ee17da7f61cf +Subproject commit 586fe7d6bdbab4eec0c4b0999efe7c8602636a0b diff --git a/version.h b/version.h index a92236e60..588214c51 100644 --- a/version.h +++ b/version.h @@ -1,7 +1,7 @@ #define VER_MAJOR 22621 #define VER_MINOR 1555 #define VER_BUILD_HI 55 -#define VER_BUILD_LO 1 +#define VER_BUILD_LO 2 #define VER_FLAGS VS_FF_PRERELEASE @@ -12,5 +12,5 @@ #define VER_STR(arg) #arg // The String form of the version numbers -#define VER_FILE_STRING VALUE "FileVersion", "22621.1555.55.1" -#define VER_PRODUCT_STRING VALUE "ProductVersion", "22621.1555.55.1" +#define VER_FILE_STRING VALUE "FileVersion", "22621.1555.55.2" +#define VER_PRODUCT_STRING VALUE "ProductVersion", "22621.1555.55.2"