File modules/editor/codemirror/src/util/browser.min.js
Last commit: Tue May 22 22:39:53 2018 +0200 Jan Dankert Fix für PHP 7.2: 'Object' darf nun nicht mehr als Klassennamen verwendet werden. AUCH NICHT IN EINEM NAMESPACE! WTF, wozu habe ich das in einen verfickten Namespace gepackt? Wozu soll der sonst da sein??? Amateure. Daher nun notgedrungen unbenannt in 'BaseObject'.
1 // Kludges for bugs and behavior differences that can't be feature 2 // detected are enabled based on userAgent etc sniffing. 3 let userAgent = navigator.userAgent 4 let platform = navigator.platform 5 6 export let gecko = /gecko\/\d/i.test(userAgent) 7 let ie_upto10 = /MSIE \d/.test(userAgent) 8 let ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(userAgent) 9 let edge = /Edge\/(\d+)/.exec(userAgent) 10 export let ie = ie_upto10 || ie_11up || edge 11 export let ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]) 12 export let webkit = !edge && /WebKit\//.test(userAgent) 13 let qtwebkit = webkit && /Qt\/\d+\.\d+/.test(userAgent) 14 export let chrome = !edge && /Chrome\//.test(userAgent) 15 export let presto = /Opera\//.test(userAgent) 16 export let safari = /Apple Computer/.test(navigator.vendor) 17 export let mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent) 18 export let phantom = /PhantomJS/.test(userAgent) 19 20 export let ios = !edge && /AppleWebKit/.test(userAgent) && /Mobile\/\w+/.test(userAgent) 21 export let android = /Android/.test(userAgent) 22 // This is woefully incomplete. Suggestions for alternative methods welcome. 23 export let mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent) 24 export let mac = ios || /Mac/.test(platform) 25 export let chromeOS = /\bCrOS\b/.test(userAgent) 26 export let windows = /win/i.test(platform) 27 28 let presto_version = presto && userAgent.match(/Version\/(\d*\.\d*)/) 29 if (presto_version) presto_version = Number(presto_version[1]) 30 if (presto_version && presto_version >= 15) { presto = false; webkit = true } 31 // Some browsers use the wrong event properties to signal cmd/ctrl on OS X 32 export let flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11)) 33 export let captureRightClick = gecko || (ie && ie_version >= 9)
Downloadmodules/editor/codemirror/src/util/browser.min.js
History Tue, 22 May 2018 22:39:53 +0200 Jan Dankert Fix für PHP 7.2: 'Object' darf nun nicht mehr als Klassennamen verwendet werden. AUCH NICHT IN EINEM NAMESPACE! WTF, wozu habe ich das in einen verfickten Namespace gepackt? Wozu soll der sonst da sein??? Amateure. Daher nun notgedrungen unbenannt in 'BaseObject'.