1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ffsync_ynh.git synced 2024-09-03 18:26:38 +02:00
ffsync_ynh/sources/page/sync_files/site-bundle.js

2 lines
3.2 KiB
JavaScript
Raw Normal View History

2018-08-20 23:55:00 +02:00
function _dntEnabled(e,t){"use strict";var n=e||navigator.doNotTrack||window.doNotTrack||navigator.msDoNotTrack,r=t||navigator.userAgent,i=["Windows NT 6.1","Windows NT 6.2","Windows NT 6.3"],s=r.match(/Firefox\/(\d+)/),o=/MSIE|Trident/i,u=o.test(r),a=r.match(/Windows.+?(?=;)/g);return u&&typeof Array.prototype.indexOf!="function"?!1:(s&&parseInt(s[1],10)<32?n="Unspecified":u&&a&&i.indexOf(a.toString())!==-1?n="Unspecified":n={0:"Disabled",1:"Enabled"}[n]||"Unspecified",n==="Enabled"?!0:!1)}(function(){"use strict";window.site={getPlatform:function(e,t){return t=t===""?"":t||navigator.platform,e=e||navigator.userAgent,/Win(16|9[x58]|NT( [1234]| 5\.0| [^0-9]|[^ -]|$))/.test(e)||/Windows ([MC]E|9[x58]|3\.1|4\.10|NT( [1234]\D| 5\.0| [^0-9]|[^ ]|$))/.test(e)||/Windows_95/.test(e)?"oldwin":t.indexOf("Win32")!==-1||t.indexOf("Win64")!==-1?"windows":/android/i.test(e)?"android":/linux/i.test(t)||/linux/i.test(e)?"linux":t.indexOf("MacPPC")!==-1?"oldmac":/Mac OS X 10.[0-5]\D/.test(e)?"oldmac":t.indexOf("iPhone")!==-1||t.indexOf("iPad")!==-1||t.indexOf("iPod")!==-1?"ios":e.indexOf("Mac OS X")!==-1?"osx":e.indexOf("MSIE 5.2")!==-1?"oldmac":t.indexOf("Mac")!==-1?"oldmac":t===""&&/Firefox/.test(e)?"fxos":"other"},getPlatformVersion:function(e){e=e||navigator.userAgent;var t=e.match(/Windows\ NT\ (\d+\.\d+)/)||e.match(/Mac\ OS\ X\ (\d+[\._]\d+)/)||e.match(/Android\ (\d+\.\d+)/);return t?t[1].replace("_","."):undefined},getArchType:function(e,t){t=t===""?"":t||navigator.platform,e=e||navigator.userAgent;var n;return/Windows/.test(e)&&/ARM/.test(e)?"armv7":navigator.cpuClass?navigator.cpuClass.toLowerCase():(n=/armv\d+/i,n.test(t)||n.test(e)?RegExp.lastMatch.toLowerCase():/aarch64/.test(t)?"armv8":(n=/PowerPC|PPC/i,n.test(t)||n.test(e)?"ppc":"x86"))},getArchSize:function(e,t){t=t===""?"":t||navigator.platform,e=e||navigator.userAgent;var n=/x64|x86_64|Win64|WOW64|aarch64/i;return n.test(t)||n.test(e)?64:32},needsSha1:function(e){e=e||navigator.userAgent;var t=/Windows (?:NT 5.1|XP|NT 5.2|NT 6.0)/,n=/\sFirefox/;return t.test(e)&&!n.test(e)},platform:"other",platformVersion:undefined,archType:"x64",archSize:32},function(){var e=document.documentElement,t=window.site.platform=window.site.getPlatform(),n=window.site.platformVersion=window.site.getPlatformVersion();t==="windows"?n&&parseFloat(n)>=6.1?e.className+=" win7up":window.site.needsSha1()&&(e.className+=" sha-1"):(e.className=e.className.replace("windows",t),t==="osx"&&n&&n.match(/^10\.[678]$/)&&(e.className+=" pre-mavericks"),t==="android"&&n&&parseFloat(n)===2.3&&(e.className+=" gingerbread"));var r=window.site.archType=window.site.getArchType(),i=window.site.archSize=window.site.getArchSize(),s=r.match(/armv(\d+)/);r!=="x86"&&(e.className=e.className.replace("x86",r),s&&(e.className+=" arm",parseFloat(s[1])>=7&&(e.className+=" armv7up"))),i===64&&(e.className+=" x64"),e.className=e.className.replace(/\bno-js\b/,"js")}()})();if(typeof Mozilla=="undefined")var Mozilla={};(function(){var e=window.dataLayer=window.dataLayer||[],t={};t.getPageId=function(e){var t=document.getElementsByTagName("html")[0].getAttribute("data-gtm-page-id"),n=e?e:document.location.pathname;return t?t:n.replace(/^(\/\w{2}\-\w{2}\/|\/\w{2,3}\/)/,"/")},e.push({event:"page-id-loaded",pageId:t.getPageId()}),Mozilla.Analytics=t})();