diff --git a/.travis.yml b/.travis.yml index f3dd9ee6..95b1aedf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ git: branches: only: - - stable + - development install: - npm install @@ -25,6 +25,6 @@ deploy: keep_history: true local_dir: . name: BetterDiscord Deployment - target_branch: gh-pages + target_branch: gh-pages-development on: - branch: stable \ No newline at end of file + branch: development \ No newline at end of file diff --git a/src/modules/core.js b/src/modules/core.js index 2c03543a..cef98540 100644 --- a/src/modules/core.js +++ b/src/modules/core.js @@ -46,8 +46,8 @@ export default new class Core { { name: "bd-stylesheet", type: "style", - url: "https://rauenzi.github.io/BetterDiscordApp/dist/style.css", - backup: "https://gitcdn.xyz/repo/rauenzi/BetterDiscordApp/gh-pages/dist/style.css", + url: "//cdn.staticaly.com/gh/rauenzi/BetterDiscordApp/{{hash}}/dist/style.css", + backup: "https://rauenzi.github.io/BetterDiscordApp/dist/style.css", localPath: "style.css" } ]; @@ -131,14 +131,14 @@ export default new class Core { continue; } } - const url = Utilities.formatString(data.url, {repo: Config.repo, hash: Config.hash}); + const url = Utilities.formatString(data.url, {hash: Config.hash}); Logger.log(`Startup`, `Loading Resource (${url})`); const injector = (data.type == "script" ? DOMManager.injectScript : DOMManager.linkStyle).bind(DOMManager); try { await injector(data.name, url); } catch (err) { - const backup = Utilities.formatString(data.backup, {minified: Config.minified ? ".min" : ""}); + const backup = Utilities.formatString(data.backup); Logger.stacktrace(`Startup`, `Could not load ${url}. Using backup ${backup}`, err); try { await injector(data.name, backup); diff --git a/src/modules/utilities.js b/src/modules/utilities.js index 31d3dd80..2a25efa1 100644 --- a/src/modules/utilities.js +++ b/src/modules/utilities.js @@ -1,10 +1,11 @@ +import {Config} from "data"; import Logger from "./logger"; import DOM from "./domtools"; export default class Utilities { static repoUrl(path) { - return `https://gitcdn.xyz/repo/rauenzi/BetterDiscordApp/gh-pages/${path}`; + return `https://cdn.staticaly.com/gh/rauenzi/BetterDiscordApp/${Config.hash}/${path}`; } /**