Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(extensions): jsdelivr use xyz domain name #557

Merged
merged 1 commit into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/extensions/extension.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ import {
if (isGithubRawUrl(script.src)) {
const { user, repo, branch, filePath } = getParamsFromGithubRaw(extensionManifest.extensionURL);
if (!user || !repo || !branch || !filePath) return;
script.src = `https://cdn.jsdelivr.net/gh/${user}/${repo}@${branch}/${filePath}`;
script.src = `https://cdn.jsdelivr.xyz/gh/${user}/${repo}@${branch}/${filePath}`;
}

script.src = `${script.src}?time=${Date.now()}`;
Expand Down Expand Up @@ -128,7 +128,7 @@ import {
// If it's a github raw script, use jsdelivr
if (isGithubRawUrl(script)) {
const { user, repo, branch, filePath } = getParamsFromGithubRaw(script);
src = `https://cdn.jsdelivr.net/gh/${user}/${repo}@${branch}/${filePath}`;
src = `https://cdn.jsdelivr.xyz/gh/${user}/${repo}@${branch}/${filePath}`;
}
// console.log({src});
newScript.src = `${src}?time=${Date.now()}`;
Expand Down
2 changes: 1 addition & 1 deletion src/logic/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ export const parseCSS = async (themeData: CardItem) => {

const userCssUrl = isGithubRawUrl(themeData.cssURL)
// TODO: this should probably be the URL stored in localstorage actually (i.e. put this url in localstorage)
? `https://cdn.jsdelivr.net/gh/${themeData.user}/${themeData.repo}@${themeData.branch}/${themeData.manifest.usercss}`
? `https://cdn.jsdelivr.xyz/gh/${themeData.user}/${themeData.repo}@${themeData.branch}/${themeData.manifest.usercss}`
: themeData.cssURL;
// TODO: Make this more versatile
const assetsUrl = userCssUrl.replace("/user.css", "/assets/");
Expand Down
2 changes: 1 addition & 1 deletion src/styles/components/_readme-pages.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// TODO: I wanted to get it to just @import the external URL and customize the colours,
// but I'm not sure how to get that working yet
// See here? https://www.npmjs.com/package/postcss-import-url
// @import url(https://cdn.jsdelivr.net/npm/water.css@2/out/water.css);
// @import url(https://cdn.jsdelivr.xyz/npm/water.css@2/out/water.css);

// (This is just for reference)
.spicetify-root-vars {
Expand Down