mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
chore: add lint
This commit is contained in:
@@ -42,10 +42,7 @@ pub fn dalle2_window(
|
||||
let app = handle.clone();
|
||||
|
||||
let query = if query.is_some() {
|
||||
format!(
|
||||
"window.addEventListener('DOMContentLoaded', function() {{\nwindow.__CHATGPT_QUERY__='{}';\n}})",
|
||||
query.unwrap()
|
||||
)
|
||||
format!("window.addEventListener('DOMContentLoaded', function() {{\nwindow.__CHATGPT_QUERY__='{}';\n}})", query.unwrap())
|
||||
} else {
|
||||
"".to_string()
|
||||
};
|
||||
|
||||
@@ -44,7 +44,14 @@ pub fn script_path() -> PathBuf {
|
||||
let script_file = chat_root().join("main.js");
|
||||
if !exists(&script_file) {
|
||||
create_file(&script_file).unwrap();
|
||||
fs::write(&script_file, format!("// *** ChatGPT User Script ***\n// @github: https://github.com/lencx/ChatGPT \n// @path: {}\n\nconsole.log('🤩 Hello ChatGPT!!!');", &script_file.to_string_lossy())).unwrap();
|
||||
fs::write(
|
||||
&script_file,
|
||||
format!(
|
||||
"// *** ChatGPT User Script ***\n// @github: https://github.com/lencx/ChatGPT \n// @path: {}\n\nconsole.log('🤩 Hello ChatGPT!!!');",
|
||||
&script_file.to_string_lossy()
|
||||
),
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
script_file
|
||||
|
||||
Reference in New Issue
Block a user