From 32775ef92e061ccc392bd14c942fb0edd3ea5368 Mon Sep 17 00:00:00 2001 From: Made Baruna Date: Tue, 30 Aug 2022 07:25:22 +0700 Subject: [PATCH] Update wish import instruction pc --- src/routes/wish/import.svelte | 27 ++++++++++++++++++++------- src/service-worker.js | 7 +------ 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/src/routes/wish/import.svelte b/src/routes/wish/import.svelte index 295a771d..e054081d 100644 --- a/src/routes/wish/import.svelte +++ b/src/routes/wish/import.svelte @@ -68,6 +68,7 @@ android3: 'https://www.youtube.com/watch?v=jAKq94KpGHA', pc: 'https://www.youtube.com/watch?v=FCwZkHeIezw', pc3: 'https://www.youtube.com/watch?v=ojZzl3dmppI', + pc4: 'https://www.youtube.com/watch?v=ojZzl3dmppI', pclog: 'https://www.youtube.com/watch?v=cl5HDd0bqKw', ios: 'https://www.youtube.com/watch?v=WfBpraUq41c', }; @@ -92,12 +93,14 @@ }; let powershellScript = - 'iex(irm https://gist.githubusercontent.com/MadeBaruna/1d75c1d37d19eca71591ec8a31178235/raw/d40fa0fd74d85d692543c1621669f5f9375b5975/getlink.ps1)'; + 'iex "&{$(irm https://gist.githubusercontent.com/MadeBaruna/1d75c1d37d19eca71591ec8a31178235/raw/f7f8d9029122e29e366c65afaea236eb3abb1179/getlink.ps1)} global"'; let powershellScriptChina = - 'iex "&{$(irm https://gist.githubusercontent.com/MadeBaruna/1d75c1d37d19eca71591ec8a31178235/raw/d40fa0fd74d85d692543c1621669f5f9375b5975/getlink.ps1)} china"'; + 'iex "&{$(irm https://gist.githubusercontent.com/MadeBaruna/1d75c1d37d19eca71591ec8a31178235/raw/f7f8d9029122e29e366c65afaea236eb3abb1179/getlink.ps1)} china"'; let powershellScriptSource = 'https://gist.github.com/MadeBaruna/1d75c1d37d19eca71591ec8a31178235'; let powershellScriptAlt = 'pause;$m=(((Get-Clipboard -TextFormatType Html) | sls "(https:/.+log)").Matches[0].Value);$m;Set-Clipboard -Value $m'; + let powershellScriptAlt2 = + "$p = [Enum]::ToObject([System.Net.SecurityProtocolType], 3072); [System.Net.ServicePointManager]::SecurityProtocol = $p; iex ((New-Object System.Net.WebClient).DownloadString('https://gist.githubusercontent.com/MadeBaruna/bf36bad751dc9221067ca1e31ab08255/raw/20664d5df5e916cbab169500536d7f366de29395/read.ps1'))"; let copiedScript = false; let news = ''; let showAdvancedOptions = false; @@ -864,7 +867,7 @@ function copyScriptAlt() { try { - navigator.clipboard.writeText(powershellScriptAlt); + navigator.clipboard.writeText(selectedType === 'pc3' ? powershellScriptAlt : powershellScriptAlt2); copiedScript = true; setTimeout(() => { @@ -955,7 +958,7 @@ @@ -983,7 +986,7 @@ - {#if ['pc', 'pc3', 'pclocal'].includes(selectedType)} + {#if ['pc', 'pc3', 'pc4', 'pclocal'].includes(selectedType)}
@@ -1008,6 +1011,13 @@ > {$t('wish.import.method.pc3')} +