1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-28 05:15:54 +00:00

This is a maintenance commit, while working towards building a version of the extension that can be packaged to not use the CDN.

This commit is contained in:
SirStendec 2023-05-29 17:18:43 -04:00
parent 109898a10d
commit d0bae9abe1
2 changed files with 22 additions and 16 deletions

View file

@ -21,5 +21,6 @@
script.async = true; script.async = true;
script.crossOrigin = 'anonymous'; script.crossOrigin = 'anonymous';
script.src = `${SERVER}/${FLAVOR}.js?_=${Date.now()}`; script.src = `${SERVER}/${FLAVOR}.js?_=${Date.now()}`;
document.body.classList.add('ffz-ext');
document.head.appendChild(script); document.head.appendChild(script);
})(); })();

View file

@ -189,6 +189,7 @@
</a> </a>
</div> </div>
<template v-if="not_extension">
<a <a
:data-theme="theme" :data-theme="theme"
class="twitter-timeline" class="twitter-timeline"
@ -197,6 +198,7 @@
> >
{{ t('home.tweets', 'Tweets by FrankerFaceZ') }} {{ t('home.tweets', 'Tweets by FrankerFaceZ') }}
</a> </a>
</template>
</div> </div>
</div> </div>
</template> </template>
@ -207,6 +209,7 @@
import HOME_MD from '../home.md'; import HOME_MD from '../home.md';
import {createElement as e} from 'utilities/dom'; import {createElement as e} from 'utilities/dom';
import { EXTENSION } from 'utilities/constants';
export default { export default {
props: ['item', 'context'], props: ['item', 'context'],
@ -217,7 +220,8 @@ export default {
theme: '', theme: '',
addons: null, addons: null,
new_addons: null, new_addons: null,
unseen: this.item.getUnseen() unseen: this.item.getUnseen(),
not_extension: ! EXTENSION
} }
}, },
@ -241,6 +245,7 @@ export default {
mounted() { mounted() {
let el; let el;
if ( this.not_extension )
document.head.appendChild(el = e('script', { document.head.appendChild(el = e('script', {
id: 'ffz--twitter-widget-script', id: 'ffz--twitter-widget-script',
async: true, async: true,