Skip to content

Commit 44c0093

Browse files
committed
3.2.2
1 parent 45f74df commit 44c0093

File tree

6 files changed

+19
-13
lines changed

6 files changed

+19
-13
lines changed

dist/logdown.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ module.exports = function isColorSupported () {
458458
// Is webkit? http://stackoverflow.com/a/16459606/376773
459459
module.exports = function isWebkit () {
460460
try {
461-
return ('WebkitAppearance' in document.documentElement.style)
461+
return ('WebkitAppearance' in document.documentElement.style) && !/Edge/.test(navigator.userAgent)
462462
} catch (error) {
463463
return false
464464
}
@@ -471,7 +471,7 @@ module.exports = function isWebkit () {
471471

472472
module.exports = function isFirefox () {
473473
try {
474-
return navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)
474+
return /firefox\/(\d+)/i.test(navigator.userAgent)
475475
} catch (error) {
476476
return false
477477
}
@@ -485,17 +485,20 @@ module.exports = function isFirefox () {
485485
/* WEBPACK VAR INJECTION */(function(global) {/* eslint-disable no-new-func */
486486
/* global self, global */
487487

488-
module.exports = function getGlobal () {
488+
function getGlobal (slf, glb) {
489489
// Return the global object based on the environment presently in.
490490
// window for browser and global for node.
491491
// Ref from -> https://github.com/purposeindustries/window-or-global/blob/master/lib/index.js
492492
return (
493-
(typeof self === 'object' && self.self === self && self) ||
494-
(typeof global === 'object' && global.global === global && global) ||
493+
(typeof slf === 'object' && slf.self === slf && slf) ||
494+
(typeof glb === 'object' && glb.global === glb && glb) ||
495495
this
496496
)
497497
}
498498

499+
module.exports = getGlobal.bind(this, self, global)
500+
module.exports.getGlobal = getGlobal
501+
499502
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(10)))
500503

501504
/***/ }),

dist/logdown.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/logdown.min.js.gzip

18 Bytes
Binary file not shown.

example/lib/logdown.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ module.exports = function isColorSupported () {
458458
// Is webkit? http://stackoverflow.com/a/16459606/376773
459459
module.exports = function isWebkit () {
460460
try {
461-
return ('WebkitAppearance' in document.documentElement.style)
461+
return ('WebkitAppearance' in document.documentElement.style) && !/Edge/.test(navigator.userAgent)
462462
} catch (error) {
463463
return false
464464
}
@@ -471,7 +471,7 @@ module.exports = function isWebkit () {
471471

472472
module.exports = function isFirefox () {
473473
try {
474-
return navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)
474+
return /firefox\/(\d+)/i.test(navigator.userAgent)
475475
} catch (error) {
476476
return false
477477
}
@@ -485,17 +485,20 @@ module.exports = function isFirefox () {
485485
/* WEBPACK VAR INJECTION */(function(global) {/* eslint-disable no-new-func */
486486
/* global self, global */
487487

488-
module.exports = function getGlobal () {
488+
function getGlobal (slf, glb) {
489489
// Return the global object based on the environment presently in.
490490
// window for browser and global for node.
491491
// Ref from -> https://github.com/purposeindustries/window-or-global/blob/master/lib/index.js
492492
return (
493-
(typeof self === 'object' && self.self === self && self) ||
494-
(typeof global === 'object' && global.global === global && global) ||
493+
(typeof slf === 'object' && slf.self === slf && slf) ||
494+
(typeof glb === 'object' && glb.global === glb && glb) ||
495495
this
496496
)
497497
}
498498

499+
module.exports = getGlobal.bind(this, self, global)
500+
module.exports.getGlobal = getGlobal
501+
499502
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(10)))
500503

501504
/***/ }),

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "logdown",
3-
"version": "3.2.1",
3+
"version": "3.2.2",
44
"description": "Debug utility with markdown support that runs on browser and server",
55
"main": "src/node.js",
66
"browser": "dist/logdown.min.js",

0 commit comments

Comments
 (0)