Fix Twitter Share Link

Replace `twitter` to `vxtwitter` when sharing links

< Обсуждения: Fix Twitter Share Link

Отзыв: Нормальный — скрипт работает, но имеет существенные недостатки

Made a few tweaks for current twitter urls: added to header

// @match https://x.com/*

and adjusted lines 22 and 23 to the following:

        if (selected.match(/^https+:\/\/((.+)\.)?x\.com\/(.+)\/status\/(\d+)(\?.+)?$/)) {
            const newUrl = selected.replace(/^https+:\/\/((.+)\.)?x\.com\/(.+)\/status\/(\d+)(\?.+)?$/, 'https://vxtwitter.com/$3/status/$4');

Updated, thank you

Ответить

Войдите, чтобы ответить.