f323ba1
//! 站点不允许内嵌,渲染成带平台标识的卡片。
use crate::parse::{EmbedRule, Platform};
use crate::Category;
pub struct Replit;
impl Platform for Replit {
fn id(&self) -> &'static str {
"replit"
}
fn name(&self) -> &'static str {
"Replit"
}
fn category(&self) -> Category {
Category::Dev
}
fn domains(&self) -> &'static [&'static str] {
&["replit.com", "repl.it"]
}
fn embed_rule(&self) -> Option<EmbedRule> {
None
}
/// oEmbed 接口,聊天侧联网补全标题 / 简介 / 封面(iframe 仅在平台自有域名下采用)。
fn oembed(&self) -> Option<&'static str> {
Some("https://replit.com/data/oembed?url={url_enc}")
}
}
pub static PLATFORM: Replit = Replit;