AnthonyZJiang / Microsoft-Reward-Chrome-Ext

A Chrome extension for Microsoft Rewards search, for accounts with two-factor authentication.
Apache License 2.0
319 stars 71 forks source link

about does not work in the Chinese region #104

Open maxzhang666 opened 1 year ago

maxzhang666 commented 1 year ago

Does not work in the Chinese region

I modified the code in the following part and he worked fine

manifest.json -> permissions

    "https://cn.bing.com/search?q=*",

DailyRewardStatus.js

const USER_STATUS_BING_URL = 'https://www.bing.com/rewardsapp/flyout?channel=0&partnerId=EdgeNTP&pageType=ntp&isDarkMode=0';

Link https://www.bing.com/rewardsapp/flyout?channel=0&partnerId=EdgeNTP&pageType=ntp&isDarkMode=0 is redirected to link https://cn.bing.com/rewardsapp/flyout?channel=0&partnerId=EdgeNTP&pageType=ntp&isDarkMode=0

I don't know about extension development, so I can only give this ide

AnthonyZJiang commented 1 year ago

Thank you. I will look into this when I have time.

AnthonyZJiang commented 1 year ago

Hi, can you test this develop version please? I have updated site permissions. Hopefully, it should work.

maxzhang666 commented 1 year ago

Hi, can you test this develop version please? I have updated site permissions. Hopefully, it should work.

of course

kressety commented 1 year ago

At China Mainland, the Google Trends is blocked. So googleTrend.js might catch an error of connection timeout when running. A temporary solution is to make a proxy or reverse-proxy and edit _getGoogleTrendUrl's return value (line 95) to your proxy url.

    _getGoogleTrendUrl(yyyymmdd) {
        return `https://google-trends-proxy.yourdomain.com/trends/api/dailytrends?hl=en-US&ed=${yyyymmdd}&geo=US&ns=15`;
    }