From c591bfbca6c857f184fbfbb3deda93832e968203 Mon Sep 17 00:00:00 2001 From: mrrfv Date: Mon, 8 May 2023 18:07:51 +0200 Subject: [PATCH] Rebrand, finally :) Linux Android Backup -> Open Android Backup --- .github/test-script.sh | 2 +- .../workflows/build-companion-unstable.yml | 8 +- .github/workflows/build-tagged.yml | 8 +- README.md | 28 ++++--- backup-windows.ps1 | 4 +- backup.sh | 2 +- .../android/app/src/main/AndroidManifest.xml | 2 +- companion_app/lib/main.dart | 14 ++-- companion_app/pubspec.yaml | 2 +- extras/backup_archive_info.txt | 4 +- functions/backup_func.sh | 8 +- functions/helper.sh | 10 +-- website/_javascript/main.js | 34 +++++++++ website/css/misc.css | 9 +++ website/index.html | 74 ++++++++++++++++--- website/lib/main.js | 39 +++++++--- website/package.json | 1 + 17 files changed, 184 insertions(+), 65 deletions(-) create mode 100644 website/_javascript/main.js diff --git a/.github/test-script.sh b/.github/test-script.sh index 906dd83..90d9cb3 100644 --- a/.github/test-script.sh +++ b/.github/test-script.sh @@ -1,6 +1,6 @@ #!/bin/bash -adb shell mkdir -p /storage/emulated/0/linux-android-backup-temp +adb shell mkdir -p /storage/emulated/0/open-android-backup-temp export unattended_mode="yes" export selected_action="Backup" diff --git a/.github/workflows/build-companion-unstable.yml b/.github/workflows/build-companion-unstable.yml index 2e0abc0..4dccc13 100644 --- a/.github/workflows/build-companion-unstable.yml +++ b/.github/workflows/build-companion-unstable.yml @@ -22,16 +22,16 @@ jobs: - run: flutter build apk working-directory: ${{ env.working-directory }} - - run: cp -v companion_app/build/app/outputs/apk/release/app-release.apk ./linux-android-backup-companion.apk + - run: cp -v companion_app/build/app/outputs/apk/release/app-release.apk ./open-android-backup-companion.apk - run: sudo apt update && sudo apt install p7zip-full - - run: 7z a -bb3 -tzip -mx9 -x!.*\* -x!website\* -x!companion_app\* Linux_Android_Backup_Unstable_Bundle.zip . + - run: 7z a -bb3 -tzip -mx9 -x!.*\* -x!website\* -x!companion_app\* Open_Android_Backup_Unstable_Bundle.zip . - uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" automatic_release_tag: "latest" # we need to keep this tag for legacy scripts to work (and as a fallback) prerelease: true - title: "Linux Android Backup - Unstable Version" + title: "Open Android Backup - Unstable Version" files: | companion_app/build/app/outputs/apk/release/app-release.apk - Linux_Android_Backup_Unstable_Bundle.zip + Open_Android_Backup_Unstable_Bundle.zip diff --git a/.github/workflows/build-tagged.yml b/.github/workflows/build-tagged.yml index ca1426b..7188497 100644 --- a/.github/workflows/build-tagged.yml +++ b/.github/workflows/build-tagged.yml @@ -25,15 +25,15 @@ jobs: - run: flutter build apk working-directory: ${{ env.working-directory }} - - run: cp -v companion_app/build/app/outputs/apk/release/app-release.apk ./linux-android-backup-companion.apk + - run: cp -v companion_app/build/app/outputs/apk/release/app-release.apk ./open-android-backup-companion.apk - run: sudo apt update && sudo apt install p7zip-full - - run: 7z a -bb3 -tzip -mx9 -x!.*\* -x!website\* -x!companion_app\* Linux_Android_Backup_${{ github.ref_name }}_Bundle.zip . + - run: 7z a -bb3 -tzip -mx9 -x!.*\* -x!website\* -x!companion_app\* Open_Android_Backup_${{ github.ref_name }}_Bundle.zip . - uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" prerelease: false - title: "Linux Android Backup Stable - ${{ github.ref_name }}" + title: "Open Android Backup Stable - ${{ github.ref_name }}" files: | companion_app/build/app/outputs/apk/release/app-release.apk - Linux_Android_Backup_${{ github.ref_name }}_Bundle.zip \ No newline at end of file + Open_Android_Backup_${{ github.ref_name }}_Bundle.zip \ No newline at end of file diff --git a/README.md b/README.md index 68cec17..352ef66 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# Linux Android Backup +# Open Android Backup -Linux Android Backup is a tiny shell script & Flutter app that makes securely backing up Android devices easy, without vendor lock-ins or using closed-source software that could put your data at risk. It's based on ADB but doesn't use the deprecated `adb backup` command. Despite its name, this project works on Windows, macOS and Linux. +Open Android Backup is a tiny shell script & Flutter app that makes securely backing up Android devices easy, without vendor lock-ins or using closed-source software that could put your data at risk. It's based on ADB but doesn't use the deprecated `adb backup` command. This project works on Windows, macOS and Linux. -**Important:** I am looking for volunteers who are interested in helping me with maintaining this project as well as fixing bugs. This project is not being abandoned, I just need a helping hand. +![Demo](https://github.com/mrrfv/open-android-backup/raw/c86602f9e5dbc501e0eacc43fe781c352998e712/.github/images/demo.gif) -![Demo](https://github.com/mrrfv/linux-android-backup/raw/c86602f9e5dbc501e0eacc43fe781c352998e712/.github/images/demo.gif) +**Important:** The `master` branch is reserved for development. If you are looking for a download, please go to Releases or select a tag instead. ## Data backed up @@ -12,7 +12,7 @@ Linux Android Backup is a tiny shell script & Flutter app that makes securely ba The following data types can be automatically restored back to the device. -- Apps (.apk files of installed apps) +- Apps (.apk files of installed apps - split APK support is experimental and can be found in the `split-apk-support` branch) - Internal storage (pictures, downloads, videos, Signal backups if enabled, etc) - Contacts (exported in vCard format) @@ -42,7 +42,7 @@ These things are the majority of what most people would want to keep safe, but e ### Linux 1. Install p7zip, adb, curl, bc, pv and optionally secure-delete. If you're on Debian or Ubuntu, run this command: `sudo apt update; sudo apt install p7zip-full adb curl bc pv secure-delete`. -2. [Download](https://github.com/mrrfv/linux-android-backup/releases/latest) the Linux Android Backup bundle, which contains the script and companion app in one package. You can also grab an experimental build (heavily discouraged) by clicking on [this link](https://github.com/mrrfv/linux-android-backup/archive/refs/heads/master.zip) or cloning. +2. [Download](https://github.com/mrrfv/open-android-backup/releases/latest) the Open Android Backup bundle, which contains the script and companion app in one package. You can also grab an experimental build (heavily discouraged) by clicking on [this link](https://github.com/mrrfv/open-android-backup/archive/refs/heads/master.zip) or cloning. 3. Enable [developer options](https://developer.android.com/studio/debug/dev-options#enable) and USB debugging on your device, then run `backup.sh` in a terminal. ### macOS @@ -65,7 +65,7 @@ brew install p7zip pv bash ### Windows 1. Install the [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/install#install), a compatibility layer allowing you to run Linux applications (such as this one) on Windows. You only need to follow the `Install` step. -2. [Download](https://github.com/mrrfv/linux-android-backup/releases/latest) the Linux Android Backup bundle, which contains the script and companion app in one package. You can also grab an experimental build (heavily discouraged) by clicking on [this link](https://github.com/mrrfv/linux-android-backup/archive/refs/heads/master.zip) or cloning. +2. [Download](https://github.com/mrrfv/open-android-backup/releases/latest) the Open Android Backup bundle, which contains the script and companion app in one package. You can also grab an experimental build (heavily discouraged) by clicking on [this link](https://github.com/mrrfv/open-android-backup/archive/refs/heads/master.zip) or cloning. 3. Open the repository in the file explorer. Right click on a file called `backup-windows.ps1`, and click on "Run with PowerShell". **IMPORTANT: If you see an error after running the script, search for "Developer Settings" in the Settings app, and apply the settings related to PowerShell.** ![Powershell Developer Settings](.github/images/windows-powershell-developer-settings.png) @@ -76,7 +76,7 @@ Just run `backup.sh` and the script will walk you through the process. This sect ### Hooks -Linux Android Backup hooks allow you to effortlessly include your own backup steps, such as those that require root or work only on specific devices, without modifying the main script. You can upload these hooks to your own GitHub repositories and share them with others. +Open Android Backup hooks allow you to effortlessly include your own backup steps, such as those that require root or work only on specific devices, without modifying the main script. You can upload these hooks to your own GitHub repositories and share them with others. **Info for users** @@ -84,9 +84,9 @@ After writing or downloading a hook you'd like to use, rename it to `hooks.sh` a **Info for the security conscious** -Using hooks that you don't trust is a security risk that we don't claim responsibility for! They have the same access over your phone and computer as Linux Android Backup, making it possible for attackers to backdoor or wipe your devices. You must check the contents of the hook you'd like to use before running the script. +Using hooks that you don't trust is a security risk that we don't claim responsibility for! They have the same access over your phone and computer as Open Android Backup, making it possible for attackers to backdoor or wipe your devices. You must check the contents of the hook you'd like to use before running the script. -Linux Android Backup doesn't automatically load hooks, and you have to allow the use of them before they are even touched by the program. +Open Android Backup doesn't automatically load hooks, and you have to allow the use of them before they are even touched by the program. **Info for developers** @@ -122,7 +122,7 @@ There are 8 environment variables that control what the script does without user 3. `archive_path` - Path to the backup. Works for both Restore and Backup actions. 4. `archive_password` - Backup password. 5. `mode` - How the script should connect to the device. Possible values are `Wired` and `Wireless` (case sensitive). -6. `export_method` - The method Linux Android Backup should use to export data from the device. Possible values are `tar` and `adb` (case sensitive) - the former is fast & very stable but might not work on all devices, and the latter is widely compatible but has stability issues. +6. `export_method` - The method Open Android Backup should use to export data from the device. Possible values are `tar` and `adb` (case sensitive) - the former is fast & very stable but might not work on all devices, and the latter is widely compatible but has stability issues. 7. `use_hooks` - Whether to use hooks or not. Possible values are `yes` or `no` (case sensitive). 8. `data_erase_choice` - Whether to securely erase temporary files or not. Possible values are `Fast`, `Slow` and `Extra Slow` (case sensitive). The value of this variable is ignored if the command `srm` isn't present on your computer. @@ -151,6 +151,12 @@ PRs are appreciated. - Improve the error handling and design of the mobile app. - Export the calendar and other data. +## Donations + +This project is supported entirely by your kind donations. Thanks to your support, it was possible to get a real domain for this script - [openandroidbackup.me](https://openandroidbackup.me). By donating, you are contributing to the development of a community-driven project that respects your privacy and data. Please consider making a donation today and help keep this project alive and growing. + +If you'd like to support me and this project, you can do so by clicking the Sponsor button on the top of the GitHub page or directly visiting the [Liberapay page](https://liberapay.com/mrrfv/). + ## License This program is free software: you can redistribute it and/or modify diff --git a/backup-windows.ps1 b/backup-windows.ps1 index 496ef38..368acdf 100644 --- a/backup-windows.ps1 +++ b/backup-windows.ps1 @@ -1,6 +1,6 @@ -Write-Output "This script lets you use linux-android-backup on Windows." +Write-Output "This script lets you use open-android-backup on Windows." Write-Output "Please ensure that you've installed the Windows Subsystem for Linux and a distro (Ubuntu or Debian) prior to running this script." -Write-Output "If not, close this window, and refer to the README for instructions (https://github.com/mrrfv/linux-android-backup#windows=)" +Write-Output "If not, close this window, and refer to the README for instructions (https://github.com/mrrfv/open-android-backup#windows=)" Write-Output "If sudo asks you for your account password, don't enter your Windows password!" Write-Output "" Write-Output "Warning: WSL 2 is required. WSL will be updated to fix potential issues with the GUI." diff --git a/backup.sh b/backup.sh index de751d2..9cd13cc 100755 --- a/backup.sh +++ b/backup.sh @@ -75,7 +75,7 @@ fi if command -v srm &> /dev/null then if [ ! -v data_erase_choice ]; then - cecho "Linux Android Backup creates a temporary folder that contains all the data exported from your device." + cecho "Open Android Backup creates a temporary folder that contains all the data exported from your device." cecho "Leftovers from this folder might remain on your storage device, even after a successful backup or restore." cecho "The options below allow you to securely erase this data, making it harder for law enforcement and other adversaries to view your files." cecho "Your choice will also apply to cleanups, i.e. if the script has previously crashed without removing the files." diff --git a/companion_app/android/app/src/main/AndroidManifest.xml b/companion_app/android/app/src/main/AndroidManifest.xml index f1f1d0e..d7b3c76 100644 --- a/companion_app/android/app/src/main/AndroidManifest.xml +++ b/companion_app/android/app/src/main/AndroidManifest.xml @@ -9,7 +9,7 @@ { // Recreate the temp directory if it already exists. final Directory directory = - Directory("/storage/emulated/0/linux-android-backup-temp"); + Directory("/storage/emulated/0/open-android-backup-temp"); if (await directory.exists()) { await directory.delete(recursive: true); } @@ -89,7 +89,7 @@ class _HomeState extends State { for (var i = 0; i < contacts.length; i++) { final String vCard = contacts[i].toVCard(withPhoto: true); final File file = File( - "/storage/emulated/0/linux-android-backup-temp/linux-android-backup-contact-$i.vcf"); + "/storage/emulated/0/open-android-backup-temp/open-android-backup-contact-$i.vcf"); file.writeAsString(vCard); setState(() { contactsExported = i + 1; @@ -121,7 +121,7 @@ class _HomeState extends State { String csv = const ListToCsvConverter().convert(processedMessages); final File smsFileExport = File( - "/storage/emulated/0/linux-android-backup-temp/SMS_Messages.csv"); + "/storage/emulated/0/open-android-backup-temp/SMS_Messages.csv"); smsFileExport.writeAsString(csv); // Show a dialog if the export is complete @@ -203,7 +203,7 @@ class _HomeState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: const Center(child: Text('Linux Android Backup Companion')), + title: const Center(child: Text('Open Android Backup Companion')), ), body: SingleChildScrollView( child: Padding( @@ -215,10 +215,10 @@ class _HomeState extends State { style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold), ), const Text( - "The Linux Android Backup companion app allows for backups of data not normally accessible through adb. No data is uploaded to a remote server: it is saved to the internal storage and then read by the script running on your computer.", + "The Open Android Backup companion app allows for backups of data not normally accessible through adb. No data is uploaded to a remote server: it is saved to the internal storage and then read by the script running on your computer.", ), const Text( - "This app requires the Linux Android Backup script running on your computer."), + "This app requires the Open Android Backup script running on your computer."), // data export section const Text( "Export Data", diff --git a/companion_app/pubspec.yaml b/companion_app/pubspec.yaml index ff55747..58ff50b 100644 --- a/companion_app/pubspec.yaml +++ b/companion_app/pubspec.yaml @@ -1,5 +1,5 @@ name: companion_app -description: Companion app for Linux Android Backup, an easy-to-use tool to backup and restore Android devices. +description: Companion app for Open Android Backup, an easy-to-use tool to backup and restore Android devices. # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. diff --git a/extras/backup_archive_info.txt b/extras/backup_archive_info.txt index f66666b..c29a855 100644 --- a/extras/backup_archive_info.txt +++ b/extras/backup_archive_info.txt @@ -1,4 +1,4 @@ -This is a backup archive created by Linux Android Backup. -For more information, please visit the project's GitHub repository: https://github.com/mrrfv/linux-android-backup +This is a backup archive created by Open Android Backup. +For more information, please visit the project's GitHub repository: https://github.com/mrrfv/open-android-backup "version.txt" is a file containing the version of the script when this backup was created; this data might be used in the future to improve backwards compatibility. Please avoid changing its contents. \ No newline at end of file diff --git a/functions/backup_func.sh b/functions/backup_func.sh index 52526d9..52a17d6 100644 --- a/functions/backup_func.sh +++ b/functions/backup_func.sh @@ -59,11 +59,11 @@ function backup_func() { # Export contacts and SMS messages cecho "Exporting contacts (as vCard) and SMS messages (as CSV)." mkdir ./backup-tmp/Contacts - get_file /storage/emulated/0/linux-android-backup-temp . ./backup-tmp/Contacts + get_file /storage/emulated/0/open-android-backup-temp . ./backup-tmp/Contacts mkdir ./backup-tmp/SMS mv ./backup-tmp/Contacts/SMS_Messages.csv ./backup-tmp/SMS cecho "Removing temporary files created by the companion app." - adb shell rm -rf /storage/emulated/0/linux-android-backup-temp + adb shell rm -rf /storage/emulated/0/open-android-backup-temp # Export internal storage cecho "Exporting internal storage - this will take a while." @@ -104,7 +104,7 @@ function backup_func() { # -mx=9: ultra compression # -bb3: verbose logging # The undefined variable (archive_password) is set by the user if they're using unattended mode - declare backup_archive="$archive_path/linux-android-backup-$(date +%m-%d-%Y-%H-%M-%S).7z" + declare backup_archive="$archive_path/open-android-backup-$(date +%m-%d-%Y-%H-%M-%S).7z" retry 5 7z a -p"$archive_password" -mhe=on -mx=9 -bb3 "$backup_archive" backup-tmp/* # We're not using 7-Zip's -sdel option (delete files after compression) to honor the user's choice to securely delete temporary files after a backup @@ -121,7 +121,7 @@ function backup_func() { fi cecho "Backed up successfully." - cecho "Note: SMS messages and call logs cannot be restored by Linux Android Backup at the moment. They are included in the backup archive for your own purposes." + cecho "Note: SMS messages and call logs cannot be restored by Open Android Backup at the moment. They are included in the backup archive for your own purposes." cecho "You can find them by opening the backup archive using 7-Zip." rm -rf backup-tmp > /dev/null } \ No newline at end of file diff --git a/functions/helper.sh b/functions/helper.sh index 0915452..903cc3b 100644 --- a/functions/helper.sh +++ b/functions/helper.sh @@ -42,25 +42,25 @@ function uninstall_companion_app() { function install_companion_app() { # Don't run this function in GitHub Actions or another CI if [ ! -v CI ]; then - cecho "Linux Android Backup will install a companion app on your device, which will allow for contacts and other data to be backed up and restored." + cecho "Open Android Backup will install a companion app on your device, which will allow for contacts and other data to be backed up and restored." cecho "The companion app is open-source, and you can see what it's doing under the hood on GitHub." - if [ ! -f linux-android-backup-companion.apk ]; then + if [ ! -f open-android-backup-companion.apk ]; then cecho "Downloading companion app." # -L makes curl follow redirects, -f returns an exit code different than 0 when the request fails - if curl -L -f -o linux-android-backup-companion.apk "https://github.com/mrrfv/linux-android-backup/releases/download/$APP_VERSION/app-release.apk" ; then + if curl -L -f -o open-android-backup-companion.apk "https://github.com/mrrfv/open-android-backup/releases/download/$APP_VERSION/app-release.apk" ; then echo "Stable version downloaded successfully" else # A fallback to the unstable build prevents a 'race condition' where the user executes the latest version of the script while # GitHub hasn't finished building the companion app yet. cecho "Couldn't download stable version! Trying an unstable build." - curl -L -f -o linux-android-backup-companion.apk "https://github.com/mrrfv/linux-android-backup/releases/download/latest/app-release.apk" + curl -L -f -o open-android-backup-companion.apk "https://github.com/mrrfv/open-android-backup/releases/download/latest/app-release.apk" fi else cecho "Companion app already downloaded." fi uninstall_companion_app cecho "Installing companion app." - adb install -r linux-android-backup-companion.apk + adb install -r open-android-backup-companion.apk cecho "Granting required permissions to companion app." permissions=( 'android.permission.READ_CONTACTS' diff --git a/website/_javascript/main.js b/website/_javascript/main.js new file mode 100644 index 0000000..a5d2e60 --- /dev/null +++ b/website/_javascript/main.js @@ -0,0 +1,34 @@ +'use strict'; + +const install_guides_ids = ["install-linux", "install-macos", "install-windows"] + +function hide_all_guides() { + for (const id of install_guides_ids) { + document.getElementById(id).style.display = 'none'; + } +} + +function change_install_guide(guide) { + const element = guide || document.location.hash.replace('#', ''); + + if (install_guides_ids.includes(element)) { + hide_all_guides(); + document.getElementById(element).style.display = 'block'; + } +} + +document.addEventListener('hashchange', change_install_guide); +document.addEventListener('DOMContentLoaded', function () { + hide_all_guides(); + // if a guide hash is already present in the url, this will show the respective guide + change_install_guide(); + + document.querySelectorAll("#installPlatforms ul li a").forEach(el => { + el.addEventListener('click', function (el) { + const guide = new URL(el.target.href).hash.replace("#", ""); + change_install_guide(guide); + }); + }) + +}); + diff --git a/website/css/misc.css b/website/css/misc.css index 72ad629..02af0bc 100644 --- a/website/css/misc.css +++ b/website/css/misc.css @@ -35,4 +35,13 @@ svg { .installGuides ol { text-align: initial; +} + +.customTabs ul { + display: flex; + flex-direction: row; +} + +.slightly-rounded { + border-radius: 5px; } \ No newline at end of file diff --git a/website/index.html b/website/index.html index 17dd96b..9d4c392 100644 --- a/website/index.html +++ b/website/index.html @@ -4,7 +4,12 @@ - %lab% - A Cross-Platform, Easy-to-Use Android Backup Tool + + + + + + Open Android Backup - Securely & Easily Backup Your Android Devices @@ -16,15 +21,15 @@

- %lab% + Open Android Backup

- A complete, easy to use package that lets you locally backup and restore your Android device. + A complete, easy to use script that lets you locally backup and restore your Android device.

Formerly called Linux Android Backup.

+
+

Early Demo GIF

+
+ +
+
-

Why %lab%?

+

Why Open Android Backup?


@@ -68,7 +79,7 @@

Why %lab%?

Completely Free & Open Source - Formats Included!

- We believe that your data should stay yours. %lab% uses 7-Zip to pack the data exported from your device into a 'backup archive', ensuring that you can access your data, even if you don't have access to this script or it gets removed by chance. It is also completely free, with no 'premium features' locked behind a paywall. + We believe that your data should stay yours. Open Android Backup uses 7-Zip to pack the data exported from your device into a 'backup archive', ensuring that you can access your data, even if you don't have access to this script or it gets removed by chance. It is also completely free, with no 'premium features' locked behind a paywall.

@@ -80,7 +91,7 @@

Why %lab%?

Truly Cross-Platform

- %lab% can back up and restore devices on Linux, macOS and Windows. This ensures that you are not locked in to a single operating system due to this script. + Open Android Backup can back up and restore devices on Linux, macOS and Windows. This ensures that you are not locked in to a single operating system due to this script.

@@ -123,7 +134,31 @@

And more...

+
+ +
+

Check the GitHub repository for further details.

+
@@ -177,7 +227,7 @@

Installation Instructions for macOS<

Donate using Liberapay - +

diff --git a/website/lib/main.js b/website/lib/main.js index a5d2e60..0abc18b 100644 --- a/website/lib/main.js +++ b/website/lib/main.js @@ -1,15 +1,36 @@ 'use strict'; -const install_guides_ids = ["install-linux", "install-macos", "install-windows"] +var install_guides_ids = ["install-linux", "install-macos", "install-windows"]; function hide_all_guides() { - for (const id of install_guides_ids) { - document.getElementById(id).style.display = 'none'; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = install_guides_ids[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var id = _step.value; + + document.getElementById(id).style.display = 'none'; + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } } } function change_install_guide(guide) { - const element = guide || document.location.hash.replace('#', ''); + var element = guide || document.location.hash.replace('#', ''); if (install_guides_ids.includes(element)) { hide_all_guides(); @@ -23,12 +44,10 @@ document.addEventListener('DOMContentLoaded', function () { // if a guide hash is already present in the url, this will show the respective guide change_install_guide(); - document.querySelectorAll("#installPlatforms ul li a").forEach(el => { + document.querySelectorAll("#installPlatforms ul li a").forEach(function (el) { el.addEventListener('click', function (el) { - const guide = new URL(el.target.href).hash.replace("#", ""); + var guide = new URL(el.target.href).hash.replace("#", ""); change_install_guide(guide); }); - }) - -}); - + }); +}); \ No newline at end of file diff --git a/website/package.json b/website/package.json index 26ece5f..f3aaa17 100644 --- a/website/package.json +++ b/website/package.json @@ -30,6 +30,7 @@ "css-postcss": "postcss --use autoprefixer --output css/main.css css/main.css", "css-watch": "npm run css-build -- --watch", "deploy": "npm run css-deploy && npm run js-build", + "deploy:prod": "npm run css-deploy && npm run js-build && npx minify-all-cli -s ./ -d ./ --skipFileExtensions=.mp3 --skipFileExtensions=.mp4 --logLevel=warn", "js-build": "babel _javascript --out-dir lib", "js-watch": "npm run js-build -- --watch", "start": "npm-run-all --parallel css-watch js-watch"