Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dark mode not being set on startup #1569

Merged
merged 3 commits into from
Mar 8, 2021

Conversation

dusansimic
Copy link
Collaborator

This fixes dark mode not being set on startup. Messenger website seems to remove the __fb-dark-mode class from root element when website loads completely which is right after Caprine adds the class. This disables dark mode on startup event if it's enabled.

This solution uses MutationObserver to monitor for changes in class list of root element and check if weather dark mode classes are present. If Caprine dark mode config and class list don't match, Caprine will set dark mode classes again. This sets dark mode automatically on startup when it's enabled.

Closes: #1525
Closes: #1538

@sindresorhus
Copy link
Owner

Can you fix the merge conflict?

This fixes dark mode not being set on startup. Messenger website seems
to remove the `__fb-dark-mode` class just after Caprine adds it and it
disables dark mode on startup. This solution uses MutationObserver to
observe when class list in `html` element changes and if it doesn't
match the config of the app, it updates the class list. This enables
dark mode on every startup.
@dusansimic dusansimic force-pushed the fix-dark-mode-not-set branch from e7a70e0 to 6281743 Compare March 6, 2021 09:38
@dusansimic
Copy link
Collaborator Author

Done!

@sindresorhus
Copy link
Owner

I got an unhandled rejection:

(node:50971) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'click' of null
at closePreferences (/Users/sindresorhus/dev/oss/caprine/dist-js/browser.js:547:21)
at /Users/sindresorhus/dev/oss/caprine/dist-js/browser.js:265:9
at async EventEmitter.listener (/Users/sindresorhus/dev/oss/caprine/node_modules/electron-better-ipc/source/renderer.js:47:26)
(node:50971) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=stri

@dusansimic
Copy link
Collaborator Author

I can't seem to reproduce this error. Could you please check what is the aria-label attribute for the preferences dialog? The full XPath of the preferences dialog once it's open is /html/body/div[1]/div/div[1]/div/div[3]/div/div/div[1]/div/div[2]/div/div/div.

@sindresorhus
Copy link
Owner

Preferences. Full HTML:

<div class="rq0escxv l9j0dhe7 du4w35lb ll8tlv6m j83agx80 taijpn5t hzruof5a" style="min-height: 0px;"><div aria-label="Preferences" role="dialog" class="cjfnh4rs l9j0dhe7 du4w35lb j83agx80 cbu4d94t lzcic4wl ni8dbmo4 stjgntxs oqq733wu cwj9ozl2 ue3kfks5 pw54ja7n uo3d90p7 l82x9zwi nwpbqux9 iy3k6uwz e9a99x49 g8p4j16d bv25afu3 gc7gaz0o k4urcfbm"><div class="idiwt2bm lzcic4wl ni8dbmo4 stjgntxs l9j0dhe7 dbpd2lw6" style="height: 540px;"><div class="rq0escxv pmk7jnqg du4w35lb pedkr2u6 oqq733wu ms05siws pnx7fd3z b7h9ocf4 j9ispegn kr520xx4 k4urcfbm" style="transform: translateX(0%) translateZ(1px);"><div class="taijpn5t cb02d2ww j83agx80 linmgsc8 bp9cbjyn bjjun2dj clqubjjj"><h2 class="gmql0nx0 l94mrbxd p1ri9a11 lzcic4wl d2edcug0 hpfvmrgz" dir="auto" tabindex="-1"><span class="d2edcug0 hpfvmrgz qv66sw1b c1et5uql oi732d6d ik7dh3pa fgxwclzu a8c37x1j keod5gw0 nxhoafnm aigsh9s9 d3f4x2em fe6kdd0r mau55g9w c8b282yb hrzyx87i o3w64lxj b2s5l15y hnhda86s oo9gr5id" dir="auto"><span class="a8c37x1j ni8dbmo4 stjgntxs l9j0dhe7 ltmttdrg g0qnabr5">Preferences</span></span></h2></div><div class="tkr6xdv7 fcg2cn6m pmk7jnqg cypi58rs"><div aria-label="Kapat" class="oajrlxb2 tdjehn4e qu0x051f esr5mh6w e9989ue4 r7d6kgcz rq0escxv nhd2j8a9 j83agx80 p7hjln8o kvgmc6g5 cxmmr5t8 oygrvhab hcukyx3x jb3vyjys rz4wbd8a qt6c0cv9 a8nywdso i1ao9s8h esuyzwwr f1sip0of lzcic4wl l9j0dhe7 abiwlrkh p8dawk7l bp9cbjyn s45kfl79 emlxlaya bkmhp75w spb7xbtv rt8b4zig n8ej3o3l agehan2d sk4xxmp2 taijpn5t tv7at329 thwo4zme" role="button" tabindex="0"><i class="hu5pjgll m6k467ps sp_Kzgbbdff-nF_2x sx_e93d5a"></i><div class="s45kfl79 emlxlaya bkmhp75w spb7xbtv i09qtzwb n7fi1qx3 b5wmifdl hzruof5a pmk7jnqg j9ispegn kr520xx4 c5ndavph art1omkt ot9fgl3s rnr61an3" data-visualcompletion="ignore"></div></div></div><div class="jktsbyx5 rv4hoivh osnr6wyh h4z51re5"><div><h2 class="gmql0nx0 l94mrbxd p1ri9a11 lzcic4wl jktsbyx5 rv4hoivh osnr6wyh h4z51re5" dir="auto"><span class="d2edcug0 hpfvmrgz qv66sw1b c1et5uql oi732d6d ik7dh3pa fgxwclzu a8c37x1j keod5gw0 nxhoafnm aigsh9s9 d3f4x2em fe6kdd0r mau55g9w c8b282yb hrzyx87i o3w64lxj b2s5l15y hnhda86s oo9gr5id" dir="auto">Hesap</span></h2><div data-visualcompletion="ignore-dynamic" style="padding-left: 0px; padding-right: 0px;"><a class="oajrlxb2 gs1a9yip g5ia77u1 mtkw9kbi tlpljxtp qensuy8j ppp5ayq2 goun2846 ccm00jje s44p3ltw mk2mc5f4 rt8b4zig n8ej3o3l agehan2d sk4xxmp2 rq0escxv nhd2j8a9 a8c37x1j mg4g778l btwxx1t3 pfnyh3mw p7hjln8o kvgmc6g5 cxmmr5t8 oygrvhab hcukyx3x tgvbjcpo hpfvmrgz jb3vyjys rz4wbd8a qt6c0cv9 a8nywdso l9j0dhe7 i1ao9s8h esuyzwwr f1sip0of du4w35lb lzcic4wl abiwlrkh p8dawk7l ue3kfks5 pw54ja7n uo3d90p7 l82x9zwi" href="https://www.facebook.com/100009728161003/" role="link" tabindex="0" target="_blank"><div class="ow4ym5g4 auili1gw rq0escxv j83agx80 buofh1pr g5gj957u i1fnvgqd oygrvhab cxmmr5t8 hcukyx3x kvgmc6g5 nnctdnn4 hpfvmrgz qt6c0cv9 jb3vyjys l9j0dhe7 du4w35lb bp9cbjyn btwxx1t3 dflh9lhu scb9dxdr"><div class="nqmvxvec j83agx80 cbu4d94t tvfksri0 aov4n071 bi6gxh9e l9j0dhe7"><div class="q9uorilb l9j0dhe7 pzggbiyp du4w35lb"><svg aria-hidden="true" class="pzggbiyp" data-visualcompletion="ignore-dynamic" role="none" style="height: 60px; width: 60px;"><mask id="jsc_c_6s"><circle cx="30" cy="30" fill="white" r="30"></circle></mask><g mask="url(#jsc_c_6s)"><image x="0" y="0" height="100%" preserveAspectRatio="xMidYMid slice" width="100%" xlink:href="https://scontent.fbkk12-2.fna.fbcdn.net/v/t31.0-1/c30.0.100.100a/p100x100/11128848_101062200228052_5229472154624289337_o.jpg?_nc_cat=104&amp;ccb=1-3&amp;_nc_sid=7206a8&amp;_nc_ohc=Mt_TL34JlZkAX8vkr-w&amp;_nc_ad=z-m&amp;_nc_cid=0&amp;_nc_ht=scontent.fbkk12-2.fna&amp;tp=27&amp;oh=6f047642ec0294b8ea183a9f9aa7a965&amp;oe=6069490A" style="height: 60px; width: 60px;"></image><circle class="mlqo0dh0 georvekb s6kb5r3f" cx="30" cy="30" r="30"></circle></g></svg></div></div><div class="ow4ym5g4 auili1gw rq0escxv j83agx80 buofh1pr g5gj957u i1fnvgqd oygrvhab cxmmr5t8 hcukyx3x kvgmc6g5 tgvbjcpo hpfvmrgz qt6c0cv9 rz4wbd8a a8nywdso jb3vyjys du4w35lb bp9cbjyn btwxx1t3 l9j0dhe7"><div class="gs1a9yip ow4ym5g4 auili1gw rq0escxv j83agx80 cbu4d94t buofh1pr g5gj957u i1fnvgqd oygrvhab cxmmr5t8 hcukyx3x kvgmc6g5 tgvbjcpo hpfvmrgz rz4wbd8a a8nywdso l9j0dhe7 du4w35lb rj1gh0hx pybr56ya f10w8fjw"><div class=""><div class="j83agx80 cbu4d94t ew0dbk1b irj2b8pg"><div class="qzhwtbm6 knvmm38d"><span class="d2edcug0 hpfvmrgz qv66sw1b c1et5uql oi732d6d ik7dh3pa fgxwclzu a8c37x1j keod5gw0 nxhoafnm aigsh9s9 d9wwppkn fe6kdd0r mau55g9w c8b282yb iv3no6db a5q79mjw g1cxx5fr ekzkrbhg oo9gr5id hzawbc8m" dir="auto">Jonas Knudsen</span></div><div class="qzhwtbm6 knvmm38d"><span class="d2edcug0 hpfvmrgz qv66sw1b c1et5uql oi732d6d ik7dh3pa fgxwclzu a8c37x1j keod5gw0 nxhoafnm aigsh9s9 d9wwppkn fe6kdd0r mau55g9w c8b282yb iv3no6db jq4qci2q a3bd9o3v knj5qynh m9osqain hzawbc8m" dir="auto">Profiline bak</span></div></div></div></div></div></div><div class="n00je7tq arfg74bv qs9ysxi8 k77z8yql i09qtzwb n7fi1qx3 b5wmifdl hzruof5a pmk7jnqg j9ispegn kr520xx4 c5ndavph art1omkt ot9fgl3s rnr61an3" data-visualcompletion="ignore"></div></a></div></div><div class="ieb30kwl ay7djpcl ku2m03ct oud54xpy"></div><div data-visualcompletion="ignore-dynamic" style="padding-left: 0px; padding-right: 0px;"><div class="oajrlxb2 gs1a9yip g5ia77u1 mtkw9kbi tlpljxtp qensuy8j ppp5ayq2 goun2846 ccm00jje s44p3ltw mk2mc5f4 rt8b4zig n8ej3o3l agehan2d sk4xxmp2 rq0escxv nhd2j8a9 a8c37x1j mg4g778l btwxx1t3 pfnyh3mw p7hjln8o kvgmc6g5 cxmmr5t8 oygrvhab hcukyx3x tgvbjcpo hpfvmrgz jb3vyjys rz4wbd8a qt6c0cv9 a8nywdso l9j0dhe7 i1ao9s8h esuyzwwr f1sip0of du4w35lb lzcic4wl abiwlrkh p8dawk7l ue3kfks5 pw54ja7n uo3d90p7 l82x9zwi" role="button" tabindex="0"><div class="ow4ym5g4 auili1gw rq0escxv j83agx80 buofh1pr g5gj957u i1fnvgqd oygrvhab cxmmr5t8 hcukyx3x kvgmc6g5 nnctdnn4 hpfvmrgz qt6c0cv9 jb3vyjys l9j0dhe7 du4w35lb bp9cbjyn btwxx1t3 dflh9lhu scb9dxdr"><div class="nqmvxvec j83agx80 cbu4d94t tvfksri0 aov4n071 bi6gxh9e l9j0dhe7"><div class="s45kfl79 emlxlaya bkmhp75w spb7xbtv bp9cbjyn rt8b4zig n8ej3o3l agehan2d sk4xxmp2 rq0escxv pq6dq46d taijpn5t l9j0dhe7 tdjehn4e tv7at329 thwo4zme"><svg viewBox="0 0 36 36" class="a8c37x1j ms05siws hwsy1cff b7h9ocf4" height="24" width="24"><path d="M22.278 25.778a3.5 3.5 0 107 0 3.5 3.5 0 00-7 0z"></path><path d="M28.734 20.414c-.071.32-.435.463-.735.331A5.5 5.5 0 0020.745 28c.133.3-.011.664-.33.735-.778.174-1.586.266-2.415.266-6.075 0-11-4.925-11-11S11.925 7 18 7s11 4.925 11 11c0 .83-.092 1.637-.266 2.414z"></path></svg></div></div><div class="ow4ym5g4 auili1gw rq0escxv j83agx80 buofh1pr g5gj957u i1fnvgqd oygrvhab cxmmr5t8 hcukyx3x kvgmc6g5 tgvbjcpo hpfvmrgz qt6c0cv9 rz4wbd8a a8nywdso jb3vyjys du4w35lb bp9cbjyn btwxx1t3 l9j0dhe7"><div class="gs1a9yip ow4ym5g4 auili1gw rq0escxv j83agx80 cbu4d94t buofh1pr g5gj957u i1fnvgqd oygrvhab cxmmr5t8 hcukyx3x kvgmc6g5 tgvbjcpo hpfvmrgz rz4wbd8a a8nywdso l9j0dhe7 du4w35lb rj1gh0hx pybr56ya f10w8fjw"><div class=""><div class="j83agx80 cbu4d94t ew0dbk1b irj2b8pg"><div class="qzhwtbm6 knvmm38d"><span class="d2edcug0 hpfvmrgz qv66sw1b c1et5uql oi732d6d ik7dh3pa fgxwclzu a8c37x1j keod5gw0 nxhoafnm aigsh9s9 d9wwppkn fe6kdd0r mau55g9w c8b282yb iv3no6db a5q79mjw g1cxx5fr ekzkrbhg oo9gr5id hzawbc8m" dir="auto">Aktif Durumu Kapat</span></div></div></div></div></div></div><div class="n00je7tq arfg74bv qs9ysxi8 k77z8yql i09qtzwb n7fi1qx3 b5wmifdl hzruof5a pmk7jnqg j9ispegn kr520xx4 c5ndavph art1omkt ot9fgl3s rnr61an3" data-visualcompletion="ignore"></div></div></div><div class="ieb30kwl ay7djpcl ku2m03ct oud54xpy"></div><h3 class="jktsbyx5 rv4hoivh osnr6wyh h4z51re5"><span class="d2edcug0 hpfvmrgz qv66sw1b c1et5uql oi732d6d ik7dh3pa fgxwclzu a8c37x1j keod5gw0 nxhoafnm aigsh9s9 d3f4x2em fe6kdd0r mau55g9w c8b282yb hrzyx87i o3w64lxj b2s5l15y hnhda86s oo9gr5id" dir="auto">Bildirimler</span></h3><div><div class="j83agx80 owycx6da i1fnvgqd"><div class="jktsbyx5 rv4hoivh osnr6wyh h4z51re5"><div data-visualcompletion="ignore-dynamic" style="padding-left: 0px; padding-right: 0px;"><div class="ue3kfks5 pw54ja7n uo3d90p7 l82x9zwi a8c37x1j"><div class="ow4ym5g4 auili1gw rq0escxv j83agx80 buofh1pr g5gj957u i1fnvgqd oygrvhab cxmmr5t8 hcukyx3x kvgmc6g5 nnctdnn4 hpfvmrgz qt6c0cv9 jb3vyjys l9j0dhe7 du4w35lb bp9cbjyn btwxx1t3 dflh9lhu scb9dxdr" style="padding-left: 0px; padding-right: 0px;"><div class="nqmvxvec j83agx80 cbu4d94t tvfksri0 aov4n071 bi6gxh9e l9j0dhe7"><div class="s45kfl79 emlxlaya bkmhp75w spb7xbtv bp9cbjyn rt8b4zig n8ej3o3l agehan2d sk4xxmp2 rq0escxv pq6dq46d taijpn5t l9j0dhe7 tdjehn4e tv7at329 thwo4zme"><svg viewBox="0 0 36 36" class="a8c37x1j ms05siws hwsy1cff b7h9ocf4" height="24" width="24"><path d="M19 9.501c0-1.346-1.636-2.01-2.575-1.046l-3.983 4.091a1.5 1.5 0 01-1.075.454H8a2 2 0 00-2 2v6a2 2 0 002 2h3.367a1.5 1.5 0 011.075.454l3.983 4.091c.94.965 2.575.3 2.575-1.046V9.501zm3.333 2.665c-.488.489-.477 1.275-.083 1.842A6.968 6.968 0 0123.5 18c0 1.484-.462 2.86-1.25 3.992-.394.567-.405 1.354.083 1.842.488.488 1.287.492 1.707-.055A9.458 9.458 0 0026 18a9.456 9.456 0 00-1.96-5.778c-.42-.548-1.219-.544-1.707-.056z"></path><path d="M25.87 27.37c-.488-.489-.482-1.277-.047-1.813A11.95 11.95 0 0028.5 18a11.95 11.95 0 00-2.678-7.557c-.435-.536-.441-1.324.047-1.812s1.284-.491 1.729.037A14.442 14.442 0 0131 18c0 3.555-1.28 6.81-3.402 9.332-.445.529-1.24.525-1.729.037z"></path></svg></div></div><div class="ow4ym5g4 auili1gw rq0escxv j83agx80 buofh1pr g5gj957u i1fnvgqd oygrvhab cxmmr5t8 hcukyx3x kvgmc6g5 tgvbjcpo hpfvmrgz qt6c0cv9 rz4wbd8a a8nywdso jb3vyjys du4w35lb bp9cbjyn btwxx1t3 l9j0dhe7"><div class="gs1a9yip ow4ym5g4 auili1gw rq0escxv j83agx80 cbu4d94t buofh1pr g5gj957u i1fnvgqd oygrvhab cxmmr5t8 hcukyx3x kvgmc6g5 tgvbjcpo hpfvmrgz rz4wbd8a a8nywdso l9j0dhe7 du4w35lb rj1gh0hx pybr56ya f10w8fjw"><div class=""><div class="j83agx80 cbu4d94t ew0dbk1b irj2b8pg"><div class="qzhwtbm6 knvmm38d"><span class="d2edcug0 hpfvmrgz qv66sw1b c1et5uql oi732d6d ik7dh3pa fgxwclzu a8c37x1j keod5gw0 nxhoafnm aigsh9s9 d9wwppkn fe6kdd0r mau55g9w c8b282yb iv3no6db a5q79mjw g1cxx5fr lrazzd5p oo9gr5id hzawbc8m" dir="auto">Bildirim sesleri</span></div><div class="qzhwtbm6 knvmm38d"><span class="d2edcug0 hpfvmrgz qv66sw1b c1et5uql oi732d6d ik7dh3pa fgxwclzu a8c37x1j keod5gw0 nxhoafnm aigsh9s9 d9wwppkn fe6kdd0r mau55g9w c8b282yb iv3no6db jq4qci2q a3bd9o3v knj5qynh m9osqain hzawbc8m" dir="auto">Gelen mesajları, aramaları veya görüntülü sohbetleri sesli olarak bildir.</span></div></div></div></div></div></div></div></div></div><div class="jktsbyx5 rv4hoivh osnr6wyh h4z51re5"><div class="rq0escxv l9j0dhe7 du4w35lb lzcic4wl pwoa4pd7 qu0x051f esr5mh6w e9989ue4 r7d6kgcz cmek9o9a p7f4f6cj c8oo3d72 r15kkdkt q9uorilb mudddibn kvgmc6g5 cxmmr5t8 enqfppq2 hcukyx3x pedkr2u6 ni8dbmo4 stjgntxs jb3vyjys rz4wbd8a qt6c0cv9 a8nywdso f0ai4nzy art1omkt b4alr923 i8j84fko"><div class="rq0escxv pmk7jnqg du4w35lb i09qtzwb n7fi1qx3 j9ispegn kr520xx4 is6700om pedkr2u6 hzruof5a s00z5mgp art1omkt eloblzlw"></div><div class="rq0escxv pmk7jnqg du4w35lb q2y6ezfg lit7pgxp o3c63hce hqlzco19 lsl2245n dsne8k7f rgmg9uty hzruof5a tkxwya3v bk00n993 s00z5mgp flx89l3n eloblzlw b73ngqbp duvxvzcv"></div><input dir="ltr" aria-label="Etkin" aria-checked="true" role="switch" class="oajrlxb2 rq0escxv f1sip0of hidtqoto nhd2j8a9 datstx6m kvgmc6g5 cxmmr5t8 oygrvhab hcukyx3x b5wmifdl lzcic4wl jb3vyjys rz4wbd8a qt6c0cv9 a8nywdso pmk7jnqg j9ispegn kr520xx4 k4urcfbm" type="checkbox" checked=""></div></div></div></div><div class="ieb30kwl ay7djpcl ku2m03ct oud54xpy"></div><div><div data-visualcompletion="ignore-dynamic" style="padding-left: 0px; padding-right: 0px;"><a class="oajrlxb2 gs1a9yip g5ia77u1 mtkw9kbi tlpljxtp qensuy8j ppp5ayq2 goun2846 ccm00jje s44p3ltw mk2mc5f4 rt8b4zig n8ej3o3l agehan2d sk4xxmp2 rq0escxv nhd2j8a9 a8c37x1j mg4g778l btwxx1t3 pfnyh3mw p7hjln8o kvgmc6g5 cxmmr5t8 oygrvhab hcukyx3x tgvbjcpo hpfvmrgz jb3vyjys rz4wbd8a qt6c0cv9 a8nywdso l9j0dhe7 i1ao9s8h esuyzwwr f1sip0of du4w35lb lzcic4wl abiwlrkh p8dawk7l ue3kfks5 pw54ja7n uo3d90p7 l82x9zwi" href="https://secure.facebook.com/facebook_pay/?redirect_source=settings" role="link" tabindex="0" target="_blank"><div class="ow4ym5g4 auili1gw rq0escxv j83agx80 buofh1pr g5gj957u i1fnvgqd oygrvhab cxmmr5t8 hcukyx3x kvgmc6g5 nnctdnn4 hpfvmrgz qt6c0cv9 jb3vyjys l9j0dhe7 du4w35lb bp9cbjyn btwxx1t3 dflh9lhu scb9dxdr"><div class="nqmvxvec j83agx80 cbu4d94t tvfksri0 aov4n071 bi6gxh9e l9j0dhe7"><div class="s45kfl79 emlxlaya bkmhp75w spb7xbtv bp9cbjyn rt8b4zig n8ej3o3l agehan2d sk4xxmp2 rq0escxv pq6dq46d taijpn5t l9j0dhe7 tdjehn4e tv7at329 thwo4zme"><svg viewBox="0 0 36 36" class="a8c37x1j ms05siws hwsy1cff b7h9ocf4" height="24" width="24"><path d="M17 9.5a.5.5 0 00-.5-.5H9a3 3 0 00-3 3v12a3 3 0 003 3h7.5a.5.5 0 00.5-.5v-1.355a.534.534 0 00-.435-.514c-1.16-.24-2.337-.872-3.153-2.123a1 1 0 111.676-1.093c.55.844 1.378 1.225 2.247 1.314.906.093 1.745-.147 2.156-.41l.012-.008.013-.007c.72-.433 1.07-1.216.96-1.808-.086-.47-.572-1.277-2.587-1.502h-.002c-2.498-.279-4.07-1.461-4.516-3.093-.429-1.562.294-3.195 1.625-4.035l.01-.006.01-.006c.42-.252.952-.428 1.53-.523a.531.531 0 00.454-.515V9.5z"></path><path d="M19 26.5a.5.5 0 00.5.5H27a3 3 0 003-3V12a3 3 0 00-3-3h-7.5a.5.5 0 00-.5.5v1.515c0 .232.16.431.381.5.998.312 1.976.936 2.518 2.047a1 1 0 01-1.798.876c-.299-.612-.976-1.009-1.888-1.143-.92-.135-1.781.047-2.16.268-.64.411-.93 1.168-.754 1.81.158.574.811 1.41 2.811 1.633h.004c2.484.279 4.021 1.447 4.33 3.129.285 1.554-.595 3.095-1.887 3.877a4.526 4.526 0 01-1.164.507.531.531 0 00-.393.503V26.5z"></path></svg></div></div><div class="ow4ym5g4 auili1gw rq0escxv j83agx80 buofh1pr g5gj957u i1fnvgqd oygrvhab cxmmr5t8 hcukyx3x kvgmc6g5 tgvbjcpo hpfvmrgz qt6c0cv9 rz4wbd8a a8nywdso jb3vyjys du4w35lb bp9cbjyn btwxx1t3 l9j0dhe7"><div class="gs1a9yip ow4ym5g4 auili1gw rq0escxv j83agx80 cbu4d94t buofh1pr g5gj957u i1fnvgqd oygrvhab cxmmr5t8 hcukyx3x kvgmc6g5 tgvbjcpo hpfvmrgz rz4wbd8a a8nywdso l9j0dhe7 du4w35lb rj1gh0hx pybr56ya f10w8fjw"><div class=""><div class="j83agx80 cbu4d94t ew0dbk1b irj2b8pg"><div class="qzhwtbm6 knvmm38d"><span class="d2edcug0 hpfvmrgz qv66sw1b c1et5uql oi732d6d ik7dh3pa fgxwclzu a8c37x1j keod5gw0 nxhoafnm aigsh9s9 d9wwppkn fe6kdd0r mau55g9w c8b282yb iv3no6db a5q79mjw g1cxx5fr ekzkrbhg oo9gr5id hzawbc8m" dir="auto">Ödemeleri Yönet</span></div></div></div></div></div></div><div class="n00je7tq arfg74bv qs9ysxi8 k77z8yql i09qtzwb n7fi1qx3 b5wmifdl hzruof5a pmk7jnqg j9ispegn kr520xx4 c5ndavph art1omkt ot9fgl3s" data-visualcompletion="ignore"></div></a></div></div><div><div data-visualcompletion="ignore-dynamic" style="padding-left: 0px; padding-right: 0px;"><a class="oajrlxb2 gs1a9yip g5ia77u1 mtkw9kbi tlpljxtp qensuy8j ppp5ayq2 goun2846 ccm00jje s44p3ltw mk2mc5f4 rt8b4zig n8ej3o3l agehan2d sk4xxmp2 rq0escxv nhd2j8a9 a8c37x1j mg4g778l btwxx1t3 pfnyh3mw p7hjln8o kvgmc6g5 cxmmr5t8 oygrvhab hcukyx3x tgvbjcpo hpfvmrgz jb3vyjys rz4wbd8a qt6c0cv9 a8nywdso l9j0dhe7 i1ao9s8h esuyzwwr f1sip0of du4w35lb lzcic4wl abiwlrkh p8dawk7l ue3kfks5 pw54ja7n uo3d90p7 l82x9zwi" href="https://www.facebook.com/settings/?tab=blocking" role="link" tabindex="0" target="_blank"><div class="ow4ym5g4 auili1gw rq0escxv j83agx80 buofh1pr g5gj957u i1fnvgqd oygrvhab cxmmr5t8 hcukyx3x kvgmc6g5 nnctdnn4 hpfvmrgz qt6c0cv9 jb3vyjys l9j0dhe7 du4w35lb bp9cbjyn btwxx1t3 dflh9lhu scb9dxdr"><div class="nqmvxvec j83agx80 cbu4d94t tvfksri0 aov4n071 bi6gxh9e l9j0dhe7"><div class="s45kfl79 emlxlaya bkmhp75w spb7xbtv bp9cbjyn rt8b4zig n8ej3o3l agehan2d sk4xxmp2 rq0escxv pq6dq46d taijpn5t l9j0dhe7 tdjehn4e tv7at329 thwo4zme"><svg viewBox="0 0 36 36" class="a8c37x1j ms05siws hwsy1cff b7h9ocf4" height="24" width="24"><path clip-rule="evenodd" d="M18 29c6.075 0 11-4.925 11-11S24.075 7 18 7 7 11.925 7 18s4.925 11 11 11zm-7-12.5a1 1 0 00-1 1v1a1 1 0 001 1h14a1 1 0 001-1v-1a1 1 0 00-1-1H11z" fill-rule="evenodd"></path></svg></div></div><div class="ow4ym5g4 auili1gw rq0escxv j83agx80 buofh1pr g5gj957u i1fnvgqd oygrvhab cxmmr5t8 hcukyx3x kvgmc6g5 tgvbjcpo hpfvmrgz qt6c0cv9 rz4wbd8a a8nywdso jb3vyjys du4w35lb bp9cbjyn btwxx1t3 l9j0dhe7"><div class="gs1a9yip ow4ym5g4 auili1gw rq0escxv j83agx80 cbu4d94t buofh1pr g5gj957u i1fnvgqd oygrvhab cxmmr5t8 hcukyx3x kvgmc6g5 tgvbjcpo hpfvmrgz rz4wbd8a a8nywdso l9j0dhe7 du4w35lb rj1gh0hx pybr56ya f10w8fjw"><div class=""><div class="j83agx80 cbu4d94t ew0dbk1b irj2b8pg"><div class="qzhwtbm6 knvmm38d"><span class="d2edcug0 hpfvmrgz qv66sw1b c1et5uql oi732d6d ik7dh3pa fgxwclzu a8c37x1j keod5gw0 nxhoafnm aigsh9s9 d9wwppkn fe6kdd0r mau55g9w c8b282yb iv3no6db a5q79mjw g1cxx5fr ekzkrbhg oo9gr5id hzawbc8m" dir="auto">Engellemeleri Yönet</span></div></div></div></div></div></div><div class="n00je7tq arfg74bv qs9ysxi8 k77z8yql i09qtzwb n7fi1qx3 b5wmifdl hzruof5a pmk7jnqg j9ispegn kr520xx4 c5ndavph art1omkt ot9fgl3s" data-visualcompletion="ignore"></div></a></div></div></div></div><div aria-hidden="true" class="rq0escxv pmk7jnqg du4w35lb b5wmifdl hzruof5a ms05siws pnx7fd3z b7h9ocf4 j9ispegn k4urcfbm" style="transform: translateX(100%) translateZ(1px);"></div></div></div></div>

@dusansimic dusansimic mentioned this pull request Mar 7, 2021
Wait for close button to show up before clicking on it.
Pass isNewDesign so error won't be throw
@sindresorhus sindresorhus changed the title Fix dark mode not set on startup Fix dark mode not being set on startup Mar 8, 2021
@sindresorhus sindresorhus merged commit 4254fe1 into sindresorhus:main Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dark mode do not work Dark mode not set on startup
2 participants