diff options
Diffstat (limited to 'src/url.rs')
| -rw-r--r-- | src/url.rs | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -23,6 +23,7 @@ pub fn make( fallback: bool, is_proxy: &mut bool, is_raw: &mut bool, + is_nocss: &mut bool, ) -> Result<Url, gmi::url::UrlParseError> { Ok( match Url::try_from(&*if path.starts_with("/proxy") { @@ -50,6 +51,15 @@ pub fn make( path.replace("/raw/", ""), if fallback { "/" } else { "" } ) + } else if path.starts_with("/nocss") { + *is_proxy = true; + *is_nocss = true; + + format!( + "gemini://{}{}", + path.replace("/nocss/", ""), + if fallback { "/" } else { "" } + ) } else { // Try to set `ROOT` as `ROOT` environment variable, or use // `"gemini://fuwn.me"` as default. |