File tree 3 files changed +8
-3
lines changed 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -486,10 +486,10 @@ index eab8591492..26668701f7 100644
486
486
options.logService.error(`${logPrefix} socketFactory.connect() failed. Error:`);
487
487
diff --git a/src/vs/server/browser/client.ts b/src/vs/server/browser/client.ts
488
488
new file mode 100644
489
- index 0000000000..95e70869f2
489
+ index 0000000000..3f53907de0
490
490
--- /dev/null
491
491
+++ b/src/vs/server/browser/client.ts
492
- @@ -0,0 +1,224 @@
492
+ @@ -0,0 +1,227 @@
493
493
+ import { Emitter } from 'vs/base/common/event';
494
494
+ import { URI } from 'vs/base/common/uri';
495
495
+ import { localize } from 'vs/nls';
@@ -518,6 +518,9 @@ index 0000000000..95e70869f2
518
518
+
519
519
+ const TELEMETRY_SECTION_ID = 'telemetry';
520
520
+
521
+ + const el = document.getElementById("vscode-disable-telemetry");
522
+ + const disableTelemetry = el && el.getAttribute("data-value") === "true" || false;
523
+ +
521
524
+ Registry.as<IConfigurationRegistry>(Extensions.Configuration).registerConfiguration({
522
525
+ 'id': TELEMETRY_SECTION_ID,
523
526
+ 'order': 110,
@@ -527,7 +530,7 @@ index 0000000000..95e70869f2
527
530
+ 'telemetry.enableTelemetry': {
528
531
+ 'type': 'boolean',
529
532
+ 'description': localize('telemetry.enableTelemetry', 'Enable usage data and errors to be sent to a Microsoft online service.'),
530
- + 'default': true ,
533
+ + 'default': !disableTelemetry ,
531
534
+ 'tags': ['usesOnlineServices']
532
535
+ }
533
536
+ }
Original file line number Diff line number Diff line change 23
23
< meta id ="vscode-remote-commit " data-settings ="{{COMMIT}} " />
24
24
< meta id ="vscode-remote-product-configuration " data-settings ="{{PRODUCT_CONFIGURATION}} " />
25
25
< meta id ="vscode-remote-nls-configuration " data-settings ="{{NLS_CONFIGURATION}} " />
26
+ < meta id ="vscode-disable-telemetry " data-value ="{{DISABLE_TELEMETRY}} " />
26
27
27
28
<!-- Workbench Icon/Manifest/CSS -->
28
29
< link rel ="icon " href ="{{BASE}}/static/{{COMMIT}}/src/browser/media/favicon.ico " type ="image/x-icon " />
Original file line number Diff line number Diff line change @@ -205,6 +205,7 @@ export class VscodeHttpProvider extends HttpProvider {
205
205
. replace ( `"{{PRODUCT_CONFIGURATION}}"` , `'${ JSON . stringify ( options . productConfiguration ) } '` )
206
206
. replace ( `"{{WORKBENCH_WEB_CONFIGURATION}}"` , `'${ JSON . stringify ( options . workbenchWebConfiguration ) } '` )
207
207
. replace ( `"{{NLS_CONFIGURATION}}"` , `'${ JSON . stringify ( options . nlsConfiguration ) } '` )
208
+ . replace ( "{{DISABLE_TELEMETRY}}" , this . args [ "disable-telemetry" ] ? "true" : "false" )
208
209
return this . replaceTemplates ( route , response )
209
210
}
210
211
You can’t perform that action at this time.
0 commit comments