diff --git a/app/Services/MetaData.php b/app/Services/MetaData.php index f4fefd2bf..d5f347c7d 100644 --- a/app/Services/MetaData.php +++ b/app/Services/MetaData.php @@ -130,23 +130,6 @@ private function parse(string $content): Collection } } - if ($data->has('site_name') && $data->get('site_name') === 'X (formerly Twitter)') { - $x = $this->fetchOEmbed( - service: 'https://publish.twitter.com/oembed', - options: [ - 'dnt' => 'true', - 'omit_script' => 'true', - 'hide_thread' => 'true', - 'maxwidth' => '446', - 'maxheight' => '251', - ]); - if ($x->isNotEmpty()) { - foreach ($x as $key => $value) { - $data->put($key, $value); - } - } - } - if ($data->has('site_name') && $data->get('site_name') === 'Vimeo') { $vimeo = $this->fetchOEmbed( service: 'https://vimeo.com/api/oembed.json', diff --git a/resources/js/theme-switch.js b/resources/js/theme-switch.js index 58e5d2b07..8a3e300bc 100644 --- a/resources/js/theme-switch.js +++ b/resources/js/theme-switch.js @@ -36,23 +36,6 @@ const themeSwitch = () => ({ if (this.currentTheme !== newTheme) { this.currentTheme = newTheme; - this.renderTweets(newTheme); - } - }, - - renderTweets(theme) { - const tweetContainers = document.querySelectorAll('div[data-tweet-id]'); - - if (tweetContainers.length > 0) { - tweetContainers.forEach(container => { - container.innerHTML = ''; - - window.twttr.widgets.createTweet(container.dataset.tweetId, container, { - theme: theme, - conversation: 'none', - align: 'center', - }); - }); } }, }); diff --git a/resources/views/components/link-preview-card.blade.php b/resources/views/components/link-preview-card.blade.php index a800c8383..16521bc49 100644 --- a/resources/views/components/link-preview-card.blade.php +++ b/resources/views/components/link-preview-card.blade.php @@ -4,16 +4,9 @@ class="mx-auto mt-2 min-w-full group/preview" data-navigate-ignore="true" > @if ($data->has('html')) - @if ($data->get('site_name') === 'X (formerly Twitter)') - @php($tweetId = explode('/', $url)) -