vendor: 4,360 bytes, lines 1-11
1/** 2 * 2012-2017 NetReviews 3 * 4 * @author NetReviews SAS <[email protected]> 5 * @copyright 2017 NetReviews SAS 6 * @version Release: $Revision: 7.7.0 7 * @license NetReviews 8 * @date 05/12/2018 9 * International Registered Trademark & Property of NetReviews SAS 10 */ 11!function(e,t,i){"use strict";"function"==typeof define&&define.amd?define(i):"undefined"!=typeof module&&module.exports?module.exports=i():t.exports?t.exports=i():t[e]=i()}("Fingerprint2",this,function(){"use strict";var e=function(t){if(!(this instanceof e))return new e(t);var i={swfContainerId:"fingerprintjs2",swfPath:"flash/compiled/FontList.swf",detectScreenOrientation:!0,sortPluginsFor:[/palemoon/i],userDefinedFonts:[]};this.options=this.extend(t,i),this.nativeForEach=Array.prototype.forEach,this.nativeMap=Array.prototype.map};return e.prototype={extend:function(e,t){if(null==e)return t;for(var i in e)null!=e[i]&&t[i]!==e[i]&&(t[i]=e[i]);return t},get:function(e){var t=this,i={data:[],push:function(e){var i=e.key,a=e.value;"function"==typeof t.options.preprocessor&&(a=t.options.preprocessor(i,a)),this.data.push({key:i,value:a})}};i=this.userAgentKey(i),i=this.languageKey(i),i=this.colorDepthKey(i),i=this.pixelRatioKey(i),i=this.hardwareConcurrencyKey(i),i=this.screenResolutionKey(i),i=this.availableScreenResolutionKey(i),i=this.timezoneOffsetKey(i),i=this.sessionStorageKey(i),i=this.localStorageKey(i),i=this.indexedDbKey(i),i=this.addBehaviorKey(i),i=this.openDatabaseKey(i),i=this.cpuClassKey(i),i=this.platformKey(i),i=this.doNotTrackKey(i),i=this.pluginsKey(i),i=this.canvasKey(i),i=this.webglKey(i),i=this.adBlockKey(i),i=this.hasLiedLanguagesKey(i),i=this.hasLiedResolutionKey(i),i=this.hasLiedOsKey(i),i=this.hasLiedBrowserKey(i),i=this.touchSupportKey(i),i=this.customEntropyFunction(i),this.fontsKey(i,function(i){var a=[];t.each(i.data,function(e){var t=e.value;"undefined"!=typeof e.value.join&&(t=e.value.join(";")),a.push(t)});var r=t.x64hash128(a.join("~~~"),31);return e(r,i.data)})},customEntropyFunction:function(e){return"function"==typeof this.options.customFunction&&e.push({key:"custom",value:this.options.customFunction()}),e},userAgentKey:function(e){return this.options.excludeUserAgent||e.push({key:"user_agent",value:this.getUserAgent()}),e},getUserAgent:function(){return navigator.userAgent},languageKey:function(e){return this.options.excludeLanguage||e.push({key:"language",value:navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||""}),e},colorDepthKey:function(e){return this.options.excludeColorDepth||e.push({key:"color_depth",value:screen.colorDepth||-1}),e},pixelRatioKey:function(e){return this.options.excludePixelRatio||e.push({key:"pixel_ratio",value:this.getPixelRatio()}),e},getPixelRatio:function(){return window.devicePixelRatio||""},screenResolutionKey:function(e){return this.options.excludeScreenResolution?e:this.getScreenResolution(e)},getScreenResolution:function(e){var t;return t=this.options.detectScreenOrientation&&screen.height>screen.width?[screen.height,screen.width]:[screen.width,screen.height],"undefined"!=typeof t&&e.push({key:"resolution",value:t}),e},availableScreenResolutionKey:function(e){return this.options.excludeAvailableScreenResolution?e:this.getAvailableScreenResolution(e)},getAvailableScreenResolution:function(e){var t;return screen.availWidth&&screen.availHeight&&(t=this.options.detectScreenOrientation?screen.availHeight>screen.availWidth?[screen.availHeight,screen.availWidth]:[screen.availWidth,screen.availHeight]:[screen.availHeight,screen.availWidth]),"undefined"!=typeof t&&e.push({key:"available_resolution",value:t}),e},timezoneOffsetKey:function(e){return this.options.excludeTimezoneOffset||e.push({key:"timezone_offset",value:(new Date).getTimezoneOffset()}),e},sessionStorageKey:function(e){return!this.options.excludeSessionStorage&&this.hasSessionStorage()&&e.push({key:"session_storage",value:1}),e},localStorageKey:function(e){return!this.options.excludeSessionStorage&&this.hasLocalStorage()&&e.push({key:"local_storage",value:1}),e},indexedDbKey:function(e){return!this.options.excludeIndexedDB&&this.hasIndexedDB()&&e.push({key:"indexed_db",value:1}),e},addBehaviorKey:function(e){return document.body&&!this.options.excludeAddBehavior&&document.body.addBehavior&&e.push({key:"add_behavior",value:1}),e}
vendor: 2,911 bytes, line 11
11,openDatabaseKey:function(e){return!this.options.excludeOpenDatabase&&window.openDatabase&&e.push({key:"open_database",value:1}),e},cpuClassKey:function(e){return this.options.excludeCpuClass||e.push({key:"cpu_class",value:this.getNavigatorCpuClass()}),e},platformKey:function(e){return this.options.excludePlatform||e.push({key:"navigator_platform",value:this.getNavigatorPlatform()}),e},doNotTrackKey:function(e){return this.options.excludeDoNotTrack||e.push({key:"do_not_track",value:this.getDoNotTrack()}),e},canvasKey:function(e){return!this.options.excludeCanvas&&this.isCanvasSupported()&&e.push({key:"canvas",value:this.getCanvasFp()}),e},webglKey:function(e){return this.options.excludeWebGL?e:this.isWebGlSupported()?(e.push({key:"webgl",value:this.getWebglFp()}),e):e},adBlockKey:function(e){return this.options.excludeAdBlock||e.push({key:"adblock",value:this.getAdBlock()}),e},hasLiedLanguagesKey:function(e){return this.options.excludeHasLiedLanguages||e.push({key:"has_lied_languages",value:this.getHasLiedLanguages()}),e},hasLiedResolutionKey:function(e){return this.options.excludeHasLiedResolution||e.push({key:"has_lied_resolution",value:this.getHasLiedResolution()}),e},hasLiedOsKey:function(e){return this.options.excludeHasLiedOs||e.push({key:"has_lied_os",value:this.getHasLiedOs()}),e},hasLiedBrowserKey:function(e){return this.options.excludeHasLiedBrowser||e.push({key:"has_lied_browser",value:this.getHasLiedBrowser()}),e},fontsKey:function(e,t){return this.options.excludeJsFonts?this.flashFontsKey(e,t):this.jsFontsKey(e,t)},flashFontsKey:function(e,t){return this.options.excludeFlashFonts?t(e):this.hasSwfObjectLoaded()&&this.hasMinFlashInstalled()?"undefined"==typeof this.options.swfPath?t(e):void this.loadSwfAndDetectFonts(function(i){e.push({key:"swf_fonts",value:i.join(";")}),t(e)}):t(e)},jsFontsKey:function(e,t){var i=this;return setTimeout(function(){var a=["monospace","sans-serif","serif"],r=["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial MT","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Bitstream Vera Sans Mono","Book Antiqua","Bookman Old Style","Calibri","Cambria","Cambria Math","Century","Century Gothic","Century Schoolbook","Comic Sans","Comic Sans MS","Consolas","Courier","Courier New","Garamond","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","Lucida Bright","Lucida Calligraphy","Lucida Console","Lucida Fax","LUCIDA GRANDE","Lucida Handwriting","Lucida Sans","Lucida Sans Typewriter","Lucida Sans Unicode","Microsoft Sans Serif","Monaco","Monotype Corsiva","MS Gothic","MS Outlook","MS PGothic","MS Reference Sans Serif","MS Sans Serif","MS Serif","MYRIAD","MYRIAD PRO","Palatino","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times","Times New Roman","Times New Roman PS","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3"],n
vendor: 6,129 bytes, line 11
11=["Abadi MT Condensed Light","Academy Engraved LET","ADOBE CASLON PRO","Adobe Garamond","ADOBE GARAMOND PRO","Agency FB","Aharoni","Albertus Extra Bold","Albertus Medium","Algerian","Amazone BT","American Typewriter","American Typewriter Condensed","AmerType Md BT","Andalus","Angsana New","AngsanaUPC","Antique Olive","Aparajita","Apple Chancery","Apple Color Emoji","Apple SD Gothic Neo","Arabic Typesetting","ARCHER","ARNO PRO","Arrus BT","Aurora Cn BT","AvantGarde Bk BT","AvantGarde Md BT","AVENIR","Ayuthaya","Bandy","Bangla Sangam MN","Bank Gothic","BankGothic Md BT","Baskerville","Baskerville Old Face","Batang","BatangChe","Bauer Bodoni","Bauhaus 93","Bazooka","Bell MT","Bembo","Benguiat Bk BT","Berlin Sans FB","Berlin Sans FB Demi","Bernard MT Condensed","BernhardFashion BT","BernhardMod BT","Big Caslon","BinnerD","Blackadder ITC","BlairMdITC TT","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bodoni MT","Bodoni MT Black","Bodoni MT Condensed","Bodoni MT Poster Compressed","Bookshelf Symbol 7","Boulder","Bradley Hand","Bradley Hand ITC","Bremen Bd BT","Britannic Bold","Broadway","Browallia New","BrowalliaUPC","Brush Script MT","Californian FB","Calisto MT","Calligrapher","Candara","CaslonOpnface BT","Castellar","Centaur","Cezanne","CG Omega","CG Times","Chalkboard","Chalkboard SE","Chalkduster","Charlesworth","Charter Bd BT","Charter BT","Chaucer","ChelthmITC Bk BT","Chiller","Clarendon","Clarendon Condensed","CloisterBlack BT","Cochin","Colonna MT","Constantia","Cooper Black","Copperplate","Copperplate Gothic","Copperplate Gothic Bold","Copperplate Gothic Light","CopperplGoth Bd BT","Corbel","Cordia New","CordiaUPC","Cornerstone","Coronet","Cuckoo","Curlz MT","DaunPenh","Dauphin","David","DB LCD Temp","DELICIOUS","Denmark","DFKai-SB","Didot","DilleniaUPC","DIN","DokChampa","Dotum","DotumChe","Ebrima","Edwardian Script ITC","Elephant","English 111 Vivace BT","Engravers MT","EngraversGothic BT","Eras Bold ITC","Eras Demi ITC","Eras Light ITC","Eras Medium ITC","EucrosiaUPC","Euphemia","Euphemia UCAS","EUROSTILE","Exotc350 Bd BT","FangSong","Felix Titling","Fixedsys","FONTIN","Footlight MT Light","Forte","FrankRuehl","Fransiscan","Freefrm721 Blk BT","FreesiaUPC","Freestyle Script","French Script MT","FrnkGothITC Bk BT","Fruitger","FRUTIGER","Futura","Futura Bk BT","Futura Lt BT","Futura Md BT","Futura ZBlk BT","FuturaBlack BT","Gabriola","Galliard BT","Gautami","Geeza Pro","Geometr231 BT","Geometr231 Hv BT","Geometr231 Lt BT","GeoSlab 703 Lt BT","GeoSlab 703 XBd BT","Gigi","Gill Sans","Gill Sans MT","Gill Sans MT Condensed","Gill Sans MT Ext Condensed Bold","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gisha","Gloucester MT Extra Condensed","GOTHAM","GOTHAM BOLD","Goudy Old Style","Goudy Stout","GoudyHandtooled BT","GoudyOLSt BT","Gujarati Sangam MN","Gulim","GulimChe","Gungsuh","GungsuhChe","Gurmukhi MN","Haettenschweiler","Harlow Solid Italic","Harrington","Heather","Heiti SC","Heiti TC","HELV","Herald","High Tower Text","Hiragino Kaku Gothic ProN","Hiragino Mincho ProN","Hoefler Text","Humanst 521 Cn BT","Humanst521 BT","Humanst521 Lt BT","Imprint MT Shadow","Incised901 Bd BT","Incised901 BT","Incised901 Lt BT","INCONSOLATA","Informal Roman","Informal011 BT","INTERSTATE","IrisUPC","Iskoola Pota","JasmineUPC","Jazz LET","Jenson","Jester","Jokerman","Juice ITC","Kabel Bk BT","Kabel Ult BT","Kailasa","KaiTi","Kalinga","Kannada Sangam MN","Kartika","Kaufmann Bd BT","Kaufmann BT","Khmer UI","KodchiangUPC","Kokila","Korinna BT","Kristen ITC","Krungthep","Kunstler Script","Lao UI","Latha","Leelawadee","Letter Gothic","Levenim MT","LilyUPC","Lithograph","Lithograph Light","Long Island","Lydian BT","Magneto","Maiandra GD","Malayalam Sangam MN","Malgun Gothic","Mangal","Marigold","Marion","Marker Felt","Market","Marlett","Matisse ITC","Matura MT Script Capitals","Meiryo","Meiryo UI","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft Uighur","Microsoft YaHei","Microsoft Yi Baiti","MingLiU","MingLiU_HKSCS","MingLiU_HKSCS-ExtB","MingLiU-ExtB","Minion","Minion Pro","Miriam","Miriam Fixed","Mistral","Modern","Modern No. 20","Mona Lisa Solid ITC TT","Mongolian Baiti","MONO","MoolBoran","Mrs Eaves","MS LineDraw","MS Mincho","MS PMincho","MS Reference Specialty","MS UI Gothic","MT Extra","MUSEO","MV Boli","Nadeem","Narkisim","NEVIS","News Gothic","News GothicMT","NewsGoth BT","Niagara Engraved","Niagara Solid","Noteworthy","NSimSun","Nyala","OCR A Extended","Old Century","Old English Text MT","Onyx","Onyx BT","OPTIMA","Oriya Sangam MN","OSAKA","OzHandicraft BT","Palace Script MT","Papyrus","Parchment","Party LET","Pegasus","Perpetua","Perpetua Titling MT","PetitaBold","Pickwick","Plantagenet Cherokee","Playbill","PMingLiU","PMingLiU-ExtB","Poor Richard","Poster","PosterBodoni BT","PRINCETOWN LET","Pristina","PTBarnum BT","Pythagoras","Raavi","Rage Italic","Ravie","Ribbon131 Bd BT","Rockwell","Rockwell Condensed","Rockwell Extra Bold","Rod","Roman","Sakkal Majalla","Santa Fe LET","Savoye LET","Sceptre","Script","Script MT Bold","SCRIPTINA","Serifa","Serifa BT","Serifa Th BT","ShelleyVolante BT","Sherwood","Shonar Bangla","Showcard Gothic","Shruti","Signboard","SILKSCREEN","SimHei","Simplified Arabic","Simplified Arabic Fixed","SimSun","SimSun-ExtB","Sinhala Sangam MN","Sketch Rockwell","Skia","Small Fonts","Snap ITC","Snell Roundhand","Socket","Souvenir Lt BT","Staccato222 BT","Steamer","Stencil","Storybook","Styllo","Subway","Swis721 BlkEx BT","Swiss911 XCm BT","Sylfaen","Synchro LET","System","Tamil Sangam MN","Technical","Teletype","Telugu Sangam MN","Tempus Sans ITC","Terminal","Thonburi","Traditional Arabic","Trajan","TRAJAN PRO","Tristan","Tubular","Tunga","Tw Cen MT","Tw Cen MT Condensed","Tw Cen MT Condensed Extra Bold","TypoUpright BT","Unicorn","Univers","Univers CE 55 Medium","Univers Condensed","Utsaah","Vagabond","Vani","Vijaya","Viner Hand ITC","VisualUI","Vivaldi","Vladimir Script","Vrinda","Westminster","WHITNEY","Wide Latin","ZapfEllipt BT","ZapfHumnst BT","ZapfHumnst Dm BT","Zapfino","Zurich BlkEx BT","Zurich Ex BT","ZWAdobeF"];
vendor: 1,138 bytes, line 11
11i.options.extendedJsFonts&&(r=r.concat(n)),r=r.concat(i.options.userDefinedFonts);var o="mmmmmmmmmmlli",s="72px",l=document.getElementsByTagName("body")[0],h=document.createElement("div"),u=document.createElement("div"),c={},d={},g=function(){var e=document.createElement("span");return e.style.position="absolute",e.style.left="-9999px",e.style.fontSize=s,e.style.lineHeight="normal",e.innerHTML=o,e},p=function(e,t){var i=g();return i.style.fontFamily="'"+e+"',"+t,i},f=function(){for(var e=[],t=0,i=a.length;t<i;t++){var r=g();r.style.fontFamily=a[t],h.appendChild(r),e.push(r)}return e},m=function(){for(var e={},t=0,i=r.length;t<i;t++){for(var n=[],o=0,s=a.length;o<s;o++){var l=p(r[t],a[o]);u.appendChild(l),n.push(l)}e[r[t]]=n}return e},T=function(e){for(var t=!1,i=0;i<a.length;i++)if(t=e[i].offsetWidth!==c[a[i]]||e[i].offsetHeight!==d[a[i]])return t;return t},S=f();l.appendChild(h);for(var x=0,v=a.length;x<v;x++)c[a[x]]=S[x].offsetWidth,d[a[x]]=S[x].offsetHeight;var E=m();l.appendChild(u);for(var M=[],A=0,y=r.length;A<y;A++)T(E[r[A]])&&M.push(r[A]);l.removeChild(u),l.removeChild(h),e.push({key:"js_fonts",value:M}),t(e)},1)
vendor: 15,533 bytes, line 11
11},pluginsKey:function(e){return this.options.excludePlugins||(this.isIE()?this.options.excludeIEPlugins||e.push({key:"ie_plugins",value:this.getIEPlugins()}):e.push({key:"regular_plugins",value:this.getRegularPlugins()})),e},getRegularPlugins:function(){for(var e=[],t=0,i=navigator.plugins.length;t<i;t++)e.push(navigator.plugins[t]);return this.pluginsShouldBeSorted()&&(e=e.sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0})),this.map(e,function(e){var t=this.map(e,function(e){return[e.type,e.suffixes].join("~")}).join(",");return[e.name,e.description,t].join("::")},this)},getIEPlugins:function(){var e=[];if(Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(window,"ActiveXObject")||"ActiveXObject"in window){var t=["AcroPDF.PDF","Adodb.Stream","AgControl.AgControl","DevalVRXCtrl.DevalVRXCtrl.1","MacromediaFlashPaper.MacromediaFlashPaper","Msxml2.DOMDocument","Msxml2.XMLHTTP","PDF.PdfCtrl","QuickTime.QuickTime","QuickTimeCheckObject.QuickTimeCheck.1","RealPlayer","RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)","RealVideo.RealVideo(tm) ActiveX Control (32-bit)","Scripting.Dictionary","SWCtl.SWCtl","Shell.UIHelper","ShockwaveFlash.ShockwaveFlash","Skype.Detection","TDCCtl.TDCCtl","WMPlayer.OCX","rmocx.RealPlayer G2 Control","rmocx.RealPlayer G2 Control.1"];e=this.map(t,function(e){try{return new ActiveXObject(e),e}catch(t){return null}})}return navigator.plugins&&(e=e.concat(this.getRegularPlugins())),e},pluginsShouldBeSorted:function(){for(var e=!1,t=0,i=this.options.sortPluginsFor.length;t<i;t++){var a=this.options.sortPluginsFor[t];if(navigator.userAgent.match(a)){e=!0;break}}return e},touchSupportKey:function(e){return this.options.excludeTouchSupport||e.push({key:"touch_support",value:this.getTouchSupport()}),e},hardwareConcurrencyKey:function(e){return this.options.excludeHardwareConcurrency||e.push({key:"hardware_concurrency",value:this.getHardwareConcurrency()}),e},hasSessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},hasLocalStorage:function(){try{return!!window.localStorage}catch(e){return!0}},hasIndexedDB:function(){try{return!!window.indexedDB}catch(e){return!0}},getHardwareConcurrency:function(){return navigator.hardwareConcurrency?navigator.hardwareConcurrency:"unknown"},getNavigatorCpuClass:function(){return navigator.cpuClass?navigator.cpuClass:"unknown"},getNavigatorPlatform:function(){return navigator.platform?navigator.platform:"unknown"},getDoNotTrack:function(){return navigator.doNotTrack?navigator.doNotTrack:navigator.msDoNotTrack?navigator.msDoNotTrack:window.doNotTrack?window.doNotTrack:"unknown"},getTouchSupport:function(){var e=0,t=!1;"undefined"!=typeof navigator.maxTouchPoints?e=navigator.maxTouchPoints:"undefined"!=typeof navigator.msMaxTouchPoints&&(e=navigator.msMaxTouchPoints);try{document.createEvent("TouchEvent"),t=!0}catch(i){}var a="ontouchstart"in window;return[e,t,a]},getCanvasFp:function(){var e=[],t=document.createElement("canvas");t.width=2e3,t.height=200,t.style.display="inline";var i=t.getContext("2d");return i.rect(0,0,10,10),i.rect(2,2,6,6),e.push("canvas winding:"+(i.isPointInPath(5,5,"evenodd")===!1?"yes":"no")),i.textBaseline="alphabetic",i.fillStyle="#f60",i.fillRect(125,1,62,20),i.fillStyle="#069",this.options.dontUseFakeFontInCanvas?i.font="11pt Arial":i.font="11pt no-real-font-123",i.fillText("Cwm fjordbank glyphs vext quiz, \ud83d\ude03",2,15),i.fillStyle="rgba(102, 204, 0, 0.2)",i.font="18pt Arial",i.fillText("Cwm fjordbank glyphs vext quiz, \ud83d\ude03",4,45),i.globalCompositeOperation="multiply",i.fillStyle="rgb(255,0,255)",i.beginPath(),i.arc(50,50,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(0,255,255)",i.beginPath(),i.arc(100,50,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(255,255,0)",i.beginPath(),i.arc(75,100,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(255,0,255)",i.arc(75,75,75,0,2*Math.PI,!0),i.arc(75,75,25,0,2*Math.PI,!0),i.fill("evenodd"),e.push("canvas fp:"+t.toDataURL()),e.join("~")},getWebglFp:function(){var e,t=function(t){return e.clearColor(0,0,0,1),e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),"["+t[0]+", "+t[1]+"]"},i=function(e){var t,i=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic");return i?(t=e.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT),0===t&&(t=2),t):null};if(e=this.getWebglCanvas(),!e)return null;var a=[],r="attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}",n="precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}",o=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,o);var s=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.732134444,0]);e.bufferData(e.ARRAY_BUFFER,s,e.STATIC_DRAW),o.itemSize=3,o.numItems=3;var l=e.createProgram(),h=e.createShader(e.VERTEX_SHADER);e.shaderSource(h,r),e.compileShader(h);var u=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(u,n),e.compileShader(u),e.attachShader(l,h),e.attachShader(l,u),e.linkProgram(l),e.useProgram(l),l.vertexPosAttrib=e.getAttribLocation(l,"attrVertex"),l.offsetUniform=e.getUniformLocation(l,"uniformOffset"),e.enableVertexAttribArray(l.vertexPosArray),e.vertexAttribPointer(l.vertexPosAttrib,o.itemSize,e.FLOAT,!1,0,0),e.uniform2f(l.offsetUniform,1,1),e.drawArrays(e.TRIANGLE_STRIP,0,o.numItems),null!=e.canvas&&a.push(e.canvas.toDataURL()),a.push("extensions:"+e.getSupportedExtensions().join(";")),a.push("webgl aliased line width range:"+t(e.getParameter(e.ALIASED_LINE_WIDTH_RANGE))),a.push("webgl aliased point size range:"+t(e.getParameter(e.ALIASED_POINT_SIZE_RANGE))),a.push("webgl alpha bits:"+e.getParameter(e.ALPHA_BITS)),a.push("webgl antialiasing:"+(e.getContextAttributes().antialias?"yes":"no")),a.push("webgl blue bits:"+e.getParameter(e.BLUE_BITS)),a.push("webgl depth bits:"+e.getParameter(e.DEPTH_BITS)),a.push("webgl green bits:"+e.getParameter(e.GREEN_BITS)),a.push("webgl max anisotropy:"+i(e)),a.push("webgl max combined texture image units:"+e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),a.push("webgl max cube map texture size:"+e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE)),a.push("webgl max fragment uniform vectors:"+e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS)),a.push("webgl max render buffer size:"+e.getParameter(e.MAX_RENDERBUFFER_SIZE)),a.push("webgl max texture image units:"+e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),a.push("webgl max texture size:"+e.getParameter(e.MAX_TEXTURE_SIZE)),a.push("webgl max varying vectors:"+e.getParameter(e.MAX_VARYING_VECTORS)),a.push("webgl max vertex attribs:"+e.getParameter(e.MAX_VERTEX_ATTRIBS)),a.push("webgl max vertex texture image units:"+e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS)),a.push("webgl max vertex uniform vectors:"+e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS)),a.push("webgl max viewport dims:"+t(e.getParameter(e.MAX_VIEWPORT_DIMS))),a.push("webgl red bits:"+e.getParameter(e.RED_BITS)),a.push("webgl renderer:"+e.getParameter(e.RENDERER)),a.push("webgl shading language version:"+e.getParameter(e.SHADING_LANGUAGE_VERSION)),a.push("webgl stencil bits:"+e.getParameter(e.STENCIL_BITS)),a.push("webgl vendor:"+e.getParameter(e.VENDOR)),a.push("webgl version:"+e.getParameter(e.VERSION));try{var c=e.getExtension("WEBGL_debug_renderer_info");c&&(a.push("webgl unmasked vendor:"+e.getParameter(c.UNMASKED_VENDOR_WEBGL)),a.push("webgl unmasked renderer:"+e.getParameter(c.UNMASKED_RENDERER_WEBGL)))}catch(d){}return e.getShaderPrecisionFormat?(a.push("webgl vertex shader high float precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision),a.push("webgl vertex shader high float precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).rangeMin),a.push("webgl vertex shader high float precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).rangeMax),a.push("webgl vertex shader medium float precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision),a.push("webgl vertex shader medium float precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).rangeMin),a.push("webgl vertex shader medium float precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).rangeMax),a.push("webgl vertex shader low float precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_FLOAT).precision),a.push("webgl vertex shader low float precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_FLOAT).rangeMin),a.push("webgl vertex shader low float precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_FLOAT).rangeMax),a.push("webgl fragment shader high float precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision),a.push("webgl fragment shader high float precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).rangeMin),a.push("webgl fragment shader high float precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).rangeMax),a.push("webgl fragment shader medium float precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision),a.push("webgl fragment shader medium float precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).rangeMin),a.push("webgl fragment shader medium float precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).rangeMax),a.push("webgl fragment shader low float precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_FLOAT).precision),a.push("webgl fragment shader low float precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_FLOAT).rangeMin),a.push("webgl fragment shader low float precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_FLOAT).rangeMax),a.push("webgl vertex shader high int precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_INT).precision),a.push("webgl vertex shader high int precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_INT).rangeMin),a.push("webgl vertex shader high int precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_INT).rangeMax),a.push("webgl vertex shader medium int precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_INT).precision),a.push("webgl vertex shader medium int precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_INT).rangeMin),a.push("webgl vertex shader medium int precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_INT).rangeMax),a.push("webgl vertex shader low int precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_INT).precision),a.push("webgl vertex shader low int precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_INT).rangeMin),a.push("webgl vertex shader low int precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_INT).rangeMax),a.push("webgl fragment shader high int precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_INT).precision),a.push("webgl fragment shader high int precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_INT).rangeMin),a.push("webgl fragment shader high int precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_INT).rangeMax),a.push("webgl fragment shader medium int precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_INT).precision),a.push("webgl fragment shader medium int precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_INT).rangeMin),a.push("webgl fragment shader medium int precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_INT).rangeMax),a.push("webgl fragment shader low int precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_INT).precision),a.push("webgl fragment shader low int precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_INT).rangeMin),a.push("webgl fragment shader low int precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_INT).rangeMax),a.join("~")):a.join("~")},getAdBlock:function(){var e=document.createElement("div");e.innerHTML=" ",e.className="adsbox";var t=!1;try{document.body.appendChild(e),t=0===document.getElementsByClassName("adsbox")[0].offsetHeight,document.body.removeChild(e)}catch(i){t=!1}return t},getHasLiedLanguages:function(){if("undefined"!=typeof navigator.languages)try{var e=navigator.languages[0].substr(0,2);if(e!==navigator.language.substr(0,2))return!0}catch(t){return!0}return!1},getHasLiedResolution:function(){return screen.width<screen.availWidth||screen.height<screen.availHeight},getHasLiedOs:function(){var e,t=navigator.userAgent.toLowerCase(),i=navigator.oscpu,a=navigator.platform.toLowerCase();e=t.indexOf("windows phone")>=0?"Windows Phone":t.indexOf("win")>=0?"Windows":t.indexOf("android")>=0?"Android":t.indexOf("linux")>=0?"Linux":t.indexOf("iphone")>=0||t.indexOf("ipad")>=0?"iOS":t.indexOf("mac")>=0?"Mac":"Other";var r;if(r="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,r&&"Windows Phone"!==e&&"Android"!==e&&"iOS"!==e&&"Other"!==e)return!0;if("undefined"!=typeof i){if(i=i.toLowerCase(),i.indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e)return!0;if(i.indexOf("linux")>=0&&"Linux"!==e&&"Android"!==e)return!0;if(i.indexOf("mac")>=0&&"Mac"!==e&&"iOS"!==e)return!0;if(0===i.indexOf("win")&&0===i.indexOf("linux")&&i.indexOf("mac")>=0&&"other"!==e)return!0}return a.indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e||((a.indexOf("linux")>=0||a.indexOf("android")>=0||a.indexOf("pike")>=0)&&"Linux"!==e&&"Android"!==e||((a.indexOf("mac")>=0||a.indexOf("ipad")>=0||a.indexOf("ipod")>=0||a.indexOf("iphone")>=0)&&"Mac"!==e&&"iOS"!==e||(0===a.indexOf("win")&&0===a.indexOf("linux")&&a.indexOf("mac")>=0&&"other"!==e||"undefined"==typeof navigator.plugins&&"Windows"!==e&&"Windows Phone"!==e)))},getHasLiedBrowser:function(){var e,t=navigator.userAgent.toLowerCase(),i=navigator.productSub;if(e=t.indexOf("firefox")>=0?"Firefox":t.indexOf("opera")>=0||t.indexOf("opr")>=0?"Opera":t.indexOf("chrome")>=0?"Chrome":t.indexOf("safari")>=0?"Safari":t.indexOf("trident")>=0?"Internet Explorer":"Other",("Chrome"===e||"Safari"===e||"Opera"===e)&&"20030107"!==i)return!0;var a=eval.toString().length;if(37===a&&"Safari"!==e&&"Firefox"!==e&&"Other"!==e)return!0;if(39===a&&"Internet Explorer"!==e&&"Other"!==e)return!0;if(33===a&&"Chrome"!==e&&"Opera"!==e&&"Other"!==e)return!0;var r;try{throw"a"}catch(n){try{n.toSource(),r=!0}catch(o){r=!1}}return!(!r||"Firefox"===e||"Other"===e)},isCanvasSupported:function(){var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))},isWebGlSupported:function(){if(!this.isCanvasSupported())return!1;var e,t=document.createElement("canvas");try{e=t.getContext&&(t.getContext("webgl")||t.getContext("experimental-webgl"))}catch(i){e=!1}return!!window.WebGLRenderingContext&&!!e},isIE:function(){return"Microsoft Internet Explorer"===navigator.appName||!("Netscape"!==navigator.appName||!/Trident/.test(navigator.userAgent))},hasSwfObjectLoaded:function(){return"undefined"!=typeof window.swfobject},hasMinFlashInstalled:function(){return swfobject.hasFlashPlayerVersion("9.0.0")},addFlashDivNode:function(){var e=document.createElement("div");e.setAttribute("id",this.options.swfContainerId),document.body.appendChild(e)},
vendor: 4,789 bytes, lines 11-15
11loadSwfAndDetectFonts:function(e){var t="___fp_swf_loaded";window[t]=function(t){e(t)};var i=this.options.swfContainerId;this.addFlashDivNode();var a={onReady:t},r={allowScriptAccess:"always",menu:"false"};swfobject.embedSWF(this.options.swfPath,i,"1","1","9.0.0",!1,a,r,{})},getWebglCanvas:function(){var e=document.createElement("canvas"),t=null;try{t=e.getContext("webgl")||e.getContext("experimental-webgl")}catch(i){}return t||(t=null),t},each:function(e,t,i){if(null!==e)if(this.nativeForEach&&e.forEach===this.nativeForEach)e.forEach(t,i);else if(e.length===+e.length){for(var a=0,r=e.length;a<r;a++)if(t.call(i,e[a],a,e)==={})return}else for(var n in e)if(e.hasOwnProperty(n)&&t.call(i,e[n],n,e)==={})return},map:function(e,t,i){var a=[];return null==e?a:this.nativeMap&&e.map===this.nativeMap?e.map(t,i):(this.each(e,function(e,r,n){a[a.length]=t.call(i,e,r,n)}),a)},x64Add:function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var i=[0,0,0,0];return i[3]+=e[3]+t[3],i[2]+=i[3]>>>16,i[3]&=65535,i[2]+=e[2]+t[2],i[1]+=i[2]>>>16,i[2]&=65535,i[1]+=e[1]+t[1],i[0]+=i[1]>>>16,i[1]&=65535,i[0]+=e[0]+t[0],i[0]&=65535,[i[0]<<16|i[1],i[2]<<16|i[3]]},x64Multiply:function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var i=[0,0,0,0];return i[3]+=e[3]*t[3],i[2]+=i[3]>>>16,i[3]&=65535,i[2]+=e[2]*t[3],i[1]+=i[2]>>>16,i[2]&=65535,i[2]+=e[3]*t[2],i[1]+=i[2]>>>16,i[2]&=65535,i[1]+=e[1]*t[3],i[0]+=i[1]>>>16,i[1]&=65535,i[1]+=e[2]*t[2],i[0]+=i[1]>>>16,i[1]&=65535,i[1]+=e[3]*t[1],i[0]+=i[1]>>>16,i[1]&=65535,i[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],i[0]&=65535,[i[0]<<16|i[1],i[2]<<16|i[3]]},x64Rotl:function(e,t){return t%=64,32===t?[e[1],e[0]]:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t|e[0]>>>32-t]:(t-=32,[e[1]<<t|e[0]>>>32-t,e[0]<<t|e[1]>>>32-t])},x64LeftShift:function(e,t){return t%=64,0===t?e:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t]:[e[1]<<t-32,0]},x64Xor:function(e,t){return[e[0]^t[0],e[1]^t[1]]},x64Fmix:function(e){return e=this.x64Xor(e,[0,e[0]>>>1]),e=this.x64Multiply(e,[4283543511,3981806797]),e=this.x64Xor(e,[0,e[0]>>>1]),e=this.x64Multiply(e,[3301882366,444984403]),e=this.x64Xor(e,[0,e[0]>>>1])},x64hash128:function(e,t){ 12 e=e||"",t=t||0;for(var i=e.length%16,a=e.length-i,r=[0,t],n=[0,t],o=[0,0],s=[0,0],l=[2277735313,289559509],h=[1291169091,658871167],u=0;u<a;u+=16)o=[255&e.charCodeAt(u+4)|(255&e.charCodeAt(u+5))<<8|(255&e.charCodeAt(u+6))<<16|(255&e.charCodeAt(u+7))<<24,255&e.charCodeAt(u)|(255&e.charCodeAt(u+1))<<8|(255&e.charCodeAt(u+2))<<16|(255&e.charCodeAt(u+3))<<24],s=[255&e.charCodeAt(u+12)|(255&e.charCodeAt(u+13))<<8|(255&e.charCodeAt(u+14))<<16|(255&e.charCodeAt(u+15))<<24,255&e.charCodeAt(u+8)|(255&e.charCodeAt(u+9))<<8|(255&e.charCodeAt(u+10))<<16|(255&e.charCodeAt(u+11))<<24],o=this.x64Multiply(o,l),o=this.x64Rotl(o,31),o=this.x64Multiply(o,h),r=this.x64Xor(r,o),r=this.x64Rotl(r,27),r=this.x64Add(r,n),r=this.x64Add(this.x64Multiply(r,[0,5]),[0,1390208809]),s=this.x64Multiply(s,h),s=this.x64Rotl(s,33),s=this.x64Multiply(s,l),n=this.x64Xor(n,s),n=this.x64Rotl(n,31),n=this.x64Add(n,r),n=this.x64Add(this.x64Multiply(n,[0,5]),[0,944331445]);switch(o=[0,0],s=[0,0],i){case 15:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+14)],48));case 14:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+13)],40));case 13:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+12)],32));case 12:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+11)],24));case 11:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+10)],16));case 10:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+9)],8));case 9:s=this.x64Xor(s,[0,e.charCodeAt(u+8)]),s=this.x64Multiply(s,h),s=this.x64Rotl(s,33),s=this.x64Multiply(s,l),n=this.x64Xor(n,s);case 8:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+7)],56));case 7:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+6)],48));case 6:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+5)],40));case 5:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+4)],32));case 4:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+3)],24));case 3:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+2)],16));case 2:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+1)],8));case 1:o=this.x64Xor(o,[0,e.charCodeAt(u)]),o=this.x64Multiply(o,l),o=this.x64Rotl(o,31),o=this.x64Multiply(o,h),r=this.x64Xor(r,o)}return r=this.x64Xor(r,[0,e.length]),n=this.x64Xor(n,[0,e.length]),r=this.x64Add(r,n),n=this.x64Add(n,r),r=this.x64Fmix(r),n=this.x64Fmix(n),r=this.x64Add(r,n),n=this.x64Add(n,r),("00000000"+(r[0]>>>0).toString(16)).slice(-8)+("00000000"+(r[1]>>>0).toString(16)).slice(-8)+("00000000"+(n[0]>>>0).toString(16)).slice(-8)+("00000000"+(n[1]>>>0).toString(16)).slice(-8)}},e.VERSION="1.5.1",e}); 13 14 15var jQueryIsLoaded = false;
16try { 17if (typeof jQuery === 'undefined') 18 jQueryIsLoaded = false; 19else 20 jQueryIsLoaded = true; 21} catch (err) { 22jQueryIsLoaded = false; 23} 24 25if (!jQueryIsLoaded) { 26//https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js 27loadScript("https://www.avis-verifies.com/review/js/jquery-1.8.2.min.js"); 28} 29 30if (typeof window.avisVerifies === 'undefined') { 31window.avisVerifies = {}; 32} 33 34if (typeof jQuery !== 'undefined') { 35function av_widget_click() { 36 37if ($('.netreviews_tab').length) { //prestashop 1.7 38 if ($('#netreviews_tab').length){ 39 $("#netreviews_tab").click(); 40 $('html,body').animate({ 41 scrollTop: $("#netreviews_tab").offset().top 42 }, 'slow'); 43 }else{ 44 var tagclassname_av = $('.netreviews_tab').attr('id'); 45 $("a[href='#" + tagclassname_av + "']").click(); 46 $('html,body').animate({ 47 scrollTop: $("a[href='#" + tagclassname_av + "']").offset().top 48 }, 'slow'); 49 } 50 } else { 51 $("a[href='#netreviews_reviews_tab']").click(); 52 $('html,body').animate({ 53 scrollTop: $("#netreviews_reviews_tab").offset().top 54 // scrollTop: $(".avisverifies_tab").offset().top 55 }, 'slow'); 56 } 57 58} 59 60function netreviewsFilter(filter_option) { 61 var current_page = parseInt($("#netreviews_rating_section").attr("data-current-page")); 62 var sortbynote = parseInt($("#netreviews_rating_section").attr("data-sortbynote")); 63 var current_option_filter = $("#netreviews_rating_section").attr("data-current-option"); 64 $(".sortbynote").hide(); 65 if(filter_option != 'more'){ 66 if(filter_option > 0){ //when click on the notes 67 sortbynote = filter_option; 68 current_option_filter='horodate_DESC'; 69 $("#netreviews_rating_section").attr("data-sortbynote",filter_option); 70 $("#netreviews_rating_section").attr("data-current-option",'horodate_DESC'); 71 $(".netreviews_all_reviews").show(); 72 $('#netreviews_reviews_filter option:selected').removeAttr('selected'); 73 $(".sortbynote").show().prop('selected', true); 74 }else{ 75 sortbynote = 0; 76 $('.netreviews_stats_stars_big').css('opacity', '1'); 77 $("#netreviews_rating_section").attr("data-sortbynote",0); 78 current_option_filter = $("#netreviews_reviews_filter").val(); 79 $("#netreviews_rating_section").attr("data-current-option",current_option_filter); 80 } 81 current_page = 1; 82 $("#netreviews_rating_section").attr("data-current-page",1); 83 }else{ 84 current_page = current_page+1; 85 $("#netreviews_rating_section").attr("data-current-page",current_page); 86 } 87 88 $.ajax({ 89 url: $("#netreviews_rating_section").attr("data-url-ajax") + "netreviews/ajax-load.php", 90 type: "POST", 91 data: { 92 id_product: $("#netreviews_rating_section").attr("data-productid"), 93 nom_group: $("#netreviews_rating_section").attr("data-group-name"), 94 id_shop: $("#netreviews_rating_section").attr("data-idshop"), 95 reviews_max_pages: parseInt($("#netreviews_rating_section").attr("data-max-page")), 96 current_page: current_page, 97 sortbynote: sortbynote, 98 current_option_filter: current_option_filter, 99 filter_option: filter_option 100 }, 101 beforeSend: function() { 102 if(filter_option != 'more'){ 103 $('.loader_av').addClass("avisVerifiesAjaxImage"); 104 }else{ 105 $('.netreviews_button').addClass("active"); 106 } 107 $('.netreviews_all_reviews').click(function() { 108 $(this).delay(800).hide(); 109 $(".sortinitial").prop('selected', true); 110 $('.netreviews_stats_stars_big').css('opacity', '1'); 111 }); 112 }, 113 success: function(html) { 114 $('.netreviews_reviews_section').replaceWith(html); 115 window.avisVerifies.avLoadCookies(); 116 }, 117 error: function(jqXHR, textStatus, errorThrown) { 118 alert('something went wrong...'); 119 } 120 }); 121} 122 123 124function manageAnimations(){ 125 $('#netreviews_informations_label').click(function() { 126 if(!$('#netreviews_informations').hasClass('netreviews_active_info')) { 127 $('#netreviews_informations').addClass("netreviews_active_info"); 128 $('#netreviews_informations').fadeIn(); 129 } 130 else { 131 $('#netreviews_informations').removeClass("netreviews_active_info"); 132 $('#netreviews_informations').fadeOut(); 133 } 134 }); 135 $('#netreviews_informations').click(function() { 136 if($('#netreviews_informations').hasClass('netreviews_active_info')) { 137 $('#netreviews_informations').removeClass("netreviews_active_info"); 138 $('#netreviews_informations').fadeOut(); 139 } 140 }); 141} 142 143 144$(document).ready(function() { 145 manageAnimations(); 146 avhelpfulExec = false;
147 avInitialFingerPrint = ''; 148 avHelpfulCookie = {}; 149 avMessagesCookie = {}; 150 avHelpfulErrorMessage = $("#avHelpfulErrorMessage").val(); 151 avHelpfulSuccessMessage = $("#avHelpfulSuccessMessage").val(); 152 avHelpfulIdwebsite = $("#av_idwebsite").val(); 153 avHelpfulURL = $("#avHelpfulURL").val(); 154 voteButtons = document.getElementsByClassName("netreviewsVote"); 155 window.avisVerifies.avLoadCookies(); 156 157 // if the width's too small, display mobile version automatically 158 if($("#netreviews_reviews_tab").width() < 481){ 159 $("#netreviews_reviews_tab").addClass("nrResponsive"); 160 } 161 162 $('.netreviews_stats_stars_big').click(function () { 163 $('.netreviews_all_reviews').css('display', 'flex'); 164 $('.netreviews_stats_stars_big').css('opacity', '0.2'); 165 $(this).css('opacity', '1'); 166 }); 167 168 if ($('.netreviews_tab').length) { //prestashop 1.7 169 var av_tag = $("a[href='#"+$('.netreviews_tab').attr('id')+"']").text(); 170 if(av_tag ==""){ 171 $("a[href='#"+$('.netreviews_tab').attr('id')+"']").hide(); 172 } 173 } 174 175 if($('#checkboxNetreviewsConsent')){ 176 if($('#checkboxNetreviewsConsent')){ 177 $('#checkboxNetreviewsConsent').insertBefore('#conditions-to-approve'); 178 } 179 if($('#HOOK_PAYMENT')){ 180 $('#checkboxNetreviewsConsent').insertBefore('#HOOK_PAYMENT'); 181 } 182 } 183 184 if (storageAvailable('sessionStorage')) { 185 186 187 // On checkbox page 188 if($('#checkboxNetreviewsConsent #checkbox').length == 1){ 189 190 sessionStorage.setItem('netreviews_consent_collect_reviews', 'no'); 191 sessionStorage.setItem('netreviews_id_shop', $('#netreviews-id-shop').val()); 192 sessionStorage.setItem('netreviews_url_ajax', $("#netreviews-url-for-ajax").val()); 193 sessionStorage.setItem('netreviews_group_name', $('#netreviews-group-name').val()); 194 sessionStorage.setItem('netreviews_id_customer', $('#netreviews-id-customer').val()); 195 sessionStorage.setItem('netreviews_version_prestashop', $('#netreviews-version-presta').val()); 196 197 $('#checkboxNetreviewsConsent #checkbox').click(function(){ 198 if($('#checkboxNetreviewsConsent #checkbox').is(":checked")){ 199 sessionStorage.setItem('netreviews_consent_collect_reviews', 'yes'); 200 } 201 if(!$('#checkboxNetreviewsConsent #checkbox').is(":checked")){ 202 sessionStorage.setItem('netreviews_consent_collect_reviews', 'no'); 203 } 204 }); 205 } 206 207 var prestaVersion = sessionStorage.getItem('netreviews_version_prestashop'); 208 209 if(prestaVersion) { 210 if(prestaVersion >= '1.7') { 211 var button = $('#payment-confirmation button'); 212 } else if (prestaVersion >= '1.6' && prestaVersion < '1.7') { 213 var button = $('#cart_navigation button'); 214 } else if (prestaVersion >= '1.5' && prestaVersion < '1.6') { 215 var button = $('#cart_navigation input'); 216 } 217 218 if(button) { 219 button.click(function(){ 220 var collect_consent = sessionStorage.getItem('netreviews_consent_collect_reviews'); 221 var idShop = sessionStorage.getItem('netreviews_id_shop'); 222 var url = sessionStorage.getItem('netreviews_url_ajax'); 223 var groupName = sessionStorage.getItem('netreviews_group_name'); 224 var idCustomer = sessionStorage.getItem('netreviews_id_customer'); 225 226 $.ajax({ 227 url: url, 228 type: "POST", 229 data:{ 230 collect_consent: collect_consent, 231 ajax: true, 232 idShop: idShop, 233 groupName: groupName, 234 idCustomer: idCustomer 235 }, 236 success: function(response){ 237 console.log(response); 238 sessionStorage.removeItem('netreviews_consent_collect_reviews'); 239 sessionStorage.removeItem('netreviews_id_shop'); 240 sessionStorage.removeItem('netreviews_url_ajax'); 241 sessionStorage.removeItem('netreviews_group_name'); 242 sessionStorage.removeItem('netreviews_id_customer'); 243 sessionStorage.removeItem('netreviews_version_prestashop'); 244 }, 245 error: function(jqXHR, textStatus, errorThrown ){ 246 alert(errorThrown); 247 } 248 }); 249 }); 250 } 251 } 252 253 254 } 255 else { 256 console.log('session Storage not available for us'); 257 } 258 259}); 260 261function storageAvailable(type) { 262 var storage; 263 try { 264 storage = window[type]; 265 var x = '__storage_test__'; 266 storage.setItem(x, x); 267 storage.removeItem(x); 268 return true; 269 } 270 catch(e) { 271 return e instanceof DOMException && ( 272 // everything except Firefox 273 e.code === 22 || 274 // Firefox 275 e.code === 1014 || 276 // test name field too, because code might not be present 277 // everything except Firefox 278 e.name === 'QuotaExceededError' || 279 // Firefox 280 e.name === 'NS_ERROR_DOM_QUOTA_REACHED') && 281 // acknowledge QuotaExceededError only if there's something already stored 282 (storage && storage.length !== 0); 283 } 284} 285 286function switchCommentsVisibility(review_number,type) { 287 $('div[review_number=' + review_number + ']').toggle(); 288 $('a#display' + review_number + '[review_number=' + review_number + ']').toggleClass("active"); 289 $('a#hide' + review_number + '[review_number=' + review_number + ']').toggleClass("active"); 290 avMessagesCookie[review_number] = {}; 291 avMessagesCookie[review_number]["type"] = type; 292 console.log(avMessagesCookie); 293 var cookie_string_comment = "netreviews_comment=" + JSON.stringify(avMessagesCookie); 294 document.cookie = cookie_string_comment; 295} 296} // end jquery 297 298 299window.avisVerifies.avLoadCookies = function (){ 300// load netreviews_helpful 301avLoadCookie(); 302avLoadCookie_comment(); 303// Display existing votes 304avDisplayVotes(); 305avDisplayExchangemessages(); 306} 307 308// Au clic de l'internaute sur un vote 309function avHelpfulClick(idProduct,vote,sign) { 310// Si double click pas d'action 311if (avhelpfulExec) { return false; } 312avhelpfulExec = true; 313// On recupère l'element <a> 314var link = document.getElementById(idProduct + '_' + vote); 315// On check si le lien est déjà actif ou non 316var linkIsActive = avHasClass(link,'active'); 317// Affichage en direct de l'action 318if (!linkIsActive) { 319 // Le lien n'est pas déjà actif > color 320 avColorButton(idProduct,vote); 321 avShowMessage(idProduct,avHelpfulSuccessMessage,'success'); 322} 323else { 324 // Le lien est déjà actif > uncolor 325 avUnColorButtons(idProduct); 326 avShowMessage(idProduct,'',''); 327} 328// On calcul le fingerPrint de l'internaute 329new Fingerprint2().get(function(result, components){ 330 // On recharge les coockies 331 avLoadCookie(); 332 // new vote > create 333 if (!linkIsActive) { 334 avCallHelpfulWebservice('create',idProduct,vote,sign,result); 335 } 336 // vote already sent > delete
337 else { 338 avCallHelpfulWebservice('delete',idProduct,vote,sign,result); 339 } 340}); 341} 342// Appel au webservice 343function avCallHelpfulWebservice(method,idProduct,vote,sign,fingerPrint) { 344// Si un vote existe déjà pour cet avis on récupère le fingerPrint existant 345var existingVote = getExistingVote(idProduct); 346if (typeof existingVote.fingerPrint != "undefined" && existingVote.fingerPrint != "") { 347 fingerPrint = existingVote.fingerPrint; 348} 349// Appel au webservice 350var http = new XMLHttpRequest(); 351var params = "method=" + method + "&idWebsite=" + avHelpfulIdwebsite + "&idProduct=" + idProduct + "&isHelpful=" + vote + "&fingerPrint=" + fingerPrint + "&sign=" + sign; 352http.open("POST", avHelpfulURL, true); 353http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); 354http.onreadystatechange = function() { 355 if(http.readyState == 4 && http.status == 200) { 356 try { 357 var obj = JSON.parse(http.responseText); 358 if (typeof obj.success !== "undefined") { 359 // SUCCESS 360 if (obj.success == '1') { 361 if (obj.method == 'create') { 362 // save cookie 363 avHelpfulCookie[obj.idProduct] = {}; 364 avHelpfulCookie[obj.idProduct]["vote"] = obj.isHelpful; 365 avHelpfulCookie[obj.idProduct]["fingerPrint"] = obj.fingerPrint; 366 avSaveCookie(); 367 } 368 if (obj.method == 'delete') { 369 // remove cookie 370 if (typeof avHelpfulCookie[obj.idProduct] !== "undefined") { 371 delete avHelpfulCookie[obj.idProduct]; 372 avSaveCookie(); 373 } 374 } 375 } 376 // ERROR 377 if (obj.success == '0') { 378 avUnColorButtons(obj.idProduct); 379 avShowMessage(obj.idProduct,avHelpfulErrorMessage,'error'); 380 console.log('[NetReviews] Error ' + obj.errorCode + ' : ' + obj.errorMessage); 381 } 382 } 383 } catch (e) { 384 console.error("Parsing error:", e); 385 avUnColorButtons(idProduct); 386 avShowMessage(idProduct,avHelpfulErrorMessage,'error'); 387 console.log('[NetReviews] Unknown error.'); 388 } 389 } 390 avhelpfulExec = false; 391} 392http.send(params); 393} 394// Met en avant le vote de l'internaute 395function avColorButton(idProduct,isHelpful) { 396var link = document.getElementById(idProduct + '_' + isHelpful); 397var linkIsActive = avHasClass(link,'active'); 398if (!linkIsActive) { 399 link.classList.add("active"); 400} 401if (isHelpful=='0') { 402 var otherLink = document.getElementById(idProduct + '_1') 403} 404else { 405 var otherLink = document.getElementById(idProduct + '_0') 406} 407otherLink.classList.remove("active"); 408} 409// Masque le vote de l'internaute 410function avUnColorButtons(idProduct) { 411var link_yes = document.getElementById(idProduct + '_1'); 412var link_no = document.getElementById(idProduct + '_0'); 413link_yes.classList.remove("active"); 414link_no.classList.remove("active"); 415} 416// Affiche un message de confirmation ou d'erreur 417function avShowMessage(idProduct,message,type) { 418var p = document.getElementById(idProduct + '_msg'); 419if (typeof p !== "undefined" && p != "null") { 420 p.innerHTML = message; 421 if (message != "") {p.style.display = 'block';} 422 if (message == "") {p.style.display = 'none';} 423 if (type == 'success') { p.style.color = '#0c9c5b'; } 424 if (type == 'error') { p.style.color = '#bf2525'; } 425} 426} 427// Test si un element possède une classe css 428function avHasClass(element, cls) { 429return (' ' + element.className + ' ').indexOf(' ' + cls + ' ') > -1; 430} 431// Charge le cookie netreviews_helpful 432function avLoadCookie() { 433var name = "netreviews_helpful="; 434var decodedCookie = decodeURIComponent(document.cookie); 435var ca = decodedCookie.split(';'); 436avHelpfulCookie = {}; 437for(var i = 0; i <ca.length; i++) { 438 var c = ca[i]; 439 while (c.charAt(0) == ' ') { 440 c = c.substring(1); 441 } 442 if (c.indexOf(name) == 0) { 443 avHelpfulCookie = JSON.parse(c.substring(name.length, c.length)); 444 } 445} 446} 447 448function avLoadCookie_comment() { 449var name = "netreviews_comment="; 450var decodedCookie = decodeURIComponent(document.cookie); 451var ca = decodedCookie.split(';'); 452avMessagesCookie = {}; 453for(var i = 0; i <ca.length; i++) { 454 var c = ca[i]; 455 while (c.charAt(0) == ' ') { 456 c = c.substring(1); 457 } 458 if (c.indexOf(name) == 0) { 459 avMessagesCookie = JSON.parse(c.substring(name.length, c.length)); 460 } 461} 462} 463// Sauvegarde le cookie netreviews_helpful 464function avSaveCookie() { 465var expiration_date = new Date(); 466expiration_date.setFullYear(expiration_date.getFullYear() + 1); 467var cookie_value = JSON.stringify(avHelpfulCookie); 468var cookie_string = "netreviews_helpful=" + cookie_value + "; path=/; expires=" + expiration_date.toUTCString(); 469document.cookie = cookie_string; 470} 471// Affiche les votes existants 472function avDisplayVotes () { 473var voteButtons = document.getElementsByClassName("netreviewsVote"); 474// console.log(voteButtons); 475for (var i = 0; i < voteButtons.length; i++) { 476 var idProduct = voteButtons[i].getAttribute("data-review-id"); 477 if (typeof idProduct !== "undefined" && idProduct != "") { 478 var existingVote = getExistingVote(idProduct); 479 if (typeof existingVote.vote != "undefined") { 480 avColorButton(idProduct,existingVote.vote); 481 } 482 } 483} 484} 485 486function avDisplayExchangemessages () { 487var commentstatus = document.getElementsByClassName("netreviews_button_comment"); 488// // console.log(commentstatus); 489for (var i = 0; i < commentstatus.length; i++) { 490 var reviewnumber = commentstatus[i].getAttribute("review_number"); 491 if (typeof reviewnumber !== "undefined" && reviewnumber && avMessagesCookie[reviewnumber]!== "undefined" && avMessagesCookie[reviewnumber]) { 492 if (avMessagesCookie[reviewnumber]["type"] == 1){ 493 $('a#display' + reviewnumber).removeClass("active"); 494 $('a#hide' + reviewnumber).addClass("active"); 495 $('div[review_number=' + reviewnumber + ']').show(); 496 } 497 } 498} 499} 500 501// Affiche les votes existants 502function getExistingVote (idProduct) { 503if (typeof avHelpfulCookie[idProduct] !== "undefined") 504 return avHelpfulCookie[idProduct]; 505else 506 return {}; 507} 508 509function loadScript(url, callback) { 510var script = document.createElement("script") 511script.type = "text/javascript"; 512if (script.readyState) { //IE 513 script.onreadystatechange = function() { 514 if (script.readyState == "loaded" || script.readyState == "complete") { 515 script.onreadystatechange = null; 516 callback(); 517 } 518 }; 519} else { //Others 520 script.onload = function() { 521 callback(); 522 }; 523} 524script.src = url; 525document.getElementsByTagName("head")[0].appendChild(script); 526} 527 528/*jslint devel: true */ 529 530//(function () { 531(function($avjq) { 532 533 "use strict"; 534 535 /** 536 * Adding an event listener on every thumbnail for the modal to open and adding keyboard event binding 537 * @function _init 538 // */ 539 (function _init() { 540 addListeners(); 541 document.addEventListener('keydown', nrKeyboardEvent); 542 })(); 543 544 /** 545 * Function handling the add of event listeners on each thumbnail 546 * @function addListeners 547 */ 548 function addListeners() { 549 document.addEventListener('click', function (event) { 550 if (event.target.className === 'netreviews_image_thumb') { 551 var targetElement = event.target || event.srcElement; 552 openModal(targetElement); 553 } 554 }); 555 } 556 557 /** 558 * Carousel constructor 559 * 560 * @param {object} parent Parent div containing an <ul> list that is going to be used for carousel setup 561 * @param {number} currentItem Clicked item number 562 * @param {number} count Number of children in the list (<li>) 563 * @constructor 564 */ 565 function Carousel(parent, currentItem, count) { 566 var vm = this; 567 vm.element = parent; 568 vm.current = currentItem; 569 vm.count = count; 570 vm.arrPrev = document.createTextNode('â¹'); 571 vm.arrNext = document.createTextNode('âº'); 572 vm.cPrevClass = 'carousel-prev'; 573 vm.cNextClass = 'carousel-next'; 574 vm.arrowClass = 'carousel-arrow'; 575 vm.crslClass = 'netreviews_media_part'; 576 vm.showPrev = showPrev; 577 vm.showNext = showNext; 578 vm.showArrows = showArrows; 579 580 /** 581 * Go to previous image 582 * @function showPrev 583 */ 584 function showPrev() { 585 if (vm.current === 0) { 586 vm.current = vm.count - 1; 587 } 588 else { 589 vm.current = vm.current - 1; 590 } 591 updateModal(vm.element.querySelectorAll('.' + vm.crslClass + ' > li > a')[vm.current]); 592 } 593 594 /**
595 * Go to next image 596 * @function showNext 597 */ 598 function showNext() { 599 if (vm.current === vm.count - 1) { 600 vm.current = 0; 601 } 602 else { 603 vm.current = vm.current + 1; 604 } 605 updateModal(vm.element.querySelectorAll('.' + vm.crslClass + ' > li > a')[vm.current]); 606 } 607 608 /** 609 * Create the navigation arrows (prev/next) and attach to carousel. 610 * @function showArrows 611 */ 612 function showArrows() { 613 var modal = document.getElementById('netreviews_media_modal'); 614 615 var buttonPrev = document.createElement('a'); 616 buttonPrev.appendChild(vm.arrPrev); 617 buttonPrev.classList.add(vm.cPrevClass); 618 buttonPrev.classList.add(vm.arrowClass); 619 buttonPrev.id = 'netreviews_media_prev'; 620 621 var buttonNext = document.createElement('a'); 622 buttonNext.appendChild(vm.arrNext); 623 buttonNext.classList.add(vm.cNextClass); 624 buttonNext.classList.add(vm.arrowClass); 625 buttonNext.id = 'netreviews_media_next'; 626 627 // Adding event listener on arrow click 628 buttonPrev.addEventListener('click', vm.showPrev); 629 buttonNext.addEventListener('click', vm.showNext); 630 631 // Adapting buttons positions 632 var browserheight = $avjq(window).height(); 633 634 buttonPrev.style.top = ((browserheight - 75) / 2) + 'px'; 635 buttonNext.style.top = ((browserheight - 75) / 2) + 'px'; 636 637 modal.appendChild(buttonPrev); 638 modal.appendChild(buttonNext); 639 } 640 } 641 642 /** 643 * Get current media index on click 644 * @function indexInParent 645 * 646 * @param node 647 * @returns {number} Media number 648 */ 649 function indexInParent(node) { 650 var children = node.parentNode.childNodes; 651 var num = 0; 652 for (var i = 0; i < children.length; i++) { 653 if (children[i] === node) { 654 return num; 655 } 656 if (children[i].nodeType === 1) { 657 num++; 658 } 659 } 660 } 661 662 /** 663 * Catch keyboard keydown : next / prev 664 * @function nrKeyboardEvent 665 */ 666 function nrKeyboardEvent(e) { 667 e = e || window.event; 668 var buttonPrev = document.getElementById('netreviews_media_prev'); 669 var buttonNext = document.getElementById('netreviews_media_next'); 670 var buttonClose = document.getElementById('netreviews_media_close'); 671 switch (e.keyCode) { 672 case 37: 673 if (typeof buttonPrev !== 'undefined' && buttonPrev !== null) { 674 buttonPrev.click(); 675 } 676 break; 677 case 39: 678 if (typeof buttonNext !== 'undefined' && buttonNext !== null) { 679 buttonNext.click(); 680 } 681 break; 682 case 27: 683 if (typeof buttonClose !== 'undefined' && buttonClose !== null) { 684 buttonClose.click(); 685 } 686 break; 687 } 688 } 689 690 /** 691 * Open modal container 692 * @function openModal 693 */ 694 function openModal(event) { 695 696 var identifier = event; 697 var closeButton = document.getElementById("netreviews_media_close"); 698 var dataType = identifier.getAttribute('data-type'); 699 var dataSrc = identifier.getAttribute('data-src'); 700 var modal = document.getElementById('netreviews_media_modal'); 701 var parent = identifier.parentNode.parentNode; 702 var count = identifier.parentNode.parentNode.querySelectorAll('li').length; 703 var current = indexInParent(identifier.parentNode); 704 var loader = document.createElement('div'); 705 706 loader.id = 'loader'; 707 loader.className = 'loader-image'; 708 modal.appendChild(loader); 709 710 // Render the carousel with focus on current clicked element 711 if (count > 1) { // OK 712 var carousel = new Carousel(parent, current, count); 713 carousel.showArrows(); 714 } 715 716 closeButton.addEventListener("click", closeModal); // OK 717 718 fillModal(modal, dataType, dataSrc); 719 } 720 721 /** 722 * Fill modal with media info 723 * @function fillModal 724 * 725 * @param modal 726 * @param dataType 727 * @param dataSrc 728 */ 729 function fillModal(modal, dataType, dataSrc) { 730 var modalContent = document.getElementById('netreviews_media_content'); 731 // Image display 732 if (dataType === 'image') { 733 var newImg = new Image(); 734 newImg.onload = function () { 735 modalContent.innerHTML = "<img id='netreviews_media_image' src='" + dataSrc + "'/>";
736 resizeMedia('netreviews_media_image', newImg.height, newImg.width); 737 modal.style.display = 'block'; 738 }; 739 newImg.src = dataSrc; 740 } 741 // Video display 742 743 else if (dataType === 'video') { 744 modalContent.innerHTML = "<iframe id='netreviews_media_video' src='" + dataSrc + "'/>"; 745 resizeMedia('netreviews_media_video', '500', '800'); 746 modal.style.display = 'block'; 747 } 748 } 749 750 /** 751 * On prev/next arrow click, update modal with media info 752 * @function updateModal 753 * 754 * @param {Object} item An <a> tag containing source and type attribute 755 */ 756 function updateModal(item) { 757 var dataSrc = item.getAttribute('data-src'); 758 var dataType = item.getAttribute('data-type'); 759 var modal = document.getElementById('netreviews_media_modal'); 760 761 fillModal(modal, dataType, dataSrc); 762 } 763 764 /** 765 * Close modal 766 * @function closeModal 767 */ 768 function closeModal() { 769 var iframeNetreviews = document.getElementById('netreviews_media_iframe'); 770 var modal = document.getElementById('netreviews_media_modal'); 771 var modalContent = document.getElementById('netreviews_media_content'); 772 773 // Empty modal 774 modalContent.innerHTML = ''; 775 removeArrows(); 776 removeLoader(); 777 778 modal.style.display = 'none'; 779 if (iframeNetreviews) { 780 iframeNetreviews.setAttribute('src', ''); 781 } 782 } 783 784 /** 785 * Remove arrows from carousel on modal close 786 * @function removeArrows 787 */ 788 function removeArrows() { 789 var arrows = document.getElementsByClassName('carousel-arrow'); 790 var modal = document.getElementById('netreviews_media_modal'); 791 var arrayFromArrows = []; 792 793 for (var j = 0; j < arrows.length; j++) { 794 arrayFromArrows.push(arrows[j]); 795 } 796 797 arrayFromArrows.forEach(function (element) { 798 modal.removeChild(element); 799 }); 800 } 801 802 /** 803 * Remove loader on modal close 804 * @function removeLoader 805 */ 806 function removeLoader() { 807 var modal = document.getElementById('netreviews_media_modal'); 808 var loader = document.getElementById('loader'); 809 modal.removeChild(loader); 810 } 811 812 /** 813 * Resize media to fit container 814 * @function resizeMedia 815 * 816 * @param {Object} blocId 817 * @param {number} initialImgHeight 818 * @param {number} initialImgWidth 819 */ 820 function resizeMedia(blocId, initialImgHeight, initialImgWidth) { 821 822 var desiredWidth; 823 var desiredHeight; 824 //display ratio 825 var displayRatio = 0.8; 826 //define image ratio 827 var ratio = initialImgHeight / initialImgWidth; 828 829 //get browser dimensions 830 var browserwidth = $avjq(window).width(); 831 var browserheight = $avjq(window).height(); 832 833 //image plus large que haute 834 if (initialImgWidth > initialImgHeight) { 835 // Dimensions souhaitées 836 desiredWidth = browserwidth * displayRatio; 837 desiredHeight = (browserwidth * ratio) * displayRatio; 838 // Si hauteur plus grande que l'ecran on adapte par la hauteur 839 if (desiredHeight > browserheight) { 840 desiredHeight = browserheight * displayRatio; 841 desiredWidth = (browserheight / ratio) * displayRatio; 842 } 843 } 844 //image plus haute que large 845 else { 846 // Dimensions souhaitées 847 desiredHeight = browserheight * displayRatio; 848 desiredWidth = (browserheight / ratio) * displayRatio; 849 // Si largeur plus grande que l'ecran on adapte par la largeur 850 if (desiredWidth > browserwidth) { 851 desiredWidth = browserwidth * displayRatio; 852 desiredHeight = (browserwidth * ratio) * displayRatio; 853 } 854 } 855 // La taille maximum d'affichage est la taille réelle de l'image 856 // Ne jamais zoomer une image 857 if (initialImgWidth < desiredWidth && initialImgHeight < desiredHeight) { 858 desiredWidth = initialImgWidth; 859 desiredHeight = initialImgHeight; 860 } 861 862 // On redimensionne l'image 863 document.getElementById(blocId).style.width = desiredWidth + 'px'; 864 document.getElementById(blocId).style.height = desiredHeight + 'px'; 865 866 // On update la position de l'image 867 document.getElementById(blocId).style.left = ((browserwidth - desiredWidth) / 2) + 'px'; 868 document.getElementById(blocId).style.top = ((browserheight - desiredHeight) / 2) + 'px'; 869 870 } 871})(jQuery); 872 873/*** FontAwesome ***/ 874window.FontAwesomeKitConfig = {"asyncLoading":{"enabled":true},"autoA11y":{"enabled":true},"baseUrl":"https://ka-f.fontawesome.com","baseUrlKit":"https://kit.fontawesome.com","detectConflictsUntil":null,"iconUploads":{},"id":83317600,"license":"free","method":"css","minify":{"enabled":true},"token":"fd565dd76c","v4FontFaceShim":{"enabled":true}
874,"v4shim":{"enabled":true},"version":"5.15.4"}; 875!function(t){"function"==typeof define&&define.amd?define("kit-loader",t):t()}((function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function r(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?n(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=t[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e){var n=e&&e.addOn||"",r=e&&e.baseFilename||t.license+n,o=e&&e.minify?".min":"",i=e&&e.fileSuffix||t.method,c=e&&e.subdir||t.method;return t.baseUrl+"/releases/"+("latest"===t.version?"latest":"v".concat(t.version))+"/"+c+"/"+r+o+"."+i}function a(t){return t.baseUrlKit+"/"+t.token+"/"+t.id+"/kit-upload.css"}function u(t,e){var n=e||["fa"],r="."+Array.prototype.join.call(n,",."),o=t.querySelectorAll(r);Array.prototype.forEach.call(o,(function(e){var n=e.getAttribute("title");e.setAttribute("aria-hidden","true");var r=!e.nextElementSibling||!e.nextElementSibling.classList.contains("sr-only");if(n&&r){var o=t.createElement("span");o.innerHTML=n,o.classList.add("sr-only"),e.parentNode.insertBefore(o,e.nextSibling)}}))}var f,s=function(){},d="undefined"!=typeof global&&void 0!==global.process&&"function"==typeof global.process.emit,l="undefined"==typeof setImmediate?setTimeout:setImmediate,h=[];function m(){for(var t=0;t<h.length;t++)h[t][0](h[t][1]);h=[],f=!1}function p(t,e){h.push([t,e]),f||(f=!0,l(m,0))}function y(t){var e=t.owner,n=e._state,r=e._data,o=t[n],i=t.then;if("function"==typeof o){n="fulfilled";try{r=o(r)}catch(t){w(i,t)}}b(i,r)||("fulfilled"===n&&v(i,r),"rejected"===n&&w(i,r))}function b(e,n){var r;try{if(e===n)throw new TypeError("A promises callback cannot return that same promise.");if(n&&("function"==typeof n||"object"===t(n))){var o=n.then;if("function"==typeof o)return o.call(n,(function(t){r||(r=!0,n===t?g(e,t):v(e,t))}),(function(t){r||(r=!0,w(e,t))})),!0}}catch(t){return r||w(e,t),!0}return!1}function v(t,e){t!==e&&b(t,e)||g(t,e)}function g(t,e){"pending"===t._state&&(t._state="settled",t._data=e,p(S,t))}function w(t,e){"pending"===t._state&&(t._state="settled",t._data=e,p(O,t))}function A(t){t._then=t._then.forEach(y)}function S(t){t._state="fulfilled",A(t)}function O(t){t._state="rejected",A(t),!t._handled&&d&&global.process.emit("unhandledRejection",t._data,t)}function j(t){global.process.emit("rejectionHandled",t)}function E(t){if("function"!=typeof t)throw new TypeError("Promise resolver "+t+" is not a function");if(this instanceof E==!1)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object c
875onstructor cannot be called as a function.");this._then=[],function(t,e){function n(t){w(e,t)}try{t((function(t){v(e,t)}),n)}catch(t){n(t)}}(t,this)}E.prototype={constructor:E,_state:"pending",_then:null,_data:void 0,_handled:!1,then:function(t,e){var n={owner:this,then:new this.constructor(s),fulfilled:t,rejected:e};return!e&&!t||this._handled||(this._handled=!0,"rejected"===this._state&&d&&p(j,this)),"fulfilled"===this._state||"rejected"===this._state?p(y,n):this._then.push(n),n.then},catch:function(t){return this.then(null,t)}},E.all=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.all().");return new E((function(e,n){var r=[],o=0;function i(t){return o++,function(n){r[t]=n,--o||e(r)}}for(var c,a=0;a<t.length;a++)(c=t[a])&&"function"==typeof c.then?c.then(i(a),n):r[a]=c;o||e(r)}))},E.race=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.race().");return new E((function(e,n){for(var r,o=0;o<t.length;o++)(r=t[o])&&"function"==typeof r.then?r.then(e,n):e(r)}))},E.resolve=function(e){return e&&"object"===t(e)&&e.constructor===E?e:new E((function(t){t(e)}))}
875,E.reject=function(t){return new E((function(e,n){n(t)}))};var _="function"==typeof Promise?Promise:E;function P(t,e){var n=e.fetch,r=e.XMLHttpRequest,o=e.token,i=t;return"URLSearchParams"in window?(i=new URL(t)).searchParams.set("token",o):i=i+"?token="+encodeURIComponent(o),i=i.toString(),new _((function(t,e){if("function"==typeof n)n(i,{mode:"cors",cache:"default"}).then((function(t){if(t.ok)return t.text();throw new Error("")})).then((function(e){t(e)})).catch(e);else if("function"==typeof r){var o=new r;o.addEventListener("loadend",(function(){this.responseText?t(this.responseText):e(new Error(""))}));["abort","error","timeout"].map((function(t){o.addEventListener(t,(function(){e(new Error(""))}))})),o.open("GET",i),o.send()}else{e(new Error(""))}}))}function C(t,e,n){var r=t;return[[/(url\("?)\.\.\/\.\.\/\.\./g,function(t,n){return"".concat(n).concat(e)}],[/(url\("?)\.\.\/webfonts/g,function(t,r){return"".concat(r).concat(e,"/releases/v").concat(n,"/webfonts")}],[/(url\("?)https:\/\/kit-free([^.])*\.fontawesome\.com/g,function(t,n){return"".concat(n).concat(e)}
875]].forEach((function(t){var e=o(t,2),n=e[0],i=e[1];r=r.replace(n,i)})),r}function F(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=e.document||o,i=u.bind(u,o,["fa","fab","fas","far","fal","fad","fak"]),f=Object.keys(t.iconUploads||{}).length>0;t.autoA11y.enabled&&n(i);var s=[{id:"fa-main",addOn:void 0}];t.v4shim.enabled&&s.push({id:"fa-v4-shims",addOn:"-v4-shims"}),t.v4FontFaceShim.enabled&&s.push({id:"fa-v4-font-face",addOn:"-v4-font-face"}),f&&s.push({id:"fa-kit-upload",customCss:!0});var d=s.map((function(n){return new _((function(o,i){P(n.customCss?a(t):c(t,{addOn:n.addOn,minify:t.minify.enabled}),e).then((function(i){o(U(i,r(r({},e),{},{baseUrl:t.baseUrl,version:t.version,id:n.id,contentFilter:function(t,e){return C(t,e.baseUrl,e.version)}})))})).catch(i)}))}));return _.all(d)}function U(t,e){var n=e.contentFilter||function(t,e){return t},r=document.createElement("style"),o=document.createTextNode(n(t,e));return r.appendChild(o),r.media="all",e.id&&r.setAttribute("id",e.id),e&&e.detectingConflicts&&e.detectionIgnoreAttr&&r.setAttributeNode(document.createAttribute(e.detectionIgnoreAttr)),r}function k(t,e){e.autoA11y=t.autoA11y.enabled,"pro"===t.license&&(e.autoFetchSvg=!0,e.fetchSvgFrom=t.baseUrl+"/releases/"+("latest"===t.version?"latest":"v".concat(t.version))+"/svgs",e.fetchUploadedSvgFrom=t.uploadsUrl);var n=[];return t.v4shim.enabled&&n.push(new _((function(n,o){P(c(t,{addOn:"-v4-shims",minify:t.minify.enabled}),e).then((function(t){n(I(t,r(r({},e),{},{id:"fa-v4-shims"})))})).catch(o)}))),n.push(new _((function(n,o){P(c(t,{minify:t.minify.enabled}),e).then((function(t){var o=I(t,r(r({},e),{},{id:"fa-main"}));n(function(t,e){var n=e&&void 0!==e.autoFetchSvg?e.autoFetchSvg:void 0,r=e&&void 0!==e.autoA11y?e.autoA11y:void 0;void 0!==r&&t.setAttribute("data-auto-a11y",r?"true":"false");n&&(t.setAttributeNode(document.createAttribute("data-auto-fetch-svg")),t.setAttribute("data-fetch-svg-from",e.fetchSvgFrom),t.setAttribute("data-fetch-uploaded-svg-from",e.fetchUploadedSvgFrom));return t}(o,e))})).catch(o)}))),_.all(n)}function I(t,e){var n=document.createElement("SCRIPT"),r=document.createTextNode(t);return n.appendChild(r),n.referrerPolicy="strict-origin",e.id&&n.setAttribute("id",e.id),e&&e.detectingConflicts&&e.detectionIgnoreAttr&&n.setAttributeNode(document.createAttribute(e.detectionIgnoreAttr)),n}function L(t){var e,n=[],r=document,o=r.documentElement.doScroll,i=(o?/^loaded|^c/:/^loaded|^i|^c/).test(r.readyState);i||r.addEventListener("DOMContentLoaded",e=function(){for(r.removeEventListener("DOMContentLoaded",e),i=1;e=n.shift();)e()}),i?setTimeout(t,0):n.push(t)}function T(t){"undefined"!=typeof MutationObserver&&new MutationObserver(t).observe(document,{childList:!0,subtree:!0})}try{if(window.FontAwesomeKitConfig){var x=window.FontAwesomeKitConfig,M={detectingConflicts:x.detectConflictsUntil&&new Date<=new Date(x.detectConflictsUntil),detectionIgnoreAttr:"data-fa-detection-ignore",fetch:window.fetch,token:x.token,XMLHttpRequest:window.XMLHttpRequest,document:document},D=document.currentScript,N=D?D.parentElement:document.head;(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"js"===t.method?k(t,e):"css"===t.method?F(t,e,(function(t){L(t),T(t)})):void 0})(x,M).then((function(t){t.map((function(t){try{N.insertBefore(t,D?D.nextSibling:null)}catch(e){N.appendChild(t)}})),M.detectingConflicts&&D&&L((function(){D.setAttributeNode(document.createAttribute(M.detectionIgnoreAttr));var t=function(t,e){var n=document.createElement("script");return e&&e.detectionIgnoreAttr&&n.setAttributeNode(document.createAttribute(e.detectionIgnoreAttr)),n.src=c(t,{baseFilename:"conflict-detection",fileSuffix:"js",subdir:"js",minify:t.minify.enabled}),n}(x,M);document.body.appendChild(t)}))})).catch((function(t){console.error("".concat("Font Awesome Kit:"," ").concat(t))}))}}catch(t){console.error("".concat("Font Awesome Kit:"," ").concat(t))}}));
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.