<commit_before>/**
 * mediawiki.client has some convenience functions for user agent checks
 *
 * TODO this should be combined with or bootstrap jquery.client.js
 */
(function (mw) {

	var userAgent = navigator.userAgent;

	mw.isMobileDevice = function () {
		return ( mw.isIphone() || mw.isIpod() || mw.isIpad() || mw.isAndroid() || mw.isWindowsPhone() || mw.getConfig("EmbedPlayer.ForceNativeComponent") === true || mw.getConfig("EmbedPlayer.SimulateMobile") === true )
	};
	mw.isNativeApp = function () {
		return mw.getConfig("EmbedPlayer.ForceNativeComponent");
	};
	mw.isIphone = function () {
		return ( mw.getConfig("EmbedPlayer.ForceNativeComponent") !== true && userAgent.indexOf('iPhone') != -1 && !mw.isIpad() ) || mw.isIpod();
	};
	mw.isIE = function () {
		return (/msie/.test(userAgent.toLowerCase()) || /trident/.test(userAgent.toLowerCase()));
	};
	mw.isChromeCast = function(){
		return (/CrKey/.test(userAgent));
	};
	mw.isIE7 = function () {
		return (/msie 7/.test(userAgent.toLowerCase()));
	};
	mw.isIE8 = function () {
		return document.documentMode === 8;
	};
	mw.isIE9 = function () {
		return document.documentMode === 9;
	};
    mw.isIE11 = function () {
        return (/trident\/7.0/.test(userAgent.toLowerCase()));
    };
	mw.isEdge = function () {
        return (/edge/.test(userAgent.toLowerCase()));
    };
	mw.isDesktopSafari = function () {
		return (/safari/).test(userAgent.toLowerCase()) && !mw.isMobileDevice() && !mw.isChrome();
	};
	mw.isSafari = function () {
		return (/safari/).test(userAgent.toLowerCase()) && !mw.isChrome() && !mw.isEdge();
	};
	mw.isIE9Comp = function () {
		return (/msie 7/.test(userAgent.toLowerCase()) && /trident\/5/.test(userAgent.toLowerCase()));
	};
	mw.isIE10Comp = function () {
		return (/msie 7/.test(userAgent.toLowerCase()) && /trident\/6/.test(userAgent.toLowerCase()));
	};
	// Uses hack described at:
	// http://www.bdoran.co.uk/2010/07/19/detecting-the-iphone4-and-resolution-with-javascript-or-php/
	mw.isIphone4 = function () {<commit_msg>mw.isSafariDesktop checks also not mw.isEdge (#2891)<commit_after>/**
 * mediawiki.client has some convenience functions for user agent checks
 *
 * TODO this should be combined with or bootstrap jquery.client.js
 */
(function (mw) {

	var userAgent = navigator.userAgent;

	mw.isMobileDevice = function () {
		return ( mw.isIphone() || mw.isIpod() || mw.isIpad() || mw.isAndroid() || mw.isWindowsPhone() || mw.getConfig("EmbedPlayer.ForceNativeComponent") === true || mw.getConfig("EmbedPlayer.SimulateMobile") === true )
	};
	mw.isNativeApp = function () {
		return mw.getConfig("EmbedPlayer.ForceNativeComponent");
	};
	mw.isIphone = function () {
		return ( mw.getConfig("EmbedPlayer.ForceNativeComponent") !== true && userAgent.indexOf('iPhone') != -1 && !mw.isIpad() ) || mw.isIpod();
	};
	mw.isIE = function () {
		return (/msie/.test(userAgent.toLowerCase()) || /trident/.test(userAgent.toLowerCase()));
	};
	mw.isChromeCast = function(){
		return (/CrKey/.test(userAgent));
	};
	mw.isIE7 = function () {
		return (/msie 7/.test(userAgent.toLowerCase()));
	};
	mw.isIE8 = function () {
		return document.documentMode === 8;
	};
	mw.isIE9 = function () {
		return document.documentMode === 9;
	};
    mw.isIE11 = function () {
        return (/trident\/7.0/.test(userAgent.toLowerCase()));
    };
	mw.isEdge = function () {
        return (/edge/.test(userAgent.toLowerCase()));
    };
	mw.isDesktopSafari = function () {
		return mw.isSafari() && !mw.isMobileDevice();
	};
	mw.isSafari = function () {
		return (/safari/).test(userAgent.toLowerCase()) && !mw.isChrome() && !mw.isEdge();
	};
	mw.isIE9Comp = function () {
		return (/msie 7/.test(userAgent.toLowerCase()) && /trident\/5/.test(userAgent.toLowerCase()));
	};
	mw.isIE10Comp = function () {
		return (/msie 7/.test(userAgent.toLowerCase()) && /trident\/6/.test(userAgent.toLowerCase()));
	};
	// Uses hack described at:
	// http://www.bdoran.co.uk/2010/07/19/detecting-the-iphone4-and-resolution-with-javascript-or-php/
	mw.isIphone4 = function () {
{'fraction_non_alphanumeric': 0.19683481701285854, 'fraction_numerical': 0.01483679525222552, 'mean_word_length': 3.932926829268293, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '930720', 'n_tokens_mistral': 1511, 'n_tokens_neox': 1418, 'n_words': 228}