dedoussis / icloud-hide-my-email-browser-extension

Enjoy iCloud's Hide My Email service in your favourite browser
https://chrome.google.com/webstore/detail/icloud-hide-my-email/omiaekblhgfopjkjnenhahfgcgnbohlk
MIT License
319 stars 15 forks source link

feat: support iCloud in China #47

Closed gutenye closed 9 months ago

gutenye commented 9 months ago

Closes #34

Chinese iCloud uses a different domain (icloud.com.cn) instead of (icloud.com), this PR aims to support it.

Test Plan

  1. You need a Chinese Apple ID
  2. Login https://www.icloud.com.cn/
  3. Everything works as expected
  4. Login https://www.icloud.com
  5. It works as before
gutenye commented 9 months ago

@dedoussis, would you care to review when you have time?

dedoussis commented 9 months ago

Hi @gutenye, thanks for putting together this fix!

Have pushed a large change in the extension which affects your PR. Would you be happy with fixing this branch to be compatible with the changes I introduced? If not, I can pick this up and rebase the implementation to what's currently in master.

gutenye commented 9 months ago

Rebased, I'm not able to test it because npm start failed with CSS errors

gutenye commented 9 months ago

@dedoussis I got this error on the main branch when run npm run start, how do I fix it?

ERROR in ./src/pages/Popup/index.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
HookWebpackError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
Error: PostCSS received undefined instead of CSS string
dedoussis-stripe commented 9 months ago

@gutenye I think the issue is related to the node version you're using. Try using node 18.

dedoussis commented 9 months ago

@gutenye given the complexity of the change, I took a stab at implementing support for CN: https://github.com/dedoussis/icloud-hide-my-email-browser-extension/pull/52

However, I don't have a CN iCloud account to test this. Would you be able to test my branch using your account?