1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-27 21:05:53 +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

@ -189,14 +189,16 @@
</a>
</div>
<a
:data-theme="theme"
class="twitter-timeline"
data-width="300"
href="https://twitter.com/FrankerFaceZ?ref_src=twsrc%5Etfw"
>
{{ t('home.tweets', 'Tweets by FrankerFaceZ') }}
</a>
<template v-if="not_extension">
<a
:data-theme="theme"
class="twitter-timeline"
data-width="300"
href="https://twitter.com/FrankerFaceZ?ref_src=twsrc%5Etfw"
>
{{ t('home.tweets', 'Tweets by FrankerFaceZ') }}
</a>
</template>
</div>
</div>
</template>
@ -207,6 +209,7 @@
import HOME_MD from '../home.md';
import {createElement as e} from 'utilities/dom';
import { EXTENSION } from 'utilities/constants';
export default {
props: ['item', 'context'],
@ -217,7 +220,8 @@ export default {
theme: '',
addons: null,
new_addons: null,
unseen: this.item.getUnseen()
unseen: this.item.getUnseen(),
not_extension: ! EXTENSION
}
},
@ -241,13 +245,14 @@ export default {
mounted() {
let el;
document.head.appendChild(el = e('script', {
id: 'ffz--twitter-widget-script',
async: true,
charset: 'utf-8',
src: 'https://platform.twitter.com/widgets.js',
onLoad: () => el.remove()
}));
if ( this.not_extension )
document.head.appendChild(el = e('script', {
id: 'ffz--twitter-widget-script',
async: true,
charset: 'utf-8',
src: 'https://platform.twitter.com/widgets.js',
onLoad: () => el.remove()
}));
},
methods: {