Currently TruClient Lite Chrome doesn’t support batch script operations. If the user want to back up all the local scripts, then they have to manually download the scripts one by one.
There are two ways to back up the scripts
- All the scripts are saved in the user data directory. So back up the user data directory will back up the script indirectly.
- We could use a hack way to download all the scripts as a single zip file.
Steps to back up user data folder
- Check the path from the command line of the shortcut of your TruClient Lite Chrome
- --user-data-dir=<profile dir> --extensions-on-chrome-urls --silent-debugger-extension-api --disable-web-security --no-first-run
- Back up the folder <profile dir>
Steps to download all the scripts as a single zip file
- Start the TruClient Lite
- Navigate to chrome://extensions/ to open the extension management pages for Chrome
- Check the Developer mode
- Click background page link for TruClient Lite
- Run the below code on console, the scripts will be saved
- var zip = new JSZip(); localforage.iterate((v, k) => { if(k.startsWith('/__scripts__/') && k.indexOf(':metadata:') === -1){ zip.file(k.split('/').pop()+'.zip', v); } }).then(()=>{ a = document.createElement('a'); a.href = window.URL.createObjectURL(zip.generate({type:"blob"})); a.download = "scripts.zip"; a.dispatchEvent(new MouseEvent("click")); });
- Restart TruClient Lite
Cool, Edwin
Thank you Mike.