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:
parent
109898a10d
commit
d0bae9abe1
2 changed files with 22 additions and 16 deletions
|
@ -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);
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -189,14 +189,16 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a
|
<template v-if="not_extension">
|
||||||
:data-theme="theme"
|
<a
|
||||||
class="twitter-timeline"
|
:data-theme="theme"
|
||||||
data-width="300"
|
class="twitter-timeline"
|
||||||
href="https://twitter.com/FrankerFaceZ?ref_src=twsrc%5Etfw"
|
data-width="300"
|
||||||
>
|
href="https://twitter.com/FrankerFaceZ?ref_src=twsrc%5Etfw"
|
||||||
{{ t('home.tweets', 'Tweets by FrankerFaceZ') }}
|
>
|
||||||
</a>
|
{{ t('home.tweets', 'Tweets by FrankerFaceZ') }}
|
||||||
|
</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,13 +245,14 @@ export default {
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
let el;
|
let el;
|
||||||
document.head.appendChild(el = e('script', {
|
if ( this.not_extension )
|
||||||
id: 'ffz--twitter-widget-script',
|
document.head.appendChild(el = e('script', {
|
||||||
async: true,
|
id: 'ffz--twitter-widget-script',
|
||||||
charset: 'utf-8',
|
async: true,
|
||||||
src: 'https://platform.twitter.com/widgets.js',
|
charset: 'utf-8',
|
||||||
onLoad: () => el.remove()
|
src: 'https://platform.twitter.com/widgets.js',
|
||||||
}));
|
onLoad: () => el.remove()
|
||||||
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue