Skip to content

Commit

Permalink
Update bluefox.script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
HeyHamachi committed Feb 18, 2024
1 parent 2474f5b commit f4b80ff
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/js/bluefox.script.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,22 @@ export class BlueFoxScript {
);
return this;
}
saveTail(title, description, object) {
let R = JSON.parse(JSON.stringify(this.tail));

R.meta.title = title;
R.meta.description = description;

Object.assign(document.createElement("a"), {
href: window.URL.createObjectURL(
new Blob([JSON.stringify(Object.assign(R, object), null, 4)], {
type: "application/json",
})
),
download: `${title}.json`,
}).click();
return this;
}
})();
return R;
}
Expand Down

0 comments on commit f4b80ff

Please sign in to comment.