|
@@ -215,6 +215,28 @@ function isLogin() { |
|
@@ -215,6 +215,28 @@ function isLogin() { |
215
|
}
|
215
|
}
|
216
|
}
|
216
|
}
|
217
|
|
217
|
|
|
|
218
|
+function isIE() {
|
|
|
219
|
+ return /msie|trident/i.test(navigator.userAgent);
|
|
|
220
|
+}
|
|
|
221
|
+
|
|
|
222
|
+function isIEVer(version) {
|
|
|
223
|
+ var ver = '';
|
|
|
224
|
+
|
|
|
225
|
+ var getVersion = function(regex) {
|
|
|
226
|
+ var ua = navigator.userAgent;
|
|
|
227
|
+ var match = ua && ua.match(regex);
|
|
|
228
|
+
|
|
|
229
|
+ return (match && match.length > 1 && match[1]) || '';
|
|
|
230
|
+ };
|
|
|
231
|
+
|
|
|
232
|
+ if (isIE()) {
|
|
|
233
|
+ ver = getVersion(/(?:msie |rv:)(\d+(\.\d+)?)/i);
|
|
|
234
|
+ return ver === version;
|
|
|
235
|
+ }
|
|
|
236
|
+
|
|
|
237
|
+ return false;
|
|
|
238
|
+}
|
|
|
239
|
+
|
218
|
// 品友
|
240
|
// 品友
|
219
|
function addPyEvent(eventName, val) {
|
241
|
function addPyEvent(eventName, val) {
|
220
|
if (typeof window.py === 'function') {
|
242
|
if (typeof window.py === 'function') {
|
|
@@ -247,6 +269,10 @@ window.registerUrl = registerUrl; |
|
@@ -247,6 +269,10 @@ window.registerUrl = registerUrl; |
247
|
|
269
|
|
248
|
window.jumpUrl = jumpUrl;
|
270
|
window.jumpUrl = jumpUrl;
|
249
|
|
271
|
|
|
|
272
|
+window.isIE = isIE;
|
|
|
273
|
+
|
|
|
274
|
+window.isIE8 = isIEVer('8.0');
|
|
|
275
|
+
|
250
|
window.once = once;
|
276
|
window.once = once;
|
251
|
window.addPyEvent = addPyEvent;
|
277
|
window.addPyEvent = addPyEvent;
|
252
|
|
278
|
|