-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement share url function to export current script as gzipped data url inital lame version adds a menu item to export ![image](https://github.com/hrgdavor/jscadui/assets/2480762/3c24e210-2562-4623-8f24-6c34c685ff1c) copies the url to clipboard, and writes url to console todo - [x] ui feedback - [x] will not work for multifile projects a warnign to user should be displayed ... - [x] we also need some kind of state to know if current script is multifile
- Loading branch information
Showing
5 changed files
with
74 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export function str2ab(str) { | ||
var arrBuff = new ArrayBuffer(str.length); | ||
var bytes = new Uint8Array(arrBuff); | ||
for (var iii = 0; iii < str.length; iii++) { | ||
bytes[iii] = str.charCodeAt(iii); | ||
} | ||
return bytes; | ||
} |