Edit File by line
/home/barbar84/www/wp-inclu.../js/tinymce/themes/inlite
File: theme.js
if (elm.nodeType === 1) {
[6000] Fix | Delete
if (elm.nodeName === 'BR' || !!elm.getAttribute('data-mce-bogus')) {
[6001] Fix | Delete
return true;
[6002] Fix | Delete
}
[6003] Fix | Delete
if (elm.getAttribute('data-mce-type') === 'bookmark') {
[6004] Fix | Delete
return true;
[6005] Fix | Delete
}
[6006] Fix | Delete
}
[6007] Fix | Delete
return false;
[6008] Fix | Delete
}
[6009] Fix | Delete
if (editor.settings.elementpath !== false) {
[6010] Fix | Delete
self.on('select', function (e) {
[6011] Fix | Delete
editor.focus();
[6012] Fix | Delete
editor.selection.select(this.row()[e.index].element);
[6013] Fix | Delete
editor.nodeChanged();
[6014] Fix | Delete
});
[6015] Fix | Delete
editor.on('nodeChange', function (e) {
[6016] Fix | Delete
var outParents = [];
[6017] Fix | Delete
var parents = e.parents;
[6018] Fix | Delete
var i = parents.length;
[6019] Fix | Delete
while (i--) {
[6020] Fix | Delete
if (parents[i].nodeType === 1 && !isHidden(parents[i])) {
[6021] Fix | Delete
var args = editor.fire('ResolveName', {
[6022] Fix | Delete
name: parents[i].nodeName.toLowerCase(),
[6023] Fix | Delete
target: parents[i]
[6024] Fix | Delete
});
[6025] Fix | Delete
if (!args.isDefaultPrevented()) {
[6026] Fix | Delete
outParents.push({
[6027] Fix | Delete
name: args.name,
[6028] Fix | Delete
element: parents[i]
[6029] Fix | Delete
});
[6030] Fix | Delete
}
[6031] Fix | Delete
if (args.isPropagationStopped()) {
[6032] Fix | Delete
break;
[6033] Fix | Delete
}
[6034] Fix | Delete
}
[6035] Fix | Delete
}
[6036] Fix | Delete
self.row(outParents);
[6037] Fix | Delete
});
[6038] Fix | Delete
}
[6039] Fix | Delete
return self._super();
[6040] Fix | Delete
}
[6041] Fix | Delete
});
[6042] Fix | Delete
[6043] Fix | Delete
var FormItem = Container.extend({
[6044] Fix | Delete
Defaults: {
[6045] Fix | Delete
layout: 'flex',
[6046] Fix | Delete
align: 'center',
[6047] Fix | Delete
defaults: { flex: 1 }
[6048] Fix | Delete
},
[6049] Fix | Delete
renderHtml: function () {
[6050] Fix | Delete
var self = this, layout = self._layout, prefix = self.classPrefix;
[6051] Fix | Delete
self.classes.add('formitem');
[6052] Fix | Delete
layout.preRender(self);
[6053] Fix | Delete
return '<div id="' + self._id + '" class="' + self.classes + '" hidefocus="1" tabindex="-1">' + (self.settings.title ? '<div id="' + self._id + '-title" class="' + prefix + 'title">' + self.settings.title + '</div>' : '') + '<div id="' + self._id + '-body" class="' + self.bodyClasses + '">' + (self.settings.html || '') + layout.renderHtml(self) + '</div>' + '</div>';
[6054] Fix | Delete
}
[6055] Fix | Delete
});
[6056] Fix | Delete
[6057] Fix | Delete
var Form = Container.extend({
[6058] Fix | Delete
Defaults: {
[6059] Fix | Delete
containerCls: 'form',
[6060] Fix | Delete
layout: 'flex',
[6061] Fix | Delete
direction: 'column',
[6062] Fix | Delete
align: 'stretch',
[6063] Fix | Delete
flex: 1,
[6064] Fix | Delete
padding: 15,
[6065] Fix | Delete
labelGap: 30,
[6066] Fix | Delete
spacing: 10,
[6067] Fix | Delete
callbacks: {
[6068] Fix | Delete
submit: function () {
[6069] Fix | Delete
this.submit();
[6070] Fix | Delete
}
[6071] Fix | Delete
}
[6072] Fix | Delete
},
[6073] Fix | Delete
preRender: function () {
[6074] Fix | Delete
var self = this, items = self.items();
[6075] Fix | Delete
if (!self.settings.formItemDefaults) {
[6076] Fix | Delete
self.settings.formItemDefaults = {
[6077] Fix | Delete
layout: 'flex',
[6078] Fix | Delete
autoResize: 'overflow',
[6079] Fix | Delete
defaults: { flex: 1 }
[6080] Fix | Delete
};
[6081] Fix | Delete
}
[6082] Fix | Delete
items.each(function (ctrl) {
[6083] Fix | Delete
var formItem;
[6084] Fix | Delete
var label = ctrl.settings.label;
[6085] Fix | Delete
if (label) {
[6086] Fix | Delete
formItem = new FormItem(global$4.extend({
[6087] Fix | Delete
items: {
[6088] Fix | Delete
type: 'label',
[6089] Fix | Delete
id: ctrl._id + '-l',
[6090] Fix | Delete
text: label,
[6091] Fix | Delete
flex: 0,
[6092] Fix | Delete
forId: ctrl._id,
[6093] Fix | Delete
disabled: ctrl.disabled()
[6094] Fix | Delete
}
[6095] Fix | Delete
}, self.settings.formItemDefaults));
[6096] Fix | Delete
formItem.type = 'formitem';
[6097] Fix | Delete
ctrl.aria('labelledby', ctrl._id + '-l');
[6098] Fix | Delete
if (typeof ctrl.settings.flex === 'undefined') {
[6099] Fix | Delete
ctrl.settings.flex = 1;
[6100] Fix | Delete
}
[6101] Fix | Delete
self.replace(ctrl, formItem);
[6102] Fix | Delete
formItem.add(ctrl);
[6103] Fix | Delete
}
[6104] Fix | Delete
});
[6105] Fix | Delete
},
[6106] Fix | Delete
submit: function () {
[6107] Fix | Delete
return this.fire('submit', { data: this.toJSON() });
[6108] Fix | Delete
},
[6109] Fix | Delete
postRender: function () {
[6110] Fix | Delete
var self = this;
[6111] Fix | Delete
self._super();
[6112] Fix | Delete
self.fromJSON(self.settings.data);
[6113] Fix | Delete
},
[6114] Fix | Delete
bindStates: function () {
[6115] Fix | Delete
var self = this;
[6116] Fix | Delete
self._super();
[6117] Fix | Delete
function recalcLabels() {
[6118] Fix | Delete
var maxLabelWidth = 0;
[6119] Fix | Delete
var labels = [];
[6120] Fix | Delete
var i, labelGap, items;
[6121] Fix | Delete
if (self.settings.labelGapCalc === false) {
[6122] Fix | Delete
return;
[6123] Fix | Delete
}
[6124] Fix | Delete
if (self.settings.labelGapCalc === 'children') {
[6125] Fix | Delete
items = self.find('formitem');
[6126] Fix | Delete
} else {
[6127] Fix | Delete
items = self.items();
[6128] Fix | Delete
}
[6129] Fix | Delete
items.filter('formitem').each(function (item) {
[6130] Fix | Delete
var labelCtrl = item.items()[0], labelWidth = labelCtrl.getEl().clientWidth;
[6131] Fix | Delete
maxLabelWidth = labelWidth > maxLabelWidth ? labelWidth : maxLabelWidth;
[6132] Fix | Delete
labels.push(labelCtrl);
[6133] Fix | Delete
});
[6134] Fix | Delete
labelGap = self.settings.labelGap || 0;
[6135] Fix | Delete
i = labels.length;
[6136] Fix | Delete
while (i--) {
[6137] Fix | Delete
labels[i].settings.minWidth = maxLabelWidth + labelGap;
[6138] Fix | Delete
}
[6139] Fix | Delete
}
[6140] Fix | Delete
self.on('show', recalcLabels);
[6141] Fix | Delete
recalcLabels();
[6142] Fix | Delete
}
[6143] Fix | Delete
});
[6144] Fix | Delete
[6145] Fix | Delete
var FieldSet = Form.extend({
[6146] Fix | Delete
Defaults: {
[6147] Fix | Delete
containerCls: 'fieldset',
[6148] Fix | Delete
layout: 'flex',
[6149] Fix | Delete
direction: 'column',
[6150] Fix | Delete
align: 'stretch',
[6151] Fix | Delete
flex: 1,
[6152] Fix | Delete
padding: '25 15 5 15',
[6153] Fix | Delete
labelGap: 30,
[6154] Fix | Delete
spacing: 10,
[6155] Fix | Delete
border: 1
[6156] Fix | Delete
},
[6157] Fix | Delete
renderHtml: function () {
[6158] Fix | Delete
var self = this, layout = self._layout, prefix = self.classPrefix;
[6159] Fix | Delete
self.preRender();
[6160] Fix | Delete
layout.preRender(self);
[6161] Fix | Delete
return '<fieldset id="' + self._id + '" class="' + self.classes + '" hidefocus="1" tabindex="-1">' + (self.settings.title ? '<legend id="' + self._id + '-title" class="' + prefix + 'fieldset-title">' + self.settings.title + '</legend>' : '') + '<div id="' + self._id + '-body" class="' + self.bodyClasses + '">' + (self.settings.html || '') + layout.renderHtml(self) + '</div>' + '</fieldset>';
[6162] Fix | Delete
}
[6163] Fix | Delete
});
[6164] Fix | Delete
[6165] Fix | Delete
var unique$1 = 0;
[6166] Fix | Delete
var generate = function (prefix) {
[6167] Fix | Delete
var date = new Date();
[6168] Fix | Delete
var time = date.getTime();
[6169] Fix | Delete
var random = Math.floor(Math.random() * 1000000000);
[6170] Fix | Delete
unique$1++;
[6171] Fix | Delete
return prefix + '_' + random + unique$1 + String(time);
[6172] Fix | Delete
};
[6173] Fix | Delete
[6174] Fix | Delete
var fromHtml = function (html, scope) {
[6175] Fix | Delete
var doc = scope || domGlobals.document;
[6176] Fix | Delete
var div = doc.createElement('div');
[6177] Fix | Delete
div.innerHTML = html;
[6178] Fix | Delete
if (!div.hasChildNodes() || div.childNodes.length > 1) {
[6179] Fix | Delete
domGlobals.console.error('HTML does not have a single root node', html);
[6180] Fix | Delete
throw new Error('HTML must have a single root node');
[6181] Fix | Delete
}
[6182] Fix | Delete
return fromDom(div.childNodes[0]);
[6183] Fix | Delete
};
[6184] Fix | Delete
var fromTag = function (tag, scope) {
[6185] Fix | Delete
var doc = scope || domGlobals.document;
[6186] Fix | Delete
var node = doc.createElement(tag);
[6187] Fix | Delete
return fromDom(node);
[6188] Fix | Delete
};
[6189] Fix | Delete
var fromText = function (text, scope) {
[6190] Fix | Delete
var doc = scope || domGlobals.document;
[6191] Fix | Delete
var node = doc.createTextNode(text);
[6192] Fix | Delete
return fromDom(node);
[6193] Fix | Delete
};
[6194] Fix | Delete
var fromDom = function (node) {
[6195] Fix | Delete
if (node === null || node === undefined) {
[6196] Fix | Delete
throw new Error('Node cannot be null or undefined');
[6197] Fix | Delete
}
[6198] Fix | Delete
return { dom: constant(node) };
[6199] Fix | Delete
};
[6200] Fix | Delete
var fromPoint = function (docElm, x, y) {
[6201] Fix | Delete
var doc = docElm.dom();
[6202] Fix | Delete
return Option.from(doc.elementFromPoint(x, y)).map(fromDom);
[6203] Fix | Delete
};
[6204] Fix | Delete
var Element = {
[6205] Fix | Delete
fromHtml: fromHtml,
[6206] Fix | Delete
fromTag: fromTag,
[6207] Fix | Delete
fromText: fromText,
[6208] Fix | Delete
fromDom: fromDom,
[6209] Fix | Delete
fromPoint: fromPoint
[6210] Fix | Delete
};
[6211] Fix | Delete
[6212] Fix | Delete
var cached = function (f) {
[6213] Fix | Delete
var called = false;
[6214] Fix | Delete
var r;
[6215] Fix | Delete
return function () {
[6216] Fix | Delete
var args = [];
[6217] Fix | Delete
for (var _i = 0; _i < arguments.length; _i++) {
[6218] Fix | Delete
args[_i] = arguments[_i];
[6219] Fix | Delete
}
[6220] Fix | Delete
if (!called) {
[6221] Fix | Delete
called = true;
[6222] Fix | Delete
r = f.apply(null, args);
[6223] Fix | Delete
}
[6224] Fix | Delete
return r;
[6225] Fix | Delete
};
[6226] Fix | Delete
};
[6227] Fix | Delete
[6228] Fix | Delete
var ATTRIBUTE = domGlobals.Node.ATTRIBUTE_NODE;
[6229] Fix | Delete
var CDATA_SECTION = domGlobals.Node.CDATA_SECTION_NODE;
[6230] Fix | Delete
var COMMENT = domGlobals.Node.COMMENT_NODE;
[6231] Fix | Delete
var DOCUMENT = domGlobals.Node.DOCUMENT_NODE;
[6232] Fix | Delete
var DOCUMENT_TYPE = domGlobals.Node.DOCUMENT_TYPE_NODE;
[6233] Fix | Delete
var DOCUMENT_FRAGMENT = domGlobals.Node.DOCUMENT_FRAGMENT_NODE;
[6234] Fix | Delete
var ELEMENT = domGlobals.Node.ELEMENT_NODE;
[6235] Fix | Delete
var TEXT = domGlobals.Node.TEXT_NODE;
[6236] Fix | Delete
var PROCESSING_INSTRUCTION = domGlobals.Node.PROCESSING_INSTRUCTION_NODE;
[6237] Fix | Delete
var ENTITY_REFERENCE = domGlobals.Node.ENTITY_REFERENCE_NODE;
[6238] Fix | Delete
var ENTITY = domGlobals.Node.ENTITY_NODE;
[6239] Fix | Delete
var NOTATION = domGlobals.Node.NOTATION_NODE;
[6240] Fix | Delete
[6241] Fix | Delete
var Immutable = function () {
[6242] Fix | Delete
var fields = [];
[6243] Fix | Delete
for (var _i = 0; _i < arguments.length; _i++) {
[6244] Fix | Delete
fields[_i] = arguments[_i];
[6245] Fix | Delete
}
[6246] Fix | Delete
return function () {
[6247] Fix | Delete
var values = [];
[6248] Fix | Delete
for (var _i = 0; _i < arguments.length; _i++) {
[6249] Fix | Delete
values[_i] = arguments[_i];
[6250] Fix | Delete
}
[6251] Fix | Delete
if (fields.length !== values.length) {
[6252] Fix | Delete
throw new Error('Wrong number of arguments to struct. Expected "[' + fields.length + ']", got ' + values.length + ' arguments');
[6253] Fix | Delete
}
[6254] Fix | Delete
var struct = {};
[6255] Fix | Delete
each(fields, function (name, i) {
[6256] Fix | Delete
struct[name] = constant(values[i]);
[6257] Fix | Delete
});
[6258] Fix | Delete
return struct;
[6259] Fix | Delete
};
[6260] Fix | Delete
};
[6261] Fix | Delete
[6262] Fix | Delete
var node = function () {
[6263] Fix | Delete
var f = Global$1.getOrDie('Node');
[6264] Fix | Delete
return f;
[6265] Fix | Delete
};
[6266] Fix | Delete
var compareDocumentPosition = function (a, b, match) {
[6267] Fix | Delete
return (a.compareDocumentPosition(b) & match) !== 0;
[6268] Fix | Delete
};
[6269] Fix | Delete
var documentPositionPreceding = function (a, b) {
[6270] Fix | Delete
return compareDocumentPosition(a, b, node().DOCUMENT_POSITION_PRECEDING);
[6271] Fix | Delete
};
[6272] Fix | Delete
var documentPositionContainedBy = function (a, b) {
[6273] Fix | Delete
return compareDocumentPosition(a, b, node().DOCUMENT_POSITION_CONTAINED_BY);
[6274] Fix | Delete
};
[6275] Fix | Delete
var Node = {
[6276] Fix | Delete
documentPositionPreceding: documentPositionPreceding,
[6277] Fix | Delete
documentPositionContainedBy: documentPositionContainedBy
[6278] Fix | Delete
};
[6279] Fix | Delete
[6280] Fix | Delete
var firstMatch = function (regexes, s) {
[6281] Fix | Delete
for (var i = 0; i < regexes.length; i++) {
[6282] Fix | Delete
var x = regexes[i];
[6283] Fix | Delete
if (x.test(s)) {
[6284] Fix | Delete
return x;
[6285] Fix | Delete
}
[6286] Fix | Delete
}
[6287] Fix | Delete
return undefined;
[6288] Fix | Delete
};
[6289] Fix | Delete
var find$1 = function (regexes, agent) {
[6290] Fix | Delete
var r = firstMatch(regexes, agent);
[6291] Fix | Delete
if (!r) {
[6292] Fix | Delete
return {
[6293] Fix | Delete
major: 0,
[6294] Fix | Delete
minor: 0
[6295] Fix | Delete
};
[6296] Fix | Delete
}
[6297] Fix | Delete
var group = function (i) {
[6298] Fix | Delete
return Number(agent.replace(r, '$' + i));
[6299] Fix | Delete
};
[6300] Fix | Delete
return nu(group(1), group(2));
[6301] Fix | Delete
};
[6302] Fix | Delete
var detect = function (versionRegexes, agent) {
[6303] Fix | Delete
var cleanedAgent = String(agent).toLowerCase();
[6304] Fix | Delete
if (versionRegexes.length === 0) {
[6305] Fix | Delete
return unknown();
[6306] Fix | Delete
}
[6307] Fix | Delete
return find$1(versionRegexes, cleanedAgent);
[6308] Fix | Delete
};
[6309] Fix | Delete
var unknown = function () {
[6310] Fix | Delete
return nu(0, 0);
[6311] Fix | Delete
};
[6312] Fix | Delete
var nu = function (major, minor) {
[6313] Fix | Delete
return {
[6314] Fix | Delete
major: major,
[6315] Fix | Delete
minor: minor
[6316] Fix | Delete
};
[6317] Fix | Delete
};
[6318] Fix | Delete
var Version = {
[6319] Fix | Delete
nu: nu,
[6320] Fix | Delete
detect: detect,
[6321] Fix | Delete
unknown: unknown
[6322] Fix | Delete
};
[6323] Fix | Delete
[6324] Fix | Delete
var edge = 'Edge';
[6325] Fix | Delete
var chrome = 'Chrome';
[6326] Fix | Delete
var ie = 'IE';
[6327] Fix | Delete
var opera = 'Opera';
[6328] Fix | Delete
var firefox = 'Firefox';
[6329] Fix | Delete
var safari = 'Safari';
[6330] Fix | Delete
var isBrowser = function (name, current) {
[6331] Fix | Delete
return function () {
[6332] Fix | Delete
return current === name;
[6333] Fix | Delete
};
[6334] Fix | Delete
};
[6335] Fix | Delete
var unknown$1 = function () {
[6336] Fix | Delete
return nu$1({
[6337] Fix | Delete
current: undefined,
[6338] Fix | Delete
version: Version.unknown()
[6339] Fix | Delete
});
[6340] Fix | Delete
};
[6341] Fix | Delete
var nu$1 = function (info) {
[6342] Fix | Delete
var current = info.current;
[6343] Fix | Delete
var version = info.version;
[6344] Fix | Delete
return {
[6345] Fix | Delete
current: current,
[6346] Fix | Delete
version: version,
[6347] Fix | Delete
isEdge: isBrowser(edge, current),
[6348] Fix | Delete
isChrome: isBrowser(chrome, current),
[6349] Fix | Delete
isIE: isBrowser(ie, current),
[6350] Fix | Delete
isOpera: isBrowser(opera, current),
[6351] Fix | Delete
isFirefox: isBrowser(firefox, current),
[6352] Fix | Delete
isSafari: isBrowser(safari, current)
[6353] Fix | Delete
};
[6354] Fix | Delete
};
[6355] Fix | Delete
var Browser = {
[6356] Fix | Delete
unknown: unknown$1,
[6357] Fix | Delete
nu: nu$1,
[6358] Fix | Delete
edge: constant(edge),
[6359] Fix | Delete
chrome: constant(chrome),
[6360] Fix | Delete
ie: constant(ie),
[6361] Fix | Delete
opera: constant(opera),
[6362] Fix | Delete
firefox: constant(firefox),
[6363] Fix | Delete
safari: constant(safari)
[6364] Fix | Delete
};
[6365] Fix | Delete
[6366] Fix | Delete
var windows$1 = 'Windows';
[6367] Fix | Delete
var ios = 'iOS';
[6368] Fix | Delete
var android = 'Android';
[6369] Fix | Delete
var linux = 'Linux';
[6370] Fix | Delete
var osx = 'OSX';
[6371] Fix | Delete
var solaris = 'Solaris';
[6372] Fix | Delete
var freebsd = 'FreeBSD';
[6373] Fix | Delete
var isOS = function (name, current) {
[6374] Fix | Delete
return function () {
[6375] Fix | Delete
return current === name;
[6376] Fix | Delete
};
[6377] Fix | Delete
};
[6378] Fix | Delete
var unknown$2 = function () {
[6379] Fix | Delete
return nu$2({
[6380] Fix | Delete
current: undefined,
[6381] Fix | Delete
version: Version.unknown()
[6382] Fix | Delete
});
[6383] Fix | Delete
};
[6384] Fix | Delete
var nu$2 = function (info) {
[6385] Fix | Delete
var current = info.current;
[6386] Fix | Delete
var version = info.version;
[6387] Fix | Delete
return {
[6388] Fix | Delete
current: current,
[6389] Fix | Delete
version: version,
[6390] Fix | Delete
isWindows: isOS(windows$1, current),
[6391] Fix | Delete
isiOS: isOS(ios, current),
[6392] Fix | Delete
isAndroid: isOS(android, current),
[6393] Fix | Delete
isOSX: isOS(osx, current),
[6394] Fix | Delete
isLinux: isOS(linux, current),
[6395] Fix | Delete
isSolaris: isOS(solaris, current),
[6396] Fix | Delete
isFreeBSD: isOS(freebsd, current)
[6397] Fix | Delete
};
[6398] Fix | Delete
};
[6399] Fix | Delete
var OperatingSystem = {
[6400] Fix | Delete
unknown: unknown$2,
[6401] Fix | Delete
nu: nu$2,
[6402] Fix | Delete
windows: constant(windows$1),
[6403] Fix | Delete
ios: constant(ios),
[6404] Fix | Delete
android: constant(android),
[6405] Fix | Delete
linux: constant(linux),
[6406] Fix | Delete
osx: constant(osx),
[6407] Fix | Delete
solaris: constant(solaris),
[6408] Fix | Delete
freebsd: constant(freebsd)
[6409] Fix | Delete
};
[6410] Fix | Delete
[6411] Fix | Delete
var DeviceType = function (os, browser, userAgent) {
[6412] Fix | Delete
var isiPad = os.isiOS() && /ipad/i.test(userAgent) === true;
[6413] Fix | Delete
var isiPhone = os.isiOS() && !isiPad;
[6414] Fix | Delete
var isAndroid3 = os.isAndroid() && os.version.major === 3;
[6415] Fix | Delete
var isAndroid4 = os.isAndroid() && os.version.major === 4;
[6416] Fix | Delete
var isTablet = isiPad || isAndroid3 || isAndroid4 && /mobile/i.test(userAgent) === true;
[6417] Fix | Delete
var isTouch = os.isiOS() || os.isAndroid();
[6418] Fix | Delete
var isPhone = isTouch && !isTablet;
[6419] Fix | Delete
var iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false;
[6420] Fix | Delete
return {
[6421] Fix | Delete
isiPad: constant(isiPad),
[6422] Fix | Delete
isiPhone: constant(isiPhone),
[6423] Fix | Delete
isTablet: constant(isTablet),
[6424] Fix | Delete
isPhone: constant(isPhone),
[6425] Fix | Delete
isTouch: constant(isTouch),
[6426] Fix | Delete
isAndroid: os.isAndroid,
[6427] Fix | Delete
isiOS: os.isiOS,
[6428] Fix | Delete
isWebView: constant(iOSwebview)
[6429] Fix | Delete
};
[6430] Fix | Delete
};
[6431] Fix | Delete
[6432] Fix | Delete
var detect$1 = function (candidates, userAgent) {
[6433] Fix | Delete
var agent = String(userAgent).toLowerCase();
[6434] Fix | Delete
return find(candidates, function (candidate) {
[6435] Fix | Delete
return candidate.search(agent);
[6436] Fix | Delete
});
[6437] Fix | Delete
};
[6438] Fix | Delete
var detectBrowser = function (browsers, userAgent) {
[6439] Fix | Delete
return detect$1(browsers, userAgent).map(function (browser) {
[6440] Fix | Delete
var version = Version.detect(browser.versionRegexes, userAgent);
[6441] Fix | Delete
return {
[6442] Fix | Delete
current: browser.name,
[6443] Fix | Delete
version: version
[6444] Fix | Delete
};
[6445] Fix | Delete
});
[6446] Fix | Delete
};
[6447] Fix | Delete
var detectOs = function (oses, userAgent) {
[6448] Fix | Delete
return detect$1(oses, userAgent).map(function (os) {
[6449] Fix | Delete
var version = Version.detect(os.versionRegexes, userAgent);
[6450] Fix | Delete
return {
[6451] Fix | Delete
current: os.name,
[6452] Fix | Delete
version: version
[6453] Fix | Delete
};
[6454] Fix | Delete
});
[6455] Fix | Delete
};
[6456] Fix | Delete
var UaString = {
[6457] Fix | Delete
detectBrowser: detectBrowser,
[6458] Fix | Delete
detectOs: detectOs
[6459] Fix | Delete
};
[6460] Fix | Delete
[6461] Fix | Delete
var contains = function (str, substr) {
[6462] Fix | Delete
return str.indexOf(substr) !== -1;
[6463] Fix | Delete
};
[6464] Fix | Delete
[6465] Fix | Delete
var normalVersionRegex = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/;
[6466] Fix | Delete
var checkContains = function (target) {
[6467] Fix | Delete
return function (uastring) {
[6468] Fix | Delete
return contains(uastring, target);
[6469] Fix | Delete
};
[6470] Fix | Delete
};
[6471] Fix | Delete
var browsers = [
[6472] Fix | Delete
{
[6473] Fix | Delete
name: 'Edge',
[6474] Fix | Delete
versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],
[6475] Fix | Delete
search: function (uastring) {
[6476] Fix | Delete
return contains(uastring, 'edge/') && contains(uastring, 'chrome') && contains(uastring, 'safari') && contains(uastring, 'applewebkit');
[6477] Fix | Delete
}
[6478] Fix | Delete
},
[6479] Fix | Delete
{
[6480] Fix | Delete
name: 'Chrome',
[6481] Fix | Delete
versionRegexes: [
[6482] Fix | Delete
/.*?chrome\/([0-9]+)\.([0-9]+).*/,
[6483] Fix | Delete
normalVersionRegex
[6484] Fix | Delete
],
[6485] Fix | Delete
search: function (uastring) {
[6486] Fix | Delete
return contains(uastring, 'chrome') && !contains(uastring, 'chromeframe');
[6487] Fix | Delete
}
[6488] Fix | Delete
},
[6489] Fix | Delete
{
[6490] Fix | Delete
name: 'IE',
[6491] Fix | Delete
versionRegexes: [
[6492] Fix | Delete
/.*?msie\ ?([0-9]+)\.([0-9]+).*/,
[6493] Fix | Delete
/.*?rv:([0-9]+)\.([0-9]+).*/
[6494] Fix | Delete
],
[6495] Fix | Delete
search: function (uastring) {
[6496] Fix | Delete
return contains(uastring, 'msie') || contains(uastring, 'trident');
[6497] Fix | Delete
}
[6498] Fix | Delete
},
[6499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function