Skip to content

Instantly share code, notes, and snippets.

@itsNikolay
Last active November 20, 2024 10:06
Show Gist options
  • Save itsNikolay/b261cc33fca76b2c1271eaca9b7975ef to your computer and use it in GitHub Desktop.
Save itsNikolay/b261cc33fca76b2c1271eaca9b7975ef to your computer and use it in GitHub Desktop.
Generate Chrome Web Store Url while your extension is under review
// Меняем название расширения и его 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);
@itsNikolay
Copy link
Author

Result:
Screenshot 2024-11-20 at 13 01 37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment