Last active
November 20, 2024 10:06
-
-
Save itsNikolay/b261cc33fca76b2c1271eaca9b7975ef to your computer and use it in GitHub Desktop.
Generate Chrome Web Store Url while your extension is under review
This file contains 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
// Меняем название расширения и его ID на свои | |
const extName = "Text to Speech Reader"; | |
const extId = "anaeokdaodomppjdibeifmcbebgfnmfp"; | |
const STORE_URL = "https://chromewebstore.google.com/detail/EXT_NAME/EXT_ID"; | |
const PREVIEW_URL = STORE_URL + "/preview"; | |
let urlExtName = extName | |
.replace(/[^0-9a-z ]/gi, "") | |
.toLowerCase() | |
.replace(/\s{2,}/g, " ") | |
.replace(/\s+/g, "-") | |
.slice(0, 25); | |
const storeUrl = STORE_URL.replace(/EXT_NAME/g, urlExtName).replace( | |
/EXT_ID/g, | |
extId, | |
); | |
const previewUrl = PREVIEW_URL.replace(/EXT_NAME/g, urlExtName).replace( | |
/EXT_ID/g, | |
extId, | |
); | |
console.log(); | |
console.log("Ссылки на магазин: (если расширение опубликовано)"); | |
console.log(storeUrl); | |
console.log(); | |
console.log("Ссылка на превью: (если расширение еще не опубликовано)"); | |
console.log(previewUrl); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Result:
