File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
Expand file tree Collapse file tree 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
486486 options.logService.error(`${logPrefix} socketFactory.connect() failed. Error:`);
487487diff --git a/src/vs/server/browser/client.ts b/src/vs/server/browser/client.ts
488488new file mode 100644
489- index 0000000000..95e70869f2
489+ index 0000000000..3f53907de0
490490--- /dev/null
491491+++ b/src/vs/server/browser/client.ts
492- @@ -0,0 +1,224 @@
492+ @@ -0,0 +1,227 @@
493493+ import { Emitter } from 'vs/base/common/event';
494494+ import { URI } from 'vs/base/common/uri';
495495+ import { localize } from 'vs/nls';
@@ -518,6 +518,9 @@ index 0000000000..95e70869f2
518518+
519519+ const TELEMETRY_SECTION_ID = 'telemetry';
520520+
521+ + const el = document.getElementById("vscode-disable-telemetry");
522+ + const disableTelemetry = el && el.getAttribute("data-value") === "true" || false;
523+ +
521524+ Registry.as<IConfigurationRegistry>(Extensions.Configuration).registerConfiguration({
522525+ 'id': TELEMETRY_SECTION_ID,
523526+ 'order': 110,
@@ -527,7 +530,7 @@ index 0000000000..95e70869f2
527530+ 'telemetry.enableTelemetry': {
528531+ 'type': 'boolean',
529532+ 'description': localize('telemetry.enableTelemetry', 'Enable usage data and errors to be sent to a Microsoft online service.'),
530- + 'default': true ,
533+ + 'default': !disableTelemetry ,
531534+ 'tags': ['usesOnlineServices']
532535+ }
533536+ }
Original file line number Diff line number Diff line change 2323 < meta id ="vscode-remote-commit " data-settings ="{{COMMIT}} " />
2424 < meta id ="vscode-remote-product-configuration " data-settings ="{{PRODUCT_CONFIGURATION}} " />
2525 < meta id ="vscode-remote-nls-configuration " data-settings ="{{NLS_CONFIGURATION}} " />
26+ < meta id ="vscode-disable-telemetry " data-value ="{{DISABLE_TELEMETRY}} " />
2627
2728 <!-- Workbench Icon/Manifest/CSS -->
2829 < 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 {
205205 . replace ( `"{{PRODUCT_CONFIGURATION}}"` , `'${ JSON . stringify ( options . productConfiguration ) } '` )
206206 . replace ( `"{{WORKBENCH_WEB_CONFIGURATION}}"` , `'${ JSON . stringify ( options . workbenchWebConfiguration ) } '` )
207207 . replace ( `"{{NLS_CONFIGURATION}}"` , `'${ JSON . stringify ( options . nlsConfiguration ) } '` )
208+ . replace ( "{{DISABLE_TELEMETRY}}" , this . args [ "disable-telemetry" ] ? "true" : "false" )
208209 return this . replaceTemplates ( route , response )
209210 }
210211
You can’t perform that action at this time.
0 commit comments