1/** 2 * Created by mcaron on 2019-02-11. 3 */ 4 5// The use of var instead of let or const is voluntary // 6// FIXME: userAgent shouldnt be used here as a way to distinguish the users navigator since it can be faked by the user 7var userAgent = navigator.userAgent; 8if (userAgent.indexOf('Trident') !== -1 && userAgent.indexOf('MSIE') !== -1) { 9 var msg = "This website does not work with Internet Explorer compatibility mode. Please use a more recent navigator (Chrome, Firefox or Edge)."; 10 if (navigator.browserLanguage.indexOf('fr') !== -1) { 11 msg = "Ce site web ne fonctionne pas avec Internet Explorer en mode compatibilité. Veuillez utiliser un navigateur plus récent (Chrome, Firefox ou Edge)."; 12 } 13 document.write('<p style="font-size: 16px; margin: auto"; align="center">' + msg + '</p>'); 14} 15//Checking if the users navigator runs on IOS. If yes, we need to add an event listener to prevent blank pages when loading from cache with the back button. 16function iOS() { 17 return [ 18 'iPad Simulator', 19 'iPhone Simulator', 20 'iPod Simulator', 21 'iPad', 22 'iPhone', 23 'iPod' 24 ].includes(navigator.platform) 25 || (navigator.userAgent.includes("Mac") && "ontouchend" in document) 26 } 27if(iOS()){ 28 window.addEventListener("pageshow", function(evt){ 29 if(evt.persisted){ 30 setTimeout(function(){ 31 window.location.reload(); 32 },10); 33 } 34}, false); 35}
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.