TikTok → LiveContainer (iOS)

Redirect TikTok links to LiveContainer so they open in the containerized TikTok app.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
sharmanhall
今日安裝
0
安裝總數
12
評價
0 0 0
版本
0.4
建立日期
2025-09-20
更新日期
2025-09-20
尺寸
3.6 KB
授權條款
MIT
腳本執行於
所有網站

TikTok → LiveContainer (iOS)

Redirect any TikTok HTTPS link to the LiveContainer app on iOS so it opens in your containerized TikTok. No tracking, no external requests—just smart link handling.

Author: @sharmanhall


What it does

  • Auto-redirects when you’re browsing tiktok.com in Safari to LiveContainer.
  • Rewrites TikTok links on any site so tapping them opens LiveContainer → TikTok (inside the container).
  • Uses the LC scheme: livecontainer://open-web-page?url=BASE64(https://…tiktok link…)
  • Adds a tiny lc=1 guard to avoid bounce loops.
  • Catches dynamically inserted links (MutationObserver).
  • iOS-only safeguard (won’t trigger on desktop).

Requirements

  • iPhone/iPad with Safari.
  • LiveContainer installed.
  • TikTok installed inside LiveContainer.
  • A userscript manager on iOS:

    • Tampermonkey for Safari, or
    • The free Userscripts app.

How to use

  1. Install/enable this userscript.
  2. Make sure TikTok is installed in LiveContainer.
  3. Visit any tiktok.com page or tap a TikTok link anywhere. → Safari hands it to LiveContainer, which opens TikTok in the container.

Options (edit at top of script)

  • VERBOSE – console logging.
  • AUTO_REDIRECT_ON_TIKTOK_PAGES – bounce automatically when already on tiktok.com.
  • REWRITE_LINKS_ON_ALL_PAGES – intercept TikTok links anywhere.
  • ADD_LC_FLAG – append lc=1 to prevent back/forward loops.

Privacy

  • No analytics, no remote calls.
  • Operates entirely on-device by intercepting clicks and changing navigation.

Known limitations / notes

  • iOS will not register tiktok:// for apps inside LiveContainer. This script works with HTTPS TikTok links only.
  • If nothing happens when tapping a link, confirm:

    • LiveContainer is installed and opens via livecontainer:// URLs.
    • TikTok is present inside LiveContainer and can handle https://tiktok.com links via “Open in App”.

Uninstall / disable

  • Turn off the script in your userscript manager.
  • Or set AUTO_REDIRECT_ON_TIKTOK_PAGES = false to keep browsing the TikTok website but still rewrite links elsewhere.

Changelog

  • v0.4 – First public release: auto-redirect, link rewriting, loop guard, dynamic link handling, iOS check.

License

MIT.