Skip to main content

LegacySites

Struct LegacySites 

Source
pub struct LegacySites;
Expand description

既定の(これまでと同じ)サイト別の対応。

Trait Implementations§

Source§

impl SiteHooks for LegacySites

Source§

fn load_settle_ms(&self, host: &str) -> Option<u64>

YouTube は complete で部品を接続するので、アプリが組み上がる(DOM の節点数が 3 秒変わらない)まで待つ。 【2026-10-23】1 秒では視聴ページ(ytd-watch-flexy の中身)が組み上がる前に complete になり、 後から入った部品(ytd-watch-metadata 等)が接続されなかった。【2026-11-28】エンジンの共通処理からここへ移した。

Source§

fn page_tick(&self, url_with_hash: &str, frame_depth: u32, js: &mut dyn Any)

【2026-11-03 診断】YouTube の証明(PO トークン)の準備がどこまで進んだかを 15 秒ごとに記録する。 ページの inline スクリプトの ytAtP/ytAtN → kevlar の ytAtRC → BotGuard(trayride)→ bevasrsg.bevasrs(player が待つ)の順に進む。読むだけで値は変えない(TODO B0)。

Source§

fn fetch_is_special(&self, method: &str, full_url: &str) -> bool

この要求は、要求・応答に手を入れる対象か(YouTube の SABR: googlevideo への POST)。
Source§

fn fetch_rewrite_request( &self, url: &str, body: &[u8], ) -> (String, Option<Vec<u8>>)

対象の要求の URL と本文を整える。(使う URL, 差し替えた本文)。本文を変えなければ None。
Source§

fn fetch_on_response(&self, raw: &mut Vec<u8>)

対象の要求の応答を見る(記録・警告)。
Source§

fn is_streaming_url(&self, host: &str, path: &str) -> bool

動画のストリーミングの取得か(取得全体の上限から外す対象)。
Source§

fn user_agent(&self, host: &str) -> Option<&'static str>

このホストへの既定の User-Agent(None なら既定の AtmOS/1.0)。
Source§

fn offline_page( &self, current_host: &str, current_path: &str, current_is_https: bool, is_post: bool, post_body: &str, ) -> Option<String>

リンクが下がっているときの代わりのページ。
Source§

fn rewrite_response( &self, current_host: &str, current_path: &str, current_is_https: bool, body: String, ) -> String

受け取った本文を整える(検索結果ページの再生成など)。対象外なら本文をそのまま返す。
Source§

fn load_failed_page( &self, current_host: &str, current_path: &str, current_is_https: bool, e: &str, ) -> Option<String>

取得に失敗したときの代わりのページ。
Source§

fn patch_script(&self, url: &str, s: &mut String)

スクリプトの本文を取り込むときの差し替え(対象の URL だけ。web_engine/layout.rs)。
Source§

fn is_dark_host(&self, host: &str) -> bool

Source§

fn initial_page(&self) -> (&'static str, &'static str)

ページを開く前の初期の表示 (ホスト, 題)。
リンク先が検索サイトの中継 URL なら、その先の URL(直接開く)。
Source§

fn default_bookmarks(&self) -> Vec<(&'static str, &'static str)>

既定のブックマーク (題, URL)(「AtmOS Home」の次に並べる)。
Source§

fn omnibox_prefix_suggestion(&self, q: &str) -> Option<(String, String)>

入力の先頭の語(yt など)による直接の候補 (題, URL)。
Source§

fn search_suggestion_url(&self, s: &str) -> String

Web 検索の候補を開く URL。
Source§

fn navigate_shortcut(&self, input: &str) -> Option<(String, String)>

入力の近道(g / yt など)。(ホスト, パス)(https で開く)。
入力が URL でも近道でもないときの既定の検索。(ホスト, パス)(https で開く)。
Source§

fn search_suggestions(&self, text: &str) -> Vec<String>

入力に対する検索の候補(模擬)。
Source§

fn media_stream_begin(&self)

MSE の再生を始める。
Source§

fn media_stream_end(&self)

MSE の再生を終える・止める。
Source§

fn media_stream_playback_head(&self, ms: u64)

再生位置(ms)を伝える。
Source§

fn media_stream_refill(&self, ms_id: usize) -> bool

足りなくなった媒体を取り足す。起こしたら真。
Source§

fn map_embed(&self, url: &str) -> Option<Embed>

URL が地図の埋め込みなら、その範囲とマーカー。
Source§

fn map_tile_url(&self, z: u32, x: i64, y: i64) -> String

地図のタイルの URL(ズーム・x・y)。

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.