Difference between revisions of "Widget:Twitter-timeline"
Line 9: | Line 9: | ||
== Copy to your site == | == Copy to your site == | ||
To use this widget on your site, just install [https://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy the [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki as page '''{{FULLPAGENAME}}'''. | To use this widget on your site, just install [https://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy the [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki as page '''{{FULLPAGENAME}}'''. | ||
− | </noinclude><includeonly><script | + | </noinclude><includeonly><script> |
− | + | $ ( window ) .on (' load ', function () { | |
− | + | $ (' iframe [id ^ = twitter-widget-0] ') .each ( function () { | |
+ | var head = $ ( this ) .contents () .find (' head '); | ||
+ | if ( head . length ) { | ||
+ | setTimeout ( function () { | ||
+ | head .append (' <style>'+ | ||
+ | ' .timeline {max-width: 100%! important; width: 100%! important;} '+ | ||
+ | '. timeline. stream {max-width: none! important; width: 100%! important;} '+ | ||
+ | ' .timeline-widget {max-width: 100%! important;} '+ | ||
+ | '. SandboxRoot.env-bp-660.timeline-Tweet-text {font-size: 16px; line-height: 21px; } '+ | ||
+ | ' .MediaCard-media {max-width: 400px;} </ style> ');}, 20); | ||
+ | } | ||
+ | }); | ||
+ | }); | ||
+ | </ script> | ||
<div class="twitter-feed"> | <div class="twitter-feed"> | ||
<div class="container"> | <div class="container"> |
Latest revision as of 16:23, 7 June 2019
This widget allows you to embed a Twitter feed (HTML version) on your wiki page.
Originally created by Sergey Chernyshev. Updated code created by Emmanuel Engelhart (pulled from Phabricator: T207716)
Using this widget
For information on how to use this widget, see widget description page on MediaWikiWidgets.org.
Copy to your site
To use this widget on your site, just install MediaWiki Widgets extension and copy the full source code of this page to your wiki as page Widget:Twitter-timeline.