react-tweet
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -11,2 +11,5 @@ const SYNDICATION_URL = 'https://cdn.syndication.twimg.com'; | ||
const TWEET_ID = /^[0-9]+$/; | ||
function getToken(id) { | ||
return (Number(id) / 1e15 * Math.PI).toString(6 ** 2).replace(/(0+|\.)/g, ''); | ||
} | ||
/** | ||
@@ -27,4 +30,7 @@ * Fetches a tweet from the Twitter syndication API. | ||
'tfw_refsrc_session:on', | ||
'tfw_fosnr_soft_interventions_enabled:on', | ||
'tfw_show_birdwatch_pivots_enabled:on', | ||
'tfw_show_business_verified_badge:on', | ||
'tfw_duplicate_scribes_to_settings:on', | ||
'tfw_use_profile_image_shape_enabled:on', | ||
'tfw_show_blue_verified_badge:on', | ||
@@ -36,2 +42,3 @@ 'tfw_legacy_timeline_sunset:true', | ||
].join(';')); | ||
url.searchParams.set('token', getToken(id)); | ||
const res = await fetch(url.toString(), fetchOptions); | ||
@@ -38,0 +45,0 @@ const isJson = (_res_headers_get = res.headers.get('content-type')) == null ? void 0 : _res_headers_get.includes('application/json'); |
{ | ||
"name": "react-tweet", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"repository": "https://github.com/vercel-labs/react-tweet.git", | ||
@@ -5,0 +5,0 @@ "author": "Luis Alvarez (https://twitter.com/luis_fades)", |
88259
2460