Skip to content
Snippets Groups Projects
Commit 28d6017f authored by moon's avatar moon
Browse files

Moved twitter.js only in LandingPage.vue

parent c30ebc44
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,6 @@
<strong>We're sorry but web doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<script src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<!-- built files will be auto injected -->
</body>
......
......@@ -418,7 +418,27 @@ export default {
// console.log(this.$route.query)
// console.log(this.$route.query.q)
this.search(this.$route.query.q, this.$route.query.t, this.$route.query.s);
twttr.widgets.load(document.getElementsByClassName('twitter-timeline'));
window.twttr = (function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0],
t = window.twttr || {};
if (d.getElementById(id)) return t;
js = d.createElement(s);
js.id = id;
js.src = "https://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
t._e = [];
t.ready = function(f) {
t._e.push(f);
};
return t;
}(document, "script", "twitter-wjs"));
if(window.twttr.widgets){
window.twttr.widgets.load(document.getElementsByClassName('twitter-timeline'));
}
},
methods: {
onSelect(item) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment