Userstyles ![Build Status](https://img.shields.io/crates/v/userstyles.svg?style=flat-square)
Documentation
Userstyles
provides API bindings for userstyles.org
.
This makes it possible to get styles, their settings and other metadata.
For getting all information about a style you can use get_style
.
use get_style;
// Style URL: "https://userstyles.org/styles/37035/github-dark"
let style = get_style;
If you just want to access the css with the default settings you can
use the get_css
method with None
as parameter.
use Style;
let style = default;
let css = style.get_css;
If you are interested in the css, but want to change the settings,
you can also use get_css
. This takes a HashMap
with all keys and values you want to set.
You can get all the available settings from Style.style_settings
.
The API requires all keys to start with ik-
, so this is added automatically by
get_css
. The install_key
of StyleSetting
does not start with
ik-
and works without modification. But when getting keys from differen sources,
please make sure they do not start with ik-
.
use Style;
use HashMap;
let style = default;
let mut map = new;
map.insert;
let css = style.get_css;