PageSourceSearch

https://www.abg.gov.cn/uiFramework/commonResource/zip/wza/js/EasyReader.min.js

js abg.gov.cn collected 2026-10-02 17:09:34 UTC 5,799 bytes, 2 lines download raw bytes

1;/*!js/EasyReader.js*/
2EasyReader=function(e,t){this.finish=t,this.args=e,this.init=jQuery.proxy(this.init,this),this.isEnable=jQuery.proxy(this.isEnable,this),this.readable=jQuery.proxy(this.readable,this),this.read=jQuery.proxy(this.read,this),this.pause=jQuery.proxy(this.pause,this),this.resume=jQuery.proxy(this.resume,this),this.stop=jQuery.proxy(this.stop,this),this.volumePlus=jQuery.proxy(this.volumePlus,this),this.volumeMinus=jQuery.proxy(this.volumeMinus,this),this.volume=jQuery.proxy(this.volume,this),this.canVolumePlus=jQuery.proxy(this.canVolumePlus,this),this.canVolumeMinus=jQuery.proxy(this.canVolumeMinus,this),this.ratePlus=jQuery.proxy(this.ratePlus,this),this.rateMinus=jQuery.proxy(this.rateMinus,this),this.rate=jQuery.proxy(this.rate,this),this.canRatePlus=jQuery.proxy(this.canRatePlus,this),this.canRateMinus=jQuery.proxy(this.canRateMinus,this),this.onFinish=jQuery.proxy(this.onFinish,this),this.init()},EasyReader.readableExp=new RegExp("[a-zA-Z0-9一-龥0-9A-Za-z]"),EasyReader.readable=function(e){return EasyReader.readableExp.test(e)},EasyReader.prototype={init:function(){this._reader=new EasyReader.ServerTTS(this.args,this.onFinish)},isEnable:function(){return!!this._reader},readable:function(e){return EasyReader.readableExp.test(e)},read:function(e){e+="",this._reader&&e&&EasyReader.readableExp.test(e)&&this._reader.read(e)},pause:function(){this._reader&&this._reader.pause()},resume:function(){this._reader&&this._reader.resume()},stop:function(){this._reader&&this._reader.stop()},volumePlus:function(){this._reader&&this._reader.volumePlus()},volumeMinus:function(){this._reader&&this._reader.volumeMinus()},volume:function(e){return this._reader?this._reader.volume(e):void 0},canVolumePlus:function(){return this._reader?this._reader.canVolumePlus():!1},canVolumeMinus:function(){return this._reader?this._reader.canVolumeMinus():!1},ratePlus:function(){this._reader&&this._reader.ratePlus()},rateMinus:function(){this._reader&&this._reader.rateMinus()},rate:function(e){return this._reader?this._reader.rate(e):void 0},canRatePlus:function(){return this._reader?this._reader.canRatePlus():!1},canRateMinus:function(){return this._reader?this._reader.canRateMinus():!1},onFinish:function(){jQuery.isFunction(this.finish)&&this.finish()},getStatus:function(e){return this._reader?this._reader.player.data("jPlayer").status[e]:void 0},changeIntonation:function(e){this._reader.changeIntonation(e)}},EasyReader.ServerTTS=function(e,t){this._args=e,this._finish=t,this.readerVolume=1,this.intonation=1,this.playbackRate=1,this.init=jQuery.proxy(this.init,this),this.read=jQuery.proxy(this.read,this),this.pause=jQuery.proxy(this.pause,this),this.resume=jQuery.proxy(this.resume,this),this.stop=jQuery.proxy(this.stop,this),this.volumePlus=jQuery.proxy(this.volumePlus,this),this.volumeMinus=jQuery.proxy(this.volumeMinus,this),this.volume=jQuery.proxy(this.volume,this),this.canVolumePlus=jQuery.proxy(this.canVolumePlus,this),this.canVolumeMinus=jQuery.proxy(this.canVolumeMinus,this),this.ratePlus=jQuery.proxy(this.ratePlus,this),this.rateMinus=jQuery.proxy(this.rateMinus,this),this.rate=jQuery.proxy(this.rate,this),this.canRatePlus=jQuery.proxy(this.canRatePlus,this),this.canRateMinus=jQuery.proxy(this.canRateMinus,this),this.onFinish=jQuery.proxy(this.onFinish,this),this.onError=jQuery.proxy(this.onError,this),this.init()},EasyReader.ServerTTS.prototype={init:function(){this.player=jQuery("<div id='jquery_jplayer'></div>"),jQuery(document.body).append(this.player),this.player.jPlayer({swfPath:this._args&&this._args.playerPath?this._args.playerPath:"/js/",supplied:"mp3",wmode:"window",volume:this.readerVolume}),this.player.bind(jQuery.jPlayer.event.ended,this.onFinish),this.player.bind(jQuery.jPlayer.event.error,this.onError)},onFinish:function(){jQuery.isFunction(this._finish)&&this._finish()},onError:function(){if(this.mp3)try{this.player.jPlayer("setMedia",{mp3:this.mp3+"&time="+(new Date).getTime()}).jPlayer("play"),this.mp3=""}catch(e){}},fixTTS:function(e){var t=TTSFix||[],i=e;return jQuery.each(t,function(e,t){var s=t.value,r=new RegExp(t.key,"g");i=i.replace(r,s)}),i},read:function(e){if(this._args&&this._args.changeTTS)this.mp3="https://api.sinonao.com/kb/text/tts?vol=9&per="+this.intonation+"&tex="+encodeURIComponent(e);else{var t=this.fixTTS(e);this.mp3="http://api.sinonao.com/tts/api?vol=1&spd=1&fmt=mp3&pitch=0&ph=0&spk=sn"+this.intonation+"&text="+encodeURIComponent(t)}try{this.player.jPlayer("setMedia",{mp3:this.mp3});var i=this;setTimeout(function(){i.player.jPlayer("play")},50)}catch(s){}},changeIntonation:function(e){void 0!=e?this.intonation=e:this.intonation++,this.intonation%=7},pause:function(){this.player.jPlayer("pause")},resume:function(){this.player.jPlayer("play")},stop:function(){try{this.player.jPlayer("stop")}catch(e){}},volumePlus:function(){this.readerVolume+=.1,this.readerVolume>=.99&&(this.readerVolume=1),this.player.jPlayer("volume",this.readerVolume)},volumeMinus:function(){this.readerVolume-=.1,this.readerVolume<=.01&&(this.readerVolume=0),this.player.jPlayer("volume",this.readerVolume)},volume:function(e){return e?(e>1&&(e=1),0>e&&(e=0),this.player.jPlayer("volume",e),void 0):this.readerVolume},canVolumePlus:function(){return this.readerVolume<1},canVolumeMinus:function(){return this.readerVolume>0},ratePlus:function(){this.playbackRate+=.2,this.playbackRate<.5&&(this.playbackRate=.5),this.rate(this.playbackRate)},rateMinus:function(){this.playbackRate-=.2,this.playbackRate>4&&(this.playbackRate=4),this.rate(this.playbackRate)},rate:function(e){this.player.jPlayer("option","playbackRate",e),this.player.jPlayer("option","defaultPlaybackRate",e)},canRatePlus:function(){return this.playbackRate<4},canRateMinus:function(){return this.playbackRate>.5}};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.