No more "More Tweets" by adding question mark

By adding a question mark to the end of the Twitter URL on an individual tweet, you can avoid seeing the "More Tweets" message.

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

You will need to install an extension such as Tampermonkey to install this script.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name         No more "More Tweets" by adding question mark
// @namespace    https://github.com/tractortoby/no-more-more-tweets
// @version      0.6
// @description  By adding a question mark to the end of the Twitter URL on an individual tweet, you can avoid seeing the "More Tweets" message.
// @author       https://twitter.com/runningtractor
// @icon         https://raw.githubusercontent.com/tractortoby/no-more-more-tweets/main/runningtractor.png
// @grant        none
// @license      MIT
// @run-at       document-idle
// @match        *://twitter.com/*/status/*
// @match        *://mobile.twitter.com/*/status/*
// @exclude      *://twitter.com/settings/*
// @exclude      *://twitter.com/*/status/*/photo/*
// @exclude      *://twitter.com/*/status/*/video/*
// ==/UserScript==

const questionMarkIndex = window.location.href.indexOf('?');

if (window.location.href.length > questionMarkIndex + 1) {
  // Remove all the URL parameters after the "?"
  window.location.href = window.location.href.slice(0, questionMarkIndex + 1);
}

const regex = /\/status\/\d+$/;

if (regex.test(window.location.href)) {
  if (window.location.href.slice(-1) !== '?') {
    window.location.href += '?';
  }
}