framework
framework copied to clipboard
support configuring custom CDN for various default plugins
Add a CDN option to emoji plug-in to solve the problem that JSDELIVR is unavailable in some areas.I think it's a good way to solve it(Translate by google)
+1 on this, jsdelivr is currently unaccessible in China mainland (TCP connection gets reset during https handshake). due to political reasons, public CDNs often doesn't live well in China (especially when they serve GitHub contents, which jsdelivr do), so it's VERY nice to specify custom private/commercial CDNs.
ref to related code:
https://github.com/flarum/emoji/blob/4582249a632be02e84b70ed54e2d01bd88820e6f/js/src/forum/cdn.js#L5 https://github.com/flarum/pusher/blob/b76645df6c92f53bd96ae3178344a1d0340cba41/js/src/forum/index.ts#L23
I believe I should cc @askvortsov1
ref https://github.com/flarum/framework/issues/822 https://github.com/flarum/framework/issues/3353
@Burial0268 please change the title into something like support configuring custom CDN for various official plugins
thanks
@Burial0268 please change the title into something like
support configuring custom CDN for various official plugins
oh thanks for your noticed
Also ref: https://github.com/flarum/emoji/pull/46
it seems that more individual components of flarum are integrated with jsdelivr than expected. it's there a true way out rather than dirty patches? patches destroys upgradability...
Hi, is there a plan how to support this setting option? I simply modified the Emoji Picker extension:

function loadEmojioneArea() {
if (emojioneAreaLoaded) {
return Promise.resolve();
}
emojioneAreaLoaded = true;
return new Promise(resolve => {
const style = document.createElement('link');
style.rel = 'stylesheet';
style.crossOrigin = 'anonymous';
style.integrity = 'sha256-LKawN9UgfpZuYSE2HiCxxDxDgLOVDx2R4ogilBI52oc=';
style.href = `${app.forum.attribute('emojioneAreaAssetsSource')}/[email protected]/dist/emojionearea.min.css`;
document.head.appendChild(style);
const script = document.createElement('script');
script.crossOrigin = 'anonymous';
script.integrity = 'sha256-ImIFrmJd7ymGlVw2MbtI96BNPW4NfcKqM3d1Go665Ig=';
script.src = `${app.forum.attribute('emojioneAreaAssetsSource')}/[email protected]/dist/emojionearea.min.js`;
script.onload = resolve;
document.body.appendChild(script);
});
}
is this discussed somewhere else? could anyone post a link here, maybe toward some discussion in the official forum?
apart from https://github.com/flarum/emoji/pull/46 is is not discussed anywhere else as far as I know.
no one cares about accessibility or what? why?
We will get to it eventually, there's a lot on our plate.