twitter-widget

Twitter widget on Angular 2

杀马特。学长 韩版系。学妹 提交于 2019-12-30 07:23:31
问题 I created a Twitter widget and I'm trying to put it in my Angular 2 project, but the JS file does not work. If I insert it with JS (Here) it works, but when I switch to another tab and back (I have Angular Routing installed) it disappears and shows whatever is in A tag (so, "Tweets by ..."). HTML code (it's in home component): <md-card-content> <a class="twitter-timeline" data-lang="en" data-height="350" data-theme="light" data-chrome="noborders nofooter noheader noscrollbar transparent" href

Twitter widgets.js throws JavaScript error “Expected identifier” on IE8

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-19 21:23:13
问题 Anybody run into a JavaScript error when trying to run Twitter For Web widgets.js on Internet Explorer 8 (IE8)? If so, do you know how to fix this or how to handle it gracefully? CODE Just adding this block of code, which loads the widgets.js file throws an error on IE8: <script> window.twttr = (function (d, s, id) { var t, js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src= "https://platform.twitter.com/widgets.js"; fjs

Twitter share button (widget) not working with jquery fadeout function in firefox

落花浮王杯 提交于 2019-12-04 02:04:17
问题 I'm using firefox 50.1.0 when I add fadeout or fadein jquery functions the twitter share button doesn't show up. The iframe is getting loaded but the button is not showing up. The button works fine in all browsers except FIREFOX. This my fiddle https://jsfiddle.net/trvh8r12/ <!DOCTYPE html> <html > <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> </head> <body> <div class=

Twitter widget on Angular 2

徘徊边缘 提交于 2019-12-01 13:43:56
I created a Twitter widget and I'm trying to put it in my Angular 2 project, but the JS file does not work. If I insert it with JS ( Here ) it works, but when I switch to another tab and back (I have Angular Routing installed) it disappears and shows whatever is in A tag (so, "Tweets by ..."). HTML code (it's in home component): <md-card-content> <a class="twitter-timeline" data-lang="en" data-height="350" data-theme="light" data-chrome="noborders nofooter noheader noscrollbar transparent" href="https://twitter.com/profile">Tweets by profile</a> </md-card-content> Script in home.component.ts,

Twitter share button (widget) not working with jquery fadeout function in firefox

こ雲淡風輕ζ 提交于 2019-12-01 12:04:09
I'm using firefox 50.1.0 when I add fadeout or fadein jquery functions the twitter share button doesn't show up. The iframe is getting loaded but the button is not showing up. The button works fine in all browsers except FIREFOX. This my fiddle https://jsfiddle.net/trvh8r12/ <!DOCTYPE html> <html > <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> </head> <body> <div class="container" id="form-puzzle"> <div class="col-md-12 text-align"> <button class="btn btn-success btn-md

embedded Twitter widget on Angular 2+ app only shows up on the first page load

坚强是说给别人听的谎言 提交于 2019-12-01 01:14:33
My app works perfectly if I copy exactly the built-in function from Twitter docs ( https://dev.twitter.com/web/javascript/loading ) into ngAfterViewInit function, but when I switch the route, the widget disappears also. Here is the code to work only for the first page load: import { Component, OnInit, OnDestroy, AfterViewInit } from '@angular/core'; import { Router, NavigationEnd, ActivatedRoute, ParamMap, Params } from '@angular/router'; import { Observable, Subscription } from 'rxjs/Rx'; export class ProjectDetailComponent implements OnInit, OnDestroy, AfterViewInit { constructor( private

embedded Twitter widget on Angular 2+ app only shows up on the first page load

自作多情 提交于 2019-11-30 21:11:16
问题 My app works perfectly if I copy exactly the built-in function from Twitter docs (https://dev.twitter.com/web/javascript/loading) into ngAfterViewInit function, but when I switch the route, the widget disappears also. Here is the code to work only for the first page load: import { Component, OnInit, OnDestroy, AfterViewInit } from '@angular/core'; import { Router, NavigationEnd, ActivatedRoute, ParamMap, Params } from '@angular/router'; import { Observable, Subscription } from 'rxjs/Rx';