Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- uses greasemonkey built in objects (GM_)
- uses jquery
- CSS:
- ====
- .WES_tweet_embed_frame {
- width: 90%;
- height: 500px;
- }
- */
- $( document ).ready(function(){
- $( '.tweet' ).each(function() {
- var tweetId = $(this).attr("data-tweet");
- GM_addStyle('.twitter-tweet, .twitter-tweet-rendered { display: none !important; }');
- $(this).removeAttr("data-tweet").removeAttr("data-loaded");
- $(this).addClass('WES_tweet').removeClass('tweet');
- $(this).empty();
- var embedHtml = `
- <iframe id="WES_nitter_${tweetId}" class="WES_tweet_embed_frame" data-tweet="${tweetId}" loading="lazy"
- src="https://nitter.net/embed/Tweet.html?id=${tweetId}"></iframe>
- `;
- $(this).html(embedHtml);
- });
- $( ".twitter-tweet-rendered" ).each(function(){
- $(this).remove();
- });
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement