userscript

Crates.iouserscript
lib.rsuserscript
version0.1.0
created_at2025-01-24 13:57:07.799006+00
updated_at2025-01-24 13:57:07.799006+00
descriptionuserscript
homepagehttps://github.com/ahaoboy/userscript
repositoryhttps://github.com/ahaoboy/userscript
max_upload_size
id1529452
size9,145
阿豪 (ahaoboy)

documentation

README

Parsing the metadata of the Tampermonkey script

let mut us = UserScript::try_from(
r#"// ==UserScript==
// @author       You
// ==/UserScript=="#,
)
.unwrap();

us.set("author", "Me");

assert_eq!(us.get("author"), Some(&"Me".to_string()))
Commit count: 2

cargo fmt