chore: small changes
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
/* See if an element is within eruda.
|
||||
*/
|
||||
|
||||
exports = function(el) {
|
||||
let parentNode = el.parentNode
|
||||
|
||||
if (!parentNode) return false
|
||||
|
||||
while (parentNode) {
|
||||
parentNode = parentNode.parentNode
|
||||
if (parentNode && parentNode.id === 'eruda') return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
@@ -8,7 +8,6 @@ import {
|
||||
keys,
|
||||
MutationObserver,
|
||||
each,
|
||||
isErudaEl,
|
||||
toStr,
|
||||
isEl,
|
||||
isStr,
|
||||
@@ -30,6 +29,7 @@ import {
|
||||
lowerCase,
|
||||
pick
|
||||
} from '../lib/util'
|
||||
import { isErudaEl } from '../lib/extraUtil'
|
||||
import evalCss from '../lib/evalCss'
|
||||
|
||||
export default class Elements extends Tool {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Emitter, isErudaEl, isMobile } from '../lib/util'
|
||||
import { Emitter, isMobile } from '../lib/util'
|
||||
import { isErudaEl } from '../lib/extraUtil'
|
||||
|
||||
export default class Select extends Emitter {
|
||||
constructor() {
|
||||
|
||||
@@ -12,7 +12,6 @@ import {
|
||||
isCrossOrig,
|
||||
ajax,
|
||||
MutationObserver,
|
||||
isErudaEl,
|
||||
toArr,
|
||||
concat,
|
||||
rmCookie,
|
||||
@@ -22,6 +21,7 @@ import {
|
||||
contain,
|
||||
filter
|
||||
} from '../lib/util'
|
||||
import { isErudaEl } from '../lib/extraUtil'
|
||||
import evalCss from '../lib/evalCss'
|
||||
|
||||
export default class Resources extends Tool {
|
||||
|
||||
@@ -8,11 +8,11 @@ import {
|
||||
isStr,
|
||||
startWith,
|
||||
$,
|
||||
isErudaEl,
|
||||
upperFirst,
|
||||
loadJs,
|
||||
trim
|
||||
} from '../lib/util'
|
||||
import { isErudaEl } from '../lib/extraUtil'
|
||||
import evalCss from '../lib/evalCss'
|
||||
|
||||
let style = null
|
||||
|
||||
@@ -4,6 +4,20 @@ import evalCss from './evalCss'
|
||||
export default function(util) {
|
||||
Object.assign(util, {
|
||||
beautify,
|
||||
evalCss
|
||||
evalCss,
|
||||
isErudaEl
|
||||
})
|
||||
}
|
||||
|
||||
export function isErudaEl(el) {
|
||||
let parentNode = el.parentNode
|
||||
|
||||
if (!parentNode) return false
|
||||
|
||||
while (parentNode) {
|
||||
parentNode = parentNode.parentNode
|
||||
if (parentNode && parentNode.id === 'eruda') return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -2329,28 +2329,6 @@ export var isErr = _.isErr = (function (exports) {
|
||||
return exports;
|
||||
})({});
|
||||
|
||||
/* ------------------------------ isErudaEl ------------------------------ */
|
||||
|
||||
export var isErudaEl = _.isErudaEl = (function (exports) {
|
||||
/* See if an element is within eruda.
|
||||
*/
|
||||
|
||||
exports = function(el) {
|
||||
let parentNode = el.parentNode
|
||||
|
||||
if (!parentNode) return false
|
||||
|
||||
while (parentNode) {
|
||||
parentNode = parentNode.parentNode
|
||||
if (parentNode && parentNode.id === 'eruda') return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
return exports;
|
||||
})({});
|
||||
|
||||
/* ------------------------------ isHidden ------------------------------ */
|
||||
|
||||
export var isHidden = _.isHidden = (function (exports) {
|
||||
|
||||
Reference in New Issue
Block a user