Last active
May 2, 2022 12:41
-
-
Save Doliman100/c58903c290cadd0c62ea386113516371 to your computer and use it in GitHub Desktop.
Switches aliexpress.ru language from Russian to English.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @version 3.0 | |
| // @name AliExpress locale fix | |
| // @namespace https://gist.github.com/Doliman100 | |
| // ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name AliExpress locale fix | |
| // @namespace https://gist.github.com/Doliman100 | |
| // @version 3.0 | |
| // @description Switches aliexpress.ru language from Russian to English. | |
| // @author Doliman100 | |
| // @icon https://ae01.alicdn.com/images/eng/wholesale/icon/aliexpress.ico | |
| // @updateURL https://gist.githubusercontent.com/raw/c58903c290cadd0c62ea386113516371/script.meta.js | |
| // @downloadURL https://gist.githubusercontent.com/raw/c58903c290cadd0c62ea386113516371/script.user.js | |
| // @match https://aliexpress.ru/* | |
| // @exclude /\/store/ | |
| // @grant none | |
| // ==/UserScript== | |
| 'use strict'; | |
| if (document.querySelector('.TopHeadV2_TopHeadV2__title__dt6yr').textContent === 'Продавайте на AliExpress') { | |
| await fetch('//login.aliexpress.com/setCommonCookie.htm?bLocal=en_US&site=glo', {referrerPolicy: 'strict-origin-when-cross-origin', method: 'GET', mode: 'cors', credentials: 'include'}); | |
| window.location.reload(); | |
| } |
Author
Script isn't working anymore. Any update?
Author
Script isn't working anymore. Any update?
Thank you for a report. I will update the script when I find a way to fix this. I want to try changing the cookies directly, but it takes a while to review AliExpress code.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unfortunately this is the only thing this script do. I was looking for other ways of language switching, but I couldn't find it. You may try to find another script that works better, and share it here. I need it too.