rebuilding site Thu Jun 30 11:43:08 AM CST 2022

This commit is contained in:
James Feng Cao 2022-06-30 11:43:09 +08:00
parent ce465b53e3
commit d5e26f165a
228 changed files with 1786 additions and 26411 deletions

19
zh/searchurl/js/beep.js Normal file
View file

@ -0,0 +1,19 @@
//data:charset=utf-8,
var audioCtx = new window.AudioContext;
function beep(duration, frequency, volume, type, callback) {
var oscillator = audioCtx.createOscillator();
var gainNode = audioCtx.createGain();
oscillator.connect(gainNode);
gainNode.connect(audioCtx.destination);
if (volume){gainNode.gain.value = volume;}
if (frequency){oscillator.frequency.value = frequency;}
if (type){oscillator.type = type;}
if (callback){oscillator.onended = callback;}
oscillator.start(audioCtx.currentTime);
oscillator.stop(audioCtx.currentTime + ((duration || 500) / 1000));
};
beep();
self.close();