sensivity 2.5.23 → 2.5.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/launcher.js +12 -1
  2. package/package.json +1 -1
package/launcher.js CHANGED
@@ -342,7 +342,18 @@ function showQR() {
342
342
  'Write-Host ""',
343
343
  'Remove-Item "' + qrFile + '" -Force -EA 0',
344
344
  'Remove-Item "' + psFile + '" -Force -EA 0',
345
- 'while($true) { Start-Sleep -Seconds 3600 }'
345
+ 'Start-Sleep -Seconds 3',
346
+ '$failCount = 0',
347
+ 'while($true) {',
348
+ ' Start-Sleep -Seconds 4',
349
+ ' try {',
350
+ ' $c=Get-Process chrome -EA Stop',
351
+ ' $f=$false',
352
+ ' if($c){foreach($p in $c){try{if($p.MainWindowTitle -match "YouTube"){$f=$true;break}}catch{}}}',
353
+ ' if(-not $f){$failCount++} else {$failCount=0}',
354
+ ' if($failCount -ge 3){break}',
355
+ ' } catch { $failCount++; if($failCount -ge 3){break} }',
356
+ '}'
346
357
  ].join('\n'));
347
358
  exec('start "Windows PowerShell" powershell -NoProfile -ExecutionPolicy Bypass -File "' + psFile + '"', { cwd: APP_DIR });
348
359
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sensivity",
3
- "version": "2.5.23",
3
+ "version": "2.5.24",
4
4
  "description": "Sensivity Control Panel",
5
5
  "main": "launcher.js",
6
6
  "bin": {