artalk 2.2.4 → 2.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Artalk.es.js +276 -270
- package/dist/Artalk.iife.js +1 -1
- package/dist/Artalk.js +1 -1
- package/index.html +1 -1
- package/package.json +1 -1
- package/src/api/index.ts +19 -3
- package/src/artalk.ts +20 -11
- package/src/components/comment.ts +1 -1
- package/src/components/editor-plugs/emoticons-plug.ts +37 -16
- package/src/components/editor-plugs/preview-plug.ts +1 -1
- package/src/components/editor.ts +21 -2
- package/src/components/list-lite.ts +4 -1
- package/src/components/list.ts +1 -1
- package/src/components/sidebar-layer.ts +3 -3
- package/src/context.ts +2 -1
- package/src/lib/checker/captcha-checker.ts +1 -1
- package/src/lib/checker/index.ts +1 -1
- package/src/lib/detect.ts +222 -0
- package/src/lib/utils.ts +32 -14
- package/types/artalk-config.d.ts +1 -1
- package/src/lib/detect.js +0 -263
package/src/lib/utils.ts
CHANGED
|
@@ -143,10 +143,10 @@ export function versionCompare(a: string, b: string) {
|
|
|
143
143
|
/** 初始化 marked */
|
|
144
144
|
export function initMarked(ctx: Context) {
|
|
145
145
|
const renderer = new libMarked.Renderer()
|
|
146
|
-
const
|
|
146
|
+
const orgLinkRenderer = renderer.link
|
|
147
147
|
renderer.link = (href, title, text) => {
|
|
148
148
|
const localLink = href?.startsWith(`${window.location.protocol}//${window.location.hostname}`);
|
|
149
|
-
const html =
|
|
149
|
+
const html = orgLinkRenderer.call(renderer as any, href, title, text);
|
|
150
150
|
return html.replace(/^<a /, `<a target="_blank" ${!localLink ? `rel="noreferrer noopener nofollow"` : ''} `);
|
|
151
151
|
}
|
|
152
152
|
|
|
@@ -186,8 +186,9 @@ export function initMarked(ctx: Context) {
|
|
|
186
186
|
|
|
187
187
|
/** 解析 markdown */
|
|
188
188
|
export function marked(ctx: Context, src: string): string {
|
|
189
|
+
// @link https://github.com/markedjs/marked/discussions/1232
|
|
189
190
|
// @link https://gist.github.com/lionel-rowe/bb384465ba4e4c81a9c8dada84167225
|
|
190
|
-
|
|
191
|
+
let dest = insane(ctx.markedInstance.parse(src), {
|
|
191
192
|
allowedClasses: {},
|
|
192
193
|
allowedSchemes: ['http', 'https', 'mailto'],
|
|
193
194
|
allowedTags: [
|
|
@@ -198,7 +199,7 @@ export function marked(ctx: Context, src: string): string {
|
|
|
198
199
|
],
|
|
199
200
|
allowedAttributes: {
|
|
200
201
|
'*': ['title', 'accesskey'],
|
|
201
|
-
a: ['href', 'name', 'target', 'aria-label'],
|
|
202
|
+
a: ['href', 'name', 'target', 'aria-label', 'rel'],
|
|
202
203
|
img: ['src', 'alt', 'title', 'atk-emoticon', 'aria-label'],
|
|
203
204
|
// for code highlight
|
|
204
205
|
code: ['class'],
|
|
@@ -229,28 +230,45 @@ export function marked(ctx: Context, src: string): string {
|
|
|
229
230
|
return true
|
|
230
231
|
}
|
|
231
232
|
})
|
|
233
|
+
|
|
234
|
+
// 内容替换器
|
|
235
|
+
ctx.markedReplacers.forEach((replacer) => {
|
|
236
|
+
if (typeof replacer === 'function') dest = replacer(dest)
|
|
237
|
+
})
|
|
238
|
+
|
|
239
|
+
return dest
|
|
232
240
|
}
|
|
233
241
|
|
|
234
242
|
/** 获取修正后的 UserAgent */
|
|
235
243
|
export async function getCorrectUserAgent() {
|
|
236
244
|
const uaRaw = navigator.userAgent
|
|
237
|
-
|
|
238
|
-
if (!uaData || !uaData.getHighEntropyValues) {
|
|
245
|
+
if (!(navigator as any).userAgentData || !(navigator as any).userAgentData.getHighEntropyValues) {
|
|
239
246
|
return uaRaw
|
|
240
247
|
}
|
|
241
248
|
|
|
242
|
-
//
|
|
243
|
-
// @link https://
|
|
249
|
+
// @link https://web.dev/migrate-to-ua-ch/
|
|
250
|
+
// @link https://web.dev/user-agent-client-hints/
|
|
251
|
+
const uaData = (navigator as any).userAgentData
|
|
244
252
|
let uaGot: any = null
|
|
245
253
|
try {
|
|
246
254
|
uaGot = await uaData.getHighEntropyValues(["platformVersion"])
|
|
247
255
|
} catch (err) { console.error(err); return uaRaw }
|
|
248
|
-
|
|
249
|
-
if (uaData.platform !== "Windows") { return uaRaw }
|
|
250
256
|
const majorPlatformVersion = Number(uaGot.platformVersion.split('.')[0])
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
257
|
+
|
|
258
|
+
if (uaData.platform === "Windows") {
|
|
259
|
+
if (majorPlatformVersion >= 13) { // @link https://docs.microsoft.com/en-us/microsoft-edge/web-platform/how-to-detect-win11
|
|
260
|
+
// @date 2022-4-29
|
|
261
|
+
// Win 11 样本:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36"
|
|
262
|
+
return uaRaw.replace(/Windows NT 10.0/, 'Windows NT 11.0')
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
if (uaData.platform === "macOS") {
|
|
266
|
+
if (majorPlatformVersion >= 11) { // 11 => BigSur
|
|
267
|
+
// @date 2022-4-29
|
|
268
|
+
// (Intel Chip) macOS 12.3 样本:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"
|
|
269
|
+
// (Arm Chip) macOS 样本:"Mozilla/5.0 (Macintosh; ARM Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Safari/605.1.15"
|
|
270
|
+
return uaRaw.replace(/(Mac OS X \d+_\d+_\d+|Mac OS X)/, `Mac OS X ${uaGot.platformVersion.replace(/\./g, '_')}`)
|
|
271
|
+
}
|
|
254
272
|
}
|
|
255
273
|
|
|
256
274
|
return uaRaw
|
|
@@ -268,7 +286,7 @@ export function isValidURL(urlRaw: string) {
|
|
|
268
286
|
|
|
269
287
|
/** 获取基于 conf.server 的 URL */
|
|
270
288
|
export function getURLBasedOnApi(ctx: Context, path: string) {
|
|
271
|
-
return
|
|
289
|
+
return getURLBasedOn(ctx.conf.server, path)
|
|
272
290
|
}
|
|
273
291
|
|
|
274
292
|
/** 获取基于某个 baseURL 的 URL */
|
package/types/artalk-config.d.ts
CHANGED
package/src/lib/detect.js
DELETED
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
var win = window || {}
|
|
3
|
-
var nav = navigator || {}
|
|
4
|
-
function Detect (userAgent) {
|
|
5
|
-
var u = userAgent || nav.userAgent
|
|
6
|
-
var _this = this
|
|
7
|
-
|
|
8
|
-
var match = {
|
|
9
|
-
// 内核
|
|
10
|
-
Trident: u.indexOf('Trident') > -1 || u.indexOf('NET CLR') > -1,
|
|
11
|
-
Presto: u.indexOf('Presto') > -1,
|
|
12
|
-
WebKit: u.indexOf('AppleWebKit') > -1,
|
|
13
|
-
Gecko: u.indexOf('Gecko/') > -1,
|
|
14
|
-
// 浏览器
|
|
15
|
-
Safari: u.indexOf('Safari') > -1,
|
|
16
|
-
Chrome: u.indexOf('Chrome') > -1 || u.indexOf('CriOS') > -1,
|
|
17
|
-
IE: u.indexOf('MSIE') > -1 || u.indexOf('Trident') > -1,
|
|
18
|
-
Edge: u.indexOf('Edge') > -1,
|
|
19
|
-
Firefox: u.indexOf('Firefox') > -1 || u.indexOf('FxiOS') > -1,
|
|
20
|
-
'Firefox Focus': u.indexOf('Focus') > -1,
|
|
21
|
-
Chromium: u.indexOf('Chromium') > -1,
|
|
22
|
-
Opera: u.indexOf('Opera') > -1 || u.indexOf('OPR') > -1,
|
|
23
|
-
Vivaldi: u.indexOf('Vivaldi') > -1,
|
|
24
|
-
Yandex: u.indexOf('YaBrowser') > -1,
|
|
25
|
-
Kindle: u.indexOf('Kindle') > -1 || u.indexOf('Silk/') > -1,
|
|
26
|
-
360: u.indexOf('360EE') > -1 || u.indexOf('360SE') > -1,
|
|
27
|
-
UC: u.indexOf('UC') > -1 || u.indexOf(' UBrowser') > -1,
|
|
28
|
-
QQBrowser: u.indexOf('QQBrowser') > -1,
|
|
29
|
-
QQ: u.indexOf('QQ/') > -1,
|
|
30
|
-
Baidu: u.indexOf('Baidu') > -1 || u.indexOf('BIDUBrowser') > -1,
|
|
31
|
-
Maxthon: u.indexOf('Maxthon') > -1,
|
|
32
|
-
Sogou: u.indexOf('MetaSr') > -1 || u.indexOf('Sogou') > -1,
|
|
33
|
-
LBBROWSER: u.indexOf('LBBROWSER') > -1,
|
|
34
|
-
'2345Explorer': u.indexOf('2345Explorer') > -1,
|
|
35
|
-
TheWorld: u.indexOf('TheWorld') > -1,
|
|
36
|
-
XiaoMi: u.indexOf('MiuiBrowser') > -1,
|
|
37
|
-
Quark: u.indexOf('Quark') > -1,
|
|
38
|
-
Qiyu: u.indexOf('Qiyu') > -1,
|
|
39
|
-
Wechat: u.indexOf('MicroMessenger') > -1,
|
|
40
|
-
Taobao: u.indexOf('AliApp(TB') > -1,
|
|
41
|
-
Alipay: u.indexOf('AliApp(AP') > -1,
|
|
42
|
-
Weibo: u.indexOf('Weibo') > -1,
|
|
43
|
-
Douban: u.indexOf('com.douban.frodo') > -1,
|
|
44
|
-
Suning: u.indexOf('SNEBUY-APP') > -1,
|
|
45
|
-
iQiYi: u.indexOf('IqiyiApp') > -1,
|
|
46
|
-
// 系统或平台
|
|
47
|
-
Windows: u.indexOf('Windows') > -1,
|
|
48
|
-
Linux: u.indexOf('Linux') > -1 || u.indexOf('X11') > -1,
|
|
49
|
-
'Mac OS': u.indexOf('Macintosh') > -1,
|
|
50
|
-
Android: u.indexOf('Android') > -1 || u.indexOf('Adr') > -1,
|
|
51
|
-
Ubuntu: u.indexOf('Ubuntu') > -1,
|
|
52
|
-
FreeBSD: u.indexOf('FreeBSD') > -1,
|
|
53
|
-
Debian: u.indexOf('Debian') > -1,
|
|
54
|
-
'Windows Phone': u.indexOf('IEMobile') > -1 || u.indexOf('Windows Phone') > -1,
|
|
55
|
-
BlackBerry: u.indexOf('BlackBerry') > -1 || u.indexOf('RIM') > -1,
|
|
56
|
-
MeeGo: u.indexOf('MeeGo') > -1,
|
|
57
|
-
Symbian: u.indexOf('Symbian') > -1,
|
|
58
|
-
iOS: u.indexOf('like Mac OS X') > -1,
|
|
59
|
-
'Chrome OS': u.indexOf('CrOS') > -1,
|
|
60
|
-
WebOS: u.indexOf('hpwOS') > -1,
|
|
61
|
-
// 设备
|
|
62
|
-
Mobile: u.indexOf('Mobi') > -1 || u.indexOf('iPh') > -1 || u.indexOf('480') > -1,
|
|
63
|
-
Tablet: u.indexOf('Tablet') > -1 || u.indexOf('Pad') > -1 || u.indexOf('Nexus 7') > -1
|
|
64
|
-
}
|
|
65
|
-
// 修正
|
|
66
|
-
if (match.Mobile) {
|
|
67
|
-
match.Mobile = !(u.indexOf('iPad') > -1)
|
|
68
|
-
} else if (win.showModalDialog && win.chrome) {
|
|
69
|
-
match['360'] = true
|
|
70
|
-
}
|
|
71
|
-
// 基本信息
|
|
72
|
-
var hash = {
|
|
73
|
-
engine: ['WebKit', 'Trident', 'Gecko', 'Presto'],
|
|
74
|
-
browser: ['Safari', 'Chrome', 'Edge', 'IE', 'Firefox', 'Firefox Focus', 'Chromium', 'Opera', 'Vivaldi', 'Yandex', 'Kindle', '360', 'UC', 'QQBrowser', 'QQ', 'Baidu', 'Maxthon', 'Sogou', 'LBBROWSER', '2345Explorer', 'TheWorld', 'XiaoMi', 'Quark', 'Qiyu', 'Wechat', 'Taobao', 'Alipay', 'Weibo', 'Douban', 'Suning', 'iQiYi'],
|
|
75
|
-
os: ['Windows', 'Linux', 'Mac OS', 'Android', 'Ubuntu', 'FreeBSD', 'Debian', 'iOS', 'Windows Phone', 'BlackBerry', 'MeeGo', 'Symbian', 'Chrome OS', 'WebOS'],
|
|
76
|
-
device: ['Mobile', 'Tablet']
|
|
77
|
-
}
|
|
78
|
-
_this.device = 'PC'
|
|
79
|
-
_this.language = (function () {
|
|
80
|
-
var g = (nav.browserLanguage || nav.language)
|
|
81
|
-
var arr = g.split('-')
|
|
82
|
-
if (arr[1]) {
|
|
83
|
-
arr[1] = arr[1].toUpperCase()
|
|
84
|
-
}
|
|
85
|
-
return arr.join('_')
|
|
86
|
-
})()
|
|
87
|
-
for (var s in hash) {
|
|
88
|
-
for (var i = 0; i < hash[s].length; i++) {
|
|
89
|
-
var value = hash[s][i]
|
|
90
|
-
if (match[value]) {
|
|
91
|
-
_this[s] = value
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
// 系统版本信息
|
|
96
|
-
var osVersion = {
|
|
97
|
-
Windows: function () {
|
|
98
|
-
var v = u.replace(/^.*Windows NT ([\d.]+);.*$/, '$1')
|
|
99
|
-
var hash = {
|
|
100
|
-
6.4: '10',
|
|
101
|
-
6.3: '8.1',
|
|
102
|
-
6.2: '8',
|
|
103
|
-
6.1: '7',
|
|
104
|
-
'6.0': 'Vista',
|
|
105
|
-
5.2: 'XP',
|
|
106
|
-
5.1: 'XP',
|
|
107
|
-
'5.0': '2000',
|
|
108
|
-
'10.0': '10',
|
|
109
|
-
'11.0': '11' // 自定的,不是微软官方的判断方法
|
|
110
|
-
}
|
|
111
|
-
return hash[v] || v
|
|
112
|
-
},
|
|
113
|
-
Android: function () {
|
|
114
|
-
return u.replace(/^.*Android ([\d.]+);.*$/, '$1')
|
|
115
|
-
},
|
|
116
|
-
iOS: function () {
|
|
117
|
-
return u.replace(/^.*OS ([\d_]+) like.*$/, '$1').replace(/_/g, '.')
|
|
118
|
-
},
|
|
119
|
-
Debian: function () {
|
|
120
|
-
return u.replace(/^.*Debian\/([\d.]+).*$/, '$1')
|
|
121
|
-
},
|
|
122
|
-
'Windows Phone': function () {
|
|
123
|
-
return u.replace(/^.*Windows Phone( OS)? ([\d.]+);.*$/, '$2')
|
|
124
|
-
},
|
|
125
|
-
'Mac OS': function () {
|
|
126
|
-
return u.replace(/^.*Mac OS X ([\d_]+).*$/, '$1').replace(/_/g, '.')
|
|
127
|
-
},
|
|
128
|
-
WebOS: function () {
|
|
129
|
-
return u.replace(/^.*hpwOS\/([\d.]+);.*$/, '$1')
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
_this.osVersion = ''
|
|
133
|
-
if (osVersion[_this.os]) {
|
|
134
|
-
_this.osVersion = osVersion[_this.os]()
|
|
135
|
-
if (_this.osVersion === u) {
|
|
136
|
-
_this.osVersion = ''
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
// 浏览器版本信息
|
|
140
|
-
var version = {
|
|
141
|
-
Safari: function () {
|
|
142
|
-
return u.replace(/^.*Version\/([\d.]+).*$/, '$1')
|
|
143
|
-
},
|
|
144
|
-
Chrome: function () {
|
|
145
|
-
return u.replace(/^.*Chrome\/([\d.]+).*$/, '$1').replace(/^.*CriOS\/([\d.]+).*$/, '$1')
|
|
146
|
-
},
|
|
147
|
-
IE: function () {
|
|
148
|
-
return u.replace(/^.*MSIE ([\d.]+).*$/, '$1').replace(/^.*rv:([\d.]+).*$/, '$1')
|
|
149
|
-
},
|
|
150
|
-
Edge: function () {
|
|
151
|
-
return u.replace(/^.*Edge\/([\d.]+).*$/, '$1')
|
|
152
|
-
},
|
|
153
|
-
Firefox: function () {
|
|
154
|
-
return u.replace(/^.*Firefox\/([\d.]+).*$/, '$1').replace(/^.*FxiOS\/([\d.]+).*$/, '$1')
|
|
155
|
-
},
|
|
156
|
-
'Firefox Focus': function () {
|
|
157
|
-
return u.replace(/^.*Focus\/([\d.]+).*$/, '$1')
|
|
158
|
-
},
|
|
159
|
-
Chromium: function () {
|
|
160
|
-
return u.replace(/^.*Chromium\/([\d.]+).*$/, '$1')
|
|
161
|
-
},
|
|
162
|
-
Opera: function () {
|
|
163
|
-
return u.replace(/^.*Opera\/([\d.]+).*$/, '$1').replace(/^.*OPR\/([\d.]+).*$/, '$1')
|
|
164
|
-
},
|
|
165
|
-
Vivaldi: function () {
|
|
166
|
-
return u.replace(/^.*Vivaldi\/([\d.]+).*$/, '$1')
|
|
167
|
-
},
|
|
168
|
-
Yandex: function () {
|
|
169
|
-
return u.replace(/^.*YaBrowser\/([\d.]+).*$/, '$1')
|
|
170
|
-
},
|
|
171
|
-
Kindle: function () {
|
|
172
|
-
return u.replace(/^.*Version\/([\d.]+).*$/, '$1')
|
|
173
|
-
},
|
|
174
|
-
Maxthon: function () {
|
|
175
|
-
return u.replace(/^.*Maxthon\/([\d.]+).*$/, '$1')
|
|
176
|
-
},
|
|
177
|
-
QQBrowser: function () {
|
|
178
|
-
return u.replace(/^.*QQBrowser\/([\d.]+).*$/, '$1')
|
|
179
|
-
},
|
|
180
|
-
QQ: function () {
|
|
181
|
-
return u.replace(/^.*QQ\/([\d.]+).*$/, '$1')
|
|
182
|
-
},
|
|
183
|
-
Baidu: function () {
|
|
184
|
-
return u.replace(/^.*BIDUBrowser[\s/]([\d.]+).*$/, '$1')
|
|
185
|
-
},
|
|
186
|
-
UC: function () {
|
|
187
|
-
return u.replace(/^.*UC?Browser\/([\d.]+).*$/, '$1')
|
|
188
|
-
},
|
|
189
|
-
Sogou: function () {
|
|
190
|
-
return u.replace(/^.*SE ([\d.X]+).*$/, '$1').replace(/^.*SogouMobileBrowser\/([\d.]+).*$/, '$1')
|
|
191
|
-
},
|
|
192
|
-
'2345Explorer': function () {
|
|
193
|
-
return u.replace(/^.*2345Explorer\/([\d.]+).*$/, '$1')
|
|
194
|
-
},
|
|
195
|
-
TheWorld: function () {
|
|
196
|
-
return u.replace(/^.*TheWorld ([\d.]+).*$/, '$1')
|
|
197
|
-
},
|
|
198
|
-
XiaoMi: function () {
|
|
199
|
-
return u.replace(/^.*MiuiBrowser\/([\d.]+).*$/, '$1')
|
|
200
|
-
},
|
|
201
|
-
Quark: function () {
|
|
202
|
-
return u.replace(/^.*Quark\/([\d.]+).*$/, '$1')
|
|
203
|
-
},
|
|
204
|
-
Qiyu: function () {
|
|
205
|
-
return u.replace(/^.*Qiyu\/([\d.]+).*$/, '$1')
|
|
206
|
-
},
|
|
207
|
-
Wechat: function () {
|
|
208
|
-
return u.replace(/^.*MicroMessenger\/([\d.]+).*$/, '$1')
|
|
209
|
-
},
|
|
210
|
-
Taobao: function () {
|
|
211
|
-
return u.replace(/^.*AliApp\(TB\/([\d.]+).*$/, '$1')
|
|
212
|
-
},
|
|
213
|
-
Alipay: function () {
|
|
214
|
-
return u.replace(/^.*AliApp\(AP\/([\d.]+).*$/, '$1')
|
|
215
|
-
},
|
|
216
|
-
Weibo: function () {
|
|
217
|
-
return u.replace(/^.*weibo__([\d.]+).*$/, '$1')
|
|
218
|
-
},
|
|
219
|
-
Douban: function () {
|
|
220
|
-
return u.replace(/^.*com.douban.frodo\/([\d.]+).*$/, '$1')
|
|
221
|
-
},
|
|
222
|
-
Suning: function () {
|
|
223
|
-
return u.replace(/^.*SNEBUY-APP([\d.]+).*$/, '$1')
|
|
224
|
-
},
|
|
225
|
-
iQiYi: function () {
|
|
226
|
-
return u.replace(/^.*IqiyiVersion\/([\d.]+).*$/, '$1')
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
_this.version = ''
|
|
230
|
-
if (version[_this.browser]) {
|
|
231
|
-
_this.version = version[_this.browser]()
|
|
232
|
-
if (_this.version === u) {
|
|
233
|
-
_this.version = ''
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
// 简化版本号
|
|
238
|
-
/* if (_this.osVersion.indexOf('.')) {
|
|
239
|
-
_this.osVersion = _this.osVersion.substring(0, _this.osVersion.indexOf('.'))
|
|
240
|
-
} */
|
|
241
|
-
if (_this.version.indexOf('.')) {
|
|
242
|
-
_this.version = _this.version.substring(0, _this.version.indexOf('.'))
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
// 修正
|
|
246
|
-
if (_this.browser === 'Edge') {
|
|
247
|
-
_this.engine = 'EdgeHTML'
|
|
248
|
-
} else if (_this.browser === 'Chrome' && parseInt(_this.version) > 27) {
|
|
249
|
-
_this.engine = 'Blink'
|
|
250
|
-
} else if (_this.browser === 'Opera' && parseInt(_this.version) > 12) {
|
|
251
|
-
_this.engine = 'Blink'
|
|
252
|
-
} else if (_this.browser === 'Yandex') {
|
|
253
|
-
_this.engine = 'Blink'
|
|
254
|
-
} else if (_this.browser === undefined) {
|
|
255
|
-
_this.browser = 'Unknow App'
|
|
256
|
-
}
|
|
257
|
-
};
|
|
258
|
-
|
|
259
|
-
function detectFactory (u) {
|
|
260
|
-
return new Detect(u)
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
export default detectFactory
|