()
| 58 | } |
| 59 | |
| 60 | pub fn user_script() -> String { |
| 61 | let user_script_content = fs::read_to_string(script_path()).unwrap_or_else(|_| "".to_string()); |
| 62 | format!( |
| 63 | "window.addEventListener('DOMContentLoaded', function() {{\n{}\n}})", |
| 64 | user_script_content |
| 65 | ) |
| 66 | } |
| 67 | |
| 68 | pub fn open_file(path: PathBuf) { |
| 69 | let pathname = convert_path(path.to_str().unwrap()); |
no test coverage detected