Skip to content

Commit

Permalink
updating browserscript to better render media
Browse files Browse the repository at this point in the history
  • Loading branch information
its-a-feature committed Oct 17, 2024
1 parent 54fdb88 commit 926e794
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions Payload_Type/arachne/arachne/browser_scripts/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,10 @@ function(task, responses){
if(responses.length > 0){
try{
let data = responses[0].split("\n")[1].split(": ")[1];
return {"download":[{
return {"media": [{
"filename": task.display_params,
"agent_file_id": data,
"variant": "contained",
"name": "Download",
"plaintext": "Download the file here: "
}], "search": [{
"plaintext": "View on the search page here: ",
"hoverText": "opens a new search page",
"search": "tab=files&searchField=Filename&search=" + task.display_params,
"name": "Click Me!"
}]};
}]}
}catch(error){
const combined = responses.reduce( (prev, cur) => {
return prev + cur;
Expand Down

0 comments on commit 926e794

Please sign in to comment.