Go back to statically with a hash

This commit is contained in:
Zack Rauen 2020-07-30 14:58:50 -04:00
parent 9dce255998
commit d85f455a0d
3 changed files with 9 additions and 2145 deletions

2138
dist/style.css vendored

File diff suppressed because one or more lines are too long

View File

@ -24,8 +24,8 @@ const dependencies = [
{
name: "bd-stylesheet",
type: "style",
url: "//rauenzi.github.io/BetterDiscordApp/dist/style.min.css",
backup: "//gitcdn.xyz/repo/rauenzi/BetterDiscordApp/gh-pages/dist/style.min.css"
url: `//cdn.staticaly.com/gh/rauenzi/BetterDiscordApp/{{hash}}/dist/style.css`,
backup: "//rauenzi.github.io/BetterDiscordApp/dist/style.css"
}
];

View File

@ -23,31 +23,31 @@ EmoteModule.prototype.init = async function () {
const emoteInfo = {
TwitchGlobal: {
url: `https://gitcdn.xyz/repo/rauenzi/BetterDiscordApp/gh-pages/assets/emotedata_twitch_global.json`,
url: `https://cdn.staticaly.com/gh/rauenzi/BetterDiscordApp/${bdConfig.hash}/assets/emotedata_twitch_global.json`,
variable: "TwitchGlobal",
oldVariable: "emotesTwitch",
getEmoteURL: (e) => `https://static-cdn.jtvnw.net/emoticons/v1/${e}/1.0`
},
TwitchSubscriber: {
url: `https://gitcdn.xyz/repo/rauenzi/BetterDiscordApp/gh-pages/assets/emotedata_twitch_subscriber.json`,
url: `https://cdn.staticaly.com/gh/rauenzi/BetterDiscordApp/${bdConfig.hash}/assets/emotedata_twitch_subscriber.json`,
variable: "TwitchSubscriber",
oldVariable: "subEmotesTwitch",
getEmoteURL: (e) => `https://static-cdn.jtvnw.net/emoticons/v1/${e}/1.0`
},
FrankerFaceZ: {
url: `https://gitcdn.xyz/repo/rauenzi/BetterDiscordApp/gh-pages/assets/emotedata_ffz.json`,
url: `https://cdn.staticaly.com/gh/rauenzi/BetterDiscordApp/${bdConfig.hash}/assets/emotedata_ffz.json`,
variable: "FrankerFaceZ",
oldVariable: "emotesFfz",
getEmoteURL: (e) => `https://cdn.frankerfacez.com/emoticon/${e}/1`
},
BTTV: {
url: `https://gitcdn.xyz/repo/rauenzi/BetterDiscordApp/gh-pages/assets/emotedata_bttv.json`,
url: `https://cdn.staticaly.com/gh/rauenzi/BetterDiscordApp/${bdConfig.hash}/assets/emotedata_bttv.json`,
variable: "BTTV",
oldVariable: "emotesBTTV",
getEmoteURL: (e) => `https://cdn.betterttv.net/emote/${e}/1x`
},
BTTV2: {
url: `https://gitcdn.xyz/repo/rauenzi/BetterDiscordApp/gh-pages/assets/emotedata_bttv2.json`,
url: `https://cdn.staticaly.com/gh/rauenzi/BetterDiscordApp/${bdConfig.hash}/assets/emotedata_bttv2.json`,
variable: "BTTV2",
oldVariable: "emotesBTTV2",
getEmoteURL: (e) => `https://cdn.betterttv.net/emote/${e}/1x`
@ -248,7 +248,7 @@ EmoteModule.prototype.downloadEmotes = function(emoteMeta) {
EmoteModule.prototype.getBlacklist = function () {
return new Promise(resolve => {
require("request").get({url: "https://gitcdn.xyz/repo/rauenzi/BetterDiscordApp/gh-pages/assets/emotefilter.json", json: true}, function (err, resp, data) {
require("request").get({url: "https://cdn.staticaly.com/gh/rauenzi/BetterDiscordApp/${bdConfig.hash}/assets/emotefilter.json", json: true}, function (err, resp, data) {
if (err) return resolve(bemotes);
resolve(bemotes.splice(0, 0, ...data.blacklist));
});