MCPcopy Create free account
hub / github.com/NsLearning/LangHelper / user_script

Function user_script

ChatGPT/src-tauri/src/utils.rs:60–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58}
59
60pub 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
68pub fn open_file(path: PathBuf) {
69 let pathname = convert_path(path.to_str().unwrap());

Callers 2

tray_windowFunction · 0.85
initFunction · 0.85

Calls 1

script_pathFunction · 0.85

Tested by

no test coverage detected