Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove 'highlight:[]' and 'highlight[]' classes #8368

Merged
merged 4 commits into from
Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ <h3 id="Drawing_a_spectrum">Drawing a spectrum</h3>

<p>For more complete applied examples/information, check out our <a href="https://mdn.github.io/voice-change-o-matic-float-data/">Voice-change-O-matic-float-data</a> demo (see the <a href="https://github.com/mdn/voice-change-o-matic-float-data">source code</a> too).</p>

<pre class="brush: html, highlight:[15, 17, 18, 41]">&lt;!doctype html&gt;
<pre class="brush: html,">&lt;!doctype html&gt;
&lt;body&gt;
&lt;script&gt;
const audioCtx = new AudioContext();
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audiobuffer/duration/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ <h3 id="Value">Value</h3>

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

<pre class="brush: js;highlight[22]">// Stereo
<pre class="brush: js;">// Stereo
var channels = 2;

// Create an empty two second stereo buffer at the
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/audiobuffer/getchanneldata/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;highlight[22]">var myArrayBuffer = audioCtx.createBuffer(2, frameCount, audioCtx.sampleRate);
<pre class="brush: js;">var myArrayBuffer = audioCtx.createBuffer(2, frameCount, audioCtx.sampleRate);
var nowBuffering = myArrayBuffer.getChannelData(channel);</pre>

<h3 id="Parameters">Parameters</h3>
Expand All @@ -33,7 +33,7 @@ <h2 id="Example">Example</h2>

<p>In the following example we create a two second buffer, fill it with white noise, and then play it via an {{ domxref("AudioBufferSourceNode") }}. The comments should clearly explain what is going on. You can also <a href="https://mdn.github.io/webaudio-examples/audio-buffer/">run the code live</a>, or <a href="https://github.com/mdn/webaudio-examples">view the source</a>.</p>

<pre class="brush: js;highlight[21]">var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
<pre class="brush: js;">var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
var button = document.querySelector('button');
var pre = document.querySelector('pre');
var myScript = document.querySelector('script');
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audiobuffer/length/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h3 id="Value">Value</h3>

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

<pre class="brush: js;highlight[22]">// Stereo
<pre class="brush: js;">// Stereo
var channels = 2;

// Create an empty two second stereo buffer at the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ <h3 id="Value">Value</h3>

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

<pre class="brush: js;highlight[22]">// Stereo
<pre class="brush: js;">// Stereo
var channels = 2;

// Create an empty two second stereo buffer at the
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audiobuffer/samplerate/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h3 id="Value">Value</h3>

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

<pre class="brush: js;highlight[22]">// Stereo
<pre class="brush: js;">// Stereo
var channels = 2;

// Create an empty two second stereo buffer at the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h3 id="Value">Value</h3>

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

<pre class="brush: js;highlight[18]">const audioCtx = new AudioContext();
<pre class="brush: js;">const audioCtx = new AudioContext();

const channelCount = 2;
const frameCount = audioCtx.sampleRate * 2.0; // 2 seconds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ <h2 id="Example">Example</h2>
the source</a>.)</p>
</div>

<pre class="brush: js;highlight[17]">function getData() {
<pre class="brush: js;">function getData() {
source = audioCtx.createBufferSource();
request = new XMLHttpRequest();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ <h2 id="Example">Example</h2>
&lt;span class="playback-rate-value"&gt;1.0&lt;/span&gt;
</pre>

<pre class="brush: js;highlight[15]">function getData() {
<pre class="brush: js;">function getData() {
source = audioCtx.createBufferSource();
request = new XMLHttpRequest();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h2 id="Example">Example</h2>
the source</a>.</p>
</div>

<pre class="brush: js;highlight[23]">var pre = document.querySelector('pre');
<pre class="brush: js;">var pre = document.querySelector('pre');
var video = document.querySelector('video');
var myScript = document.querySelector('script');
var range = document.querySelector('input');
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audionode/channelcount/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h3 id="Value">Value</h3>

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

<pre class="brush: js;highlight[11]">var AudioContext = window.AudioContext || window.webkitAudioContext;
<pre class="brush: js;">var AudioContext = window.AudioContext || window.webkitAudioContext;

var audioCtx = new AudioContext();

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

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

<pre class="brush: js;highlight[11]">var oscillator = audioCtx.createOscillator();
<pre class="brush: js;">var oscillator = audioCtx.createOscillator();
oscillator.channelCountMode = 'explicit';</pre>

<h3 id="Value">Value</h3>
Expand All @@ -58,7 +58,7 @@ <h3 id="Value">Value</h3>

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

<pre class="brush: js;highlight[11]">var AudioContext = window.AudioContext || window.webkitAudioContext;
<pre class="brush: js;">var AudioContext = window.AudioContext || window.webkitAudioContext;

var audioCtx = new AudioContext();

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 @@ -113,7 +113,7 @@ <h3 id="AudioParam_example">AudioParam example</h3>
an {{domxref("OscillatorNode")}} with a slow frequency value. This technique is know as
an <em>LFO</em>-controlled parameter.</p>

<pre class="brush: js;highlight[8,9]">var AudioContext = window.AudioContext || window.webkitAudioContext;
<pre class="brush: js;">var AudioContext = window.AudioContext || window.webkitAudioContext;

var audioCtx = new AudioContext();

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 @@ -29,7 +29,7 @@ <h3 id="Value">Value</h3>

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

<pre class="brush: js;highlight[8,9]">const AudioContext = window.AudioContext || window.webkitAudioContext;
<pre class="brush: js;">const AudioContext = window.AudioContext || window.webkitAudioContext;
const audioCtx = new AudioContext();

const oscillator = audioCtx.createOscillator();
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 @@ -28,7 +28,7 @@ <h3 id="Value">Value</h3>

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

<pre class="brush: js;highlight[8,9,10]">const audioCtx = new AudioContext();
<pre class="brush: js;">const audioCtx = new AudioContext();

const oscillator = audioCtx.createOscillator();
const gainNode = audioCtx.createGain();
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 @@ -28,7 +28,7 @@ <h3 id="Value">Value</h3>

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

<pre class="brush: js;highlight[8,9,10]">const audioCtx = new AudioContext();
<pre class="brush: js;">const audioCtx = new AudioContext();

const oscillator = audioCtx.createOscillator();
const gainNode = audioCtx.createGain();
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audioparam/defaultvalue/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h3 id="Value">Value</h3>

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

<pre class="brush: js;highlight[3]">const audioCtx = new AudioContext();
<pre class="brush: js;">const audioCtx = new AudioContext();
const gainNode = audioCtx.createGain();
const defaultVal = gainNode.gain.defaultValue;
console.log(defaultVal); // 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ <h2 id="Examples">Examples</h2>
is used to fade the gain value up to 1.0, and down to 0, respectively. This is pretty
useful for fade in/fade out effects:</p>

<pre class="brush: js;highlight[32,37]">// create audio context
<pre class="brush: js;">// create audio context
var AudioContext = window.AudioContext || window.webkitAudioContext;
var audioCtx = new AudioContext();

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

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

<pre class="brush: js;highlight[4]">const audioCtx = new AudioContext();
<pre class="brush: js;">const audioCtx = new AudioContext();
const gainNode = audioCtx.createGain();
console.log(gainNode.gain.maxValue); // 3.4028234663852886e38</pre>

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

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

<pre class="brush: js;highlight[3]">const audioCtx = new AudioContext();
<pre class="brush: js;">const audioCtx = new AudioContext();
const gainNode = audioCtx.createGain();
console.log(gainNode.gain.minValue); // -3.4028234663852886e38
</pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ <h2 id="Examples">Examples</h2>
after 1 second, and the length of time the effect lasts being controlled by the
timeConstant.</p>

<pre class="brush: js;highlight[32,37]">// create audio context
<pre class="brush: js;">// create audio context
var AudioContext = window.AudioContext || window.webkitAudioContext;
var audioCtx = new AudioContext();

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/audioparam/setvalueattime/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h2 id="Examples">Examples</h2>
to set the gain value equal to <code>currGain</code>, one second from now
(<code>audioCtx.currentTime + 1</code>.)</p>

<pre class="brush: js;highlight[32,37]">// create audio context
<pre class="brush: js;">// create audio context
var AudioContext = window.AudioContext || window.webkitAudioContext;
var audioCtx = new AudioContext();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ <h2 id="Examples">Examples</h2>
live</a>.) When this button is pressed, <code>setValueCurveAtTime()</code> is used to
change the gain value between the values contained in the waveArray array:</p>

<pre class="brush: js;highlight[42]">// create audio context
<pre class="brush: js;">// create audio context
var AudioContext = window.AudioContext || window.webkitAudioContext;
var audioCtx = new AudioContext();

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

<p>This example instantly changes the volume of a {{domxref("GainNode")}} to 40%.</p>

<pre class="brush: js;highlight[3]">const audioCtx = new AudioContext();
<pre class="brush: js;">const audioCtx = new AudioContext();
const gainNode = audioCtx.createGain();
gainNode.gain.value = 0.4;
//which is identical to:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ <h2 id="Example">Example</h2>

<p>The following example shows basic usage of an {{ domxref("AudioContext") }} to create an oscillator node. For an applied example, check out our <a href="https://mdn.github.io/violent-theremin/">Violent Theremin demo</a> (<a href="https://github.com/mdn/violent-theremin/blob/gh-pages/scripts/app.js">see app.js</a> for relevant code).</p>

<pre class="brush: js;highlight[13,14,15]">// create web audio api context
<pre class="brush: js;">// create web audio api context
var audioCtx = new (window.AudioContext || window.webkitAudioContext)();

// create Oscillator node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h2 id="Examples">Examples</h2>
href="https://github.com/mdn/webaudio-examples/blob/master/audio-buffer/index.html">view
the source</a>.</p>

<pre class="brush: js;highlight[14]">var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
<pre class="brush: js;">var audioCtx = new (window.AudioContext || window.webkitAudioContext)();

// Create an empty three-second stereo buffer at the sample rate of the AudioContext
var myArrayBuffer = audioCtx.createBuffer(2, audioCtx.sampleRate * 3, audioCtx.sampleRate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h2 id="Example">Example</h2>
the source</a>.</p>
</div>

<pre class="brush: js highlight[31]">var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
<pre class="brush: js">var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
var button = document.querySelector('button');
var pre = document.querySelector('pre');
var myScript = document.querySelector('script');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h2 id="Example">Example</h2>
method, which allow you to specify the index of the channel to connect from and the
index of the channel to connect to.</p>

<pre class="brush: js;highlight[5,12,17]">var ac = new AudioContext();
<pre class="brush: js;">var ac = new AudioContext();
ac.decodeAudioData(someStereoBuffer, function(data) {
var source = ac.createBufferSource();
source.buffer = data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h2 id="Example">Example</h2>
sliders up to the right, then press the play buttons, a delay will be introduced, so the
looping sounds don't start playing for a short amount of time.</p>

<pre class="brush: js;highlight[4,15,16,21,22]">var AudioContext = window.AudioContext || window.webkitAudioContext;
<pre class="brush: js;">var AudioContext = window.AudioContext || window.webkitAudioContext;
var audioCtx = new AudioContext();

var synthDelay = audioCtx.createDelay(5.0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h2 id="Example">Example</h2>
href="https://github.com/mdn/webaudio-examples/tree/master/compressor-example">view
the source code</a>).</p>

<pre class="brush: js highlight[6,18,19]">// Create a MediaElementAudioSourceNode
<pre class="brush: js">// Create a MediaElementAudioSourceNode
// Feed the HTMLMediaElement into it
var source = audioCtx.createMediaElementSource(myAudio);

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

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

<pre class="brush: js;highlight[8]">var AudioContext = window.AudioContext || window.webkitAudioContext;
<pre class="brush: js;">var AudioContext = window.AudioContext || window.webkitAudioContext;
var audioCtx = new AudioContext();
// Older webkit/blink browsers require a prefix

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h2 id="Example">Example</h2>
href="https://github.com/mdn/voice-change-o-matic">voice-change-o-matic</a>.</p>
</div>

<pre class="brush: js;highlight[8]">var AudioContext = window.AudioContext || window.webkitAudioContext;
<pre class="brush: js;">var AudioContext = window.AudioContext || window.webkitAudioContext;
var audioCtx = new AudioContext();
// Older webkit/blink browsers require a prefix

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/baseaudiocontext/listener/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h2 id="Example">Example</h2>
href="https://github.com/mdn/panner-node">panner-node</a> demo.</p>
</div>

<pre class="brush: js;highlight[8]">var AudioContext = window.AudioContext || window.webkitAudioContext;
<pre class="brush: js;">var AudioContext = window.AudioContext || window.webkitAudioContext;
var audioCtx = new AudioContext();
// Older webkit/blink browsers require a prefix

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h2 id="Example">Example</h2>
<code>audioCtx.sampleRate</code> into your browser console.</p>
</div>

<pre class="brush: js;highlight[8]">var AudioContext = window.AudioContext || window.webkitAudioContext;
<pre class="brush: js;">var AudioContext = window.AudioContext || window.webkitAudioContext;
var audioCtx = new AudioContext();
// Older webkit/blink browsers require a prefix

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/batterymanager/charging/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h3 id="HTML_Content">HTML Content</h3>

<h3 id="JavaScript_Content">JavaScript Content</h3>

<pre class="brush: js; highlight:[3]">navigator.getBattery().then(function(battery) {
<pre class="brush: js;">navigator.getBattery().then(function(battery) {

var charging = battery.charging;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h3 id="HTML_Content">HTML Content</h3>

<h3 id="JavaScript_Content">JavaScript Content</h3>

<pre class="brush: js; highlight:[3]">navigator.getBattery().then(function(battery) {
<pre class="brush: js;">navigator.getBattery().then(function(battery) {

var time = battery.chargingTime;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h3 id="HTML_Content">HTML Content</h3>

<h3 id="JavaScript_Content">JavaScript Content</h3>

<pre class="brush: js; highlight:[3]">navigator.getBattery().then(function(battery) {
<pre class="brush: js; ">navigator.getBattery().then(function(battery) {

var time = battery.dischargingTime;

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/batterymanager/level/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h3 id="HTML_Content">HTML Content</h3>

<h3 id="JavaScript_Content">JavaScript Content</h3>

<pre class="brush: js; highlight:[3]">navigator.getBattery().then(function(battery) {
<pre class="brush: js; ">navigator.getBattery().then(function(battery) {

var level = battery.level;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h3 id="HTML_Content">HTML Content</h3>

<h3 id="JavaScript_Content">JavaScript Content</h3>

<pre class="brush: js; highlight:[3]">navigator.getBattery().then(function(battery) {
<pre class="brush: js; ">navigator.getBattery().then(function(battery) {

battery.onchargingchange = chargingChange();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h3 id="HTML_Content">HTML Content</h3>

<h3 id="JavaScript_Content">JavaScript Content</h3>

<pre class="brush: js; highlight:[3]">navigator.getBattery().then(function(battery) {
<pre class="brush: js; ">navigator.getBattery().then(function(battery) {

battery.onchargingtimechange = chargingTimeChange();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h3 id="HTML_Content">HTML Content</h3>

<h3 id="JavaScript_Content">JavaScript Content</h3>

<pre class="brush: js; highlight:[3]">navigator.getBattery().then(function(battery) {
<pre class="brush: js;">navigator.getBattery().then(function(battery) {

battery.ondischargingtimechange = dischargingTimeChange;

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

<h3 id="JavaScript">JavaScript</h3>

<pre class="brush: js; highlight:[3]">navigator.getBattery().then(function(battery) {
<pre class="brush: js;">navigator.getBattery().then(function(battery) {
battery.onlevelchange = function(){
document.querySelector('#level').textContent = battery.level;

Expand Down
Loading