Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
Napture: support https:// lua scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
face-hh committed May 19, 2024
1 parent 73e0ef1 commit 2401c15
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion napture/src/b9/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ pub async fn build_ui(
let tagss = Rc::clone(&tags);

if !src.is_empty() {
let luacode = fetch_file(tab.url.clone() + "/" + &src).await;
let luacode = if src.starts_with("https://") {
fetch_file(src).await
} else {
fetch_file(tab.url.clone() + "/" + &src).await
};

if let Err(e) = super::lua::run(luacode, tags).await {
println!("ERROR: Failed to run lua: {}", e);
Expand Down

0 comments on commit 2401c15

Please sign in to comment.