Skip to content

Commit

Permalink
Remove notranslate 2 (#2504)
Browse files Browse the repository at this point in the history
* remove 'notranslate' (1)

* remove 'notranslate' 2
  • Loading branch information
peterbe committed Feb 19, 2021
1 parent 2a14c0e commit f6f11d2
Show file tree
Hide file tree
Showing 1,000 changed files with 2,073 additions and 2,073 deletions.
4 changes: 2 additions & 2 deletions files/en-us/web/api/abortsignal/abort_event/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h2 id="Examples">Examples</h2>

<p>You can use the <code>abort</code> event in an <code><a href="/en-US/docs/Web/API/EventTarget/addEventListener">addEventListener</a></code> method:</p>

<pre class="brush: js notranslate">var controller = new AbortController();
<pre class="brush: js">var controller = new AbortController();
var signal = controller.signal;

signal.addEventListener('abort', function() {
Expand All @@ -48,7 +48,7 @@ <h2 id="Examples">Examples</h2>

<p>Or use the <code><a href="/en-US/docs/Web/API/AbortSignal/onabort">onabort</a></code> event handler property:</p>

<pre class="brush: js notranslate">var controller = new AbortController();
<pre class="brush: js">var controller = new AbortController();
var signal = controller.signal;

signal.onabort = function() {
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/abortsignal/aborted/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate">var isAborted = abortSignal.aborted;</pre>
<pre class="brush: js">var isAborted = abortSignal.aborted;</pre>

<h3 id="Value">Value</h3>

Expand All @@ -25,7 +25,7 @@ <h2 id="Examples">Examples</h2>

<p>In the following snippet, we create a new <code>AbortController</code> object, and get its {{domxref("AbortSignal")}} (available in the <code>signal</code> property). Later on we check whether or not it the signal has been aborted using the <code>aborted</code> property, and send an appropriate log to the console.</p>

<pre class="brush: js notranslate">var controller = new AbortController();
<pre class="brush: js">var controller = new AbortController();
var signal = controller.signal;

// ...
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/abortsignal/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h2 id="Examples">Examples</h2>

<p>When the <a href="/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch">fetch request</a> is initiated, we pass in the <code>AbortSignal</code> as an option inside the request's options object (see <code>{signal}</code>, below). This associates the signal and controller with the fetch request and allows us to abort it by calling {{domxref("AbortController.abort()")}}, as seen below in the second event listener.</p>

<pre class="brush: js notranslate">var controller = new AbortController();
<pre class="brush: js">var controller = new AbortController();
var signal = controller.signal;

var downloadBtn = document.querySelector('.download');
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/abortsignal/onabort/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate">abortSignal.onabort = function() { ... };</pre>
<pre class="brush: js">abortSignal.onabort = function() { ... };</pre>

<h2 id="Examples">Examples</h2>

<p>In the following snippet, we create a new <code>AbortController</code> object, and get its {{domxref("AbortSignal")}} (available in the <code>signal</code> property). Later on we check whether or not it the signal has been aborted using the <code>onabort</code> property, and send an appropriate log to the console.</p>

<pre class="brush: js notranslate">var controller = new AbortController();
<pre class="brush: js">var controller = new AbortController();
var signal = controller.signal;

signal.onabort = function() {
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/ambient_light_events/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h2 id="Light_Events">Light Events</h2>

<h2 id="Example">Example</h2>

<pre class="brush: js notranslate">if ('ondevicelight' in window) {
<pre class="brush: js">if ('ondevicelight' in window) {
window.addEventListener('devicelight', function(event) {
var body = document.querySelector('body');
if (event.value &lt; 50) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate">var ambientLightSensor = new AmbientLightSensor(options)</pre>
<pre class="brush: js">var ambientLightSensor = new AmbientLightSensor(options)</pre>

<h3 id="Parameters">Parameters</h3>

Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/ambientlightsensor/illuminance/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate">var <em>level</em> = AmbientLightSensor.illuminance</pre>
<pre class="brush: js">var <em>level</em> = AmbientLightSensor.illuminance</pre>

<h3 id="Value">Value</h3>

<p>A {{jsxref('Number')}} indicating the current light level in lux.</p>

<h2 id="Example">Example</h2>

<pre class="brush: js notranslate">if ( 'AmbientLightSensor' in window ) {
<pre class="brush: js">if ( 'AmbientLightSensor' in window ) {
const sensor = new AmbientLightSensor();
sensor.onreading = () =&gt; {
console.log('Current light level:', sensor.illuminance);
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/ambientlightsensor/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h2 id="Properties">Properties</h2>

<h2 id="Example">Example</h2>

<pre class="brush: js notranslate">if ( 'AmbientLightSensor' in window ) {
<pre class="brush: js">if ( 'AmbientLightSensor' in window ) {
const sensor = new AmbientLightSensor();
sensor.onreading = () =&gt; {
console.log('Current light level:', sensor.illuminance);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate">var currentTimeValues = animation.getComputedTiming();</pre>
<pre class="brush: js">var currentTimeValues = animation.getComputedTiming();</pre>

<h3 id="Parameters">Parameters</h3>

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/animationeffect/gettiming/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate">animationTiming = animation.getTiming();</pre>
<pre class="brush: js">animationTiming = animation.getTiming();</pre>

<h3 id="Returns">Returns</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate">animation.updateTiming(timing);</pre>
<pre class="brush: js">animation.updateTiming(timing);</pre>

<h3 id="Parameters">Parameters</h3>

Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/animationtimeline/currenttime/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate">var <em>currentTime</em> = <em>AnimationTimeline</em>.currentTime;</pre>
<pre class="brush: js">var <em>currentTime</em> = <em>AnimationTimeline</em>.currentTime;</pre>

<h3 id="Value">Value</h3>

Expand All @@ -30,7 +30,7 @@ <h2 id="Reduced_time_precision">Reduced time precision</h2>
<p>To offer protection against timing attacks and fingerprinting, the precision of <code>animationTimeline.currentTime</code> might get rounded depending on browser settings.<br>
In Firefox, the <code>privacy.reduceTimerPrecision</code> preference is enabled by default and defaults to 20us in Firefox 59; in 60 it will be 2ms.</p>

<pre class="brush: js notranslate">// reduced time precision (2ms) in Firefox 60
<pre class="brush: js">// reduced time precision (2ms) in Firefox 60
animationTimeline.currentTime;
// 23.404
// 24.192
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audiolistener/speedofsound/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate">var <em>audioCtx</em> = new AudioContext();
<pre class="brush: js">var <em>audioCtx</em> = new AudioContext();
var <em>myListener</em> = <em>audioCtx</em>.listener;
<em>myListener</em>.speedOfSound = 343.3;
</pre>
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audionode/connect/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate">var <em>destinationNode</em> = <em>AudioNode</em>.connect(<em>destination</em>, <em>outputIndex</em>, <em>inputIndex</em>);
<pre class="brush: js">var <em>destinationNode</em> = <em>AudioNode</em>.connect(<em>destination</em>, <em>outputIndex</em>, <em>inputIndex</em>);

<em>AudioNode</em>.connect(<em>destination</em>, <em>outputIndex</em>);
</pre>
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audionode/context/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<h2 id="Syntax">Syntax</h2>

<pre
class="brush: js notranslate">var <em>aContext</em> = <em>anAudioNode</em>.context;</pre>
class="brush: js">var <em>aContext</em> = <em>anAudioNode</em>.context;</pre>

<h3 id="Value">Value</h3>

Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/audionode/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h3 id="Creating_an_AudioNode">Creating an <code>AudioNode</code></h3>

<p>There are two ways to create an <code>AudioNode</code>: via the <em>constructor</em> and via the <em>factory method</em>.</p>

<pre class="brush: js; notranslate">// constructor
<pre class="brush: js;">// constructor
const analyserNode = new AnalyserNode(audioCtx, {
fftSize: 2048,
maxDecibels: -25,
Expand Down Expand Up @@ -105,7 +105,7 @@ <h2 id="Example">Example</h2>

<p>This simple snippet of code shows the creation of some audio nodes, and how the <code>AudioNode</code> properties and methods can be used. You can find examples of such usage on any of the examples linked to on the <a href="/en-US/docs/Web/API/Web_Audio_API">Web Audio API</a> landing page (for example <a href="https://github.com/mdn/violent-theremin">Violent Theremin</a>.)<span class="p"> </span></p>

<pre class="brush: js; notranslate">const audioCtx = new AudioContext();
<pre class="brush: js;">const audioCtx = new AudioContext();

const oscillator = new OscillatorNode(audioCtx);
const gainNode = new GainNode(audioCtx);
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audionode/numberofinputs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<h2 id="Syntax">Syntax</h2>

<pre
class="brush: js notranslate">var <em>numInputs</em> = <em>audioNode</em>.numberOfInputs;</pre>
class="brush: js">var <em>numInputs</em> = <em>audioNode</em>.numberOfInputs;</pre>

<h3 id="Value">Value</h3>

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audionode/numberofoutputs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<h2 id="Syntax">Syntax</h2>

<pre
class="brush: js notranslate">var <em>numOutputs</em> = <em>audioNode</em>.numberOfOutputs;</pre>
class="brush: js">var <em>numOutputs</em> = <em>audioNode</em>.numberOfOutputs;</pre>

<h3 id="Value">Value</h3>

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audionodeoptions/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate">var audioNodeOptions = {
<pre class="brush: js">var audioNodeOptions = {
"channelCount" : 2,
"channelCountMode" : "max",
"channelInterpretation" : "discrete"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ <h2 id="Examples">Examples</h2>

<p>In this simple example, an event listener for the <code>ended</code> event is set up to enable a "Start" button in the user interface when the node stops playing:</p>

<pre class="brush: js notranslate">node.addEventListener('ended', () =&gt; {
<pre class="brush: js">node.addEventListener('ended', () =&gt; {
document.getElementById("startButton").disabled = false;
})</pre>

<p>You can also set up the event handler using the {{domxref("AudioScheduledSourceNode.onended")}} property:</p>

<pre class="brush: js notranslate">node.onended = function() {
<pre class="brush: js">node.onended = function() {
document.getElementById("startButton").disabled = false;
}</pre>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate"><em>AudioScheduledSourceNode</em>.onended = <em>EventHandler</em>;
<pre class="brush: js"><em>AudioScheduledSourceNode</em>.onended = <em>EventHandler</em>;
</pre>

<h3 id="Value">Value</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate"><em>AudioScheduledSourceNode</em>.start([<em>when</em> [, offset [, duration]]]);
<pre class="brush: js"><em>AudioScheduledSourceNode</em>.start([<em>when</em> [, offset [, duration]]]);
</pre>

<h3 id="Parameters">Parameters</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate"><em>AudioScheduledSourceNode</em>.stop([<em>when</em>]);
<pre class="brush: js"><em>AudioScheduledSourceNode</em>.stop([<em>when</em>]);
</pre>

<h3 id="Parameters">Parameters</h3>
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audiotrack/enabled/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate"><em>isAudioEnabled</em> = <em>AudioTrack</em>.enabled;
<pre class="brush: js"><em>isAudioEnabled</em> = <em>AudioTrack</em>.enabled;

<em>AudioTrack</em>.enabled = <em>true</em> | <em>false</em>;</pre>

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audiotrack/id/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<h2 id="Syntax">Syntax</h2>

<pre
class="brush: js notranslate">var <em>trackID</em> = <em>AudioTrack</em>.id;</pre>
class="brush: js">var <em>trackID</em> = <em>AudioTrack</em>.id;</pre>

<h3 id="Value">Value</h3>

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audiotrack/kind/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<h2 id="Syntax">Syntax</h2>

<pre
class="brush: js notranslate">var <em>trackKind</em> = <em>AudioTrack</em>.kind;</pre>
class="brush: js">var <em>trackKind</em> = <em>AudioTrack</em>.kind;</pre>

<h3 id="Value">Value</h3>

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audiotrack/label/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<h2 id="Syntax">Syntax</h2>

<pre
class="brush: js notranslate">var <em>audioTrackLabel</em> = <em>AudioTrack</em>.label;</pre>
class="brush: js">var <em>audioTrackLabel</em> = <em>AudioTrack</em>.label;</pre>

<h3 id="Value">Value</h3>

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audiotrack/language/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate">var <em>audioTrackLanguage</em> = <em>AudioTrack</em>.language;</pre>
<pre class="brush: js">var <em>audioTrackLanguage</em> = <em>AudioTrack</em>.language;</pre>

<h3 id="Value">Value</h3>

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audiotrack/sourcebuffer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<h2 id="Syntax">Syntax</h2>

<pre
class="brush: js notranslate">var <em>sourceBuffer</em> = <em>AudioTrack</em>.sourceBuffer;</pre>
class="brush: js">var <em>sourceBuffer</em> = <em>AudioTrack</em>.sourceBuffer;</pre>

<h3 id="Value">Value</h3>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate">var <em>node</em> = new AudioWorkletNode(<em>context</em>, <em>name</em>);
<pre class="brush: js">var <em>node</em> = new AudioWorkletNode(<em>context</em>, <em>name</em>);
var <em>node</em> = new AudioWorkletNode(<em>context</em>, <em>name</em>, <em>options</em>);
</pre>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<h2 id="Syntax">Syntax</h2>

<pre
class="brush: js notranslate">audioWorkletNode.onprocessorerror = function() { ... };</pre>
class="brush: js">audioWorkletNode.onprocessorerror = function() { ... };</pre>

<h2 id="Examples">Examples</h2>

Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/audioworkletnode/parameters/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js notranslate"><em>audioWorkletNodeInstance</em>.parameters</pre>
<pre class="brush: js"><em>audioWorkletNodeInstance</em>.parameters</pre>

<h3 id="Value">Value</h3>

Expand All @@ -48,7 +48,7 @@ <h2 id="Examples">Examples</h2>
populate its <code>parameters</code> with instantiated <code>AudioParam</code> objects.
</p>

<pre class="brush: js notranslate">// white-noise-processor.js
<pre class="brush: js">// white-noise-processor.js
class WhiteNoiseProcessor extends AudioWorkletProcessor {
static get parameterDescriptors () {
return [{
Expand Down Expand Up @@ -82,15 +82,15 @@ <h2 id="Examples">Examples</h2>
<code>AudioWorkletNode</code> passing it the name of the processor, and connect the node
to an audio graph.</p>

<pre class="brush: js notranslate">const audioContext = new AudioContext()
<pre class="brush: js">const audioContext = new AudioContext()
await audioContext.audioWorklet.addModule('white-noise-processor.js')
const whiteNoiseNode = new AudioWorkletNode(audioContext, 'white-noise-processor')
whiteNoiseNode.connect(audioContext.destination)
</pre>

<p>Now we can change the gain on the node like this:</p>

<pre class="brush: js notranslate">const gainParam = whiteNoiseNode.parameters.get('customGain')
<pre class="brush: js">const gainParam = whiteNoiseNode.parameters.get('customGain')
gainParam.setValueAtTime(0, audioContext.currentTime)
gainParam.linearRampToValueAtTime(0.5, audioContext.currentTime + 0.5)
</pre>
Expand Down
Loading

0 comments on commit f6f11d2

Please sign in to comment.