당신은 당신을 위해이 작업을 수행 할 수있는 페이지에서이 자바 스크립트를 넣을 수 있습니다 :
function forItems(a, f) {
for (var i = 0; i < a.length; i++) f(a.item(i))
}
function classExists(className) {
var pattern = new RegExp('\\.' + className + '\\b'), found = false
try {
forItems(document.styleSheets, function(ss) {
// decompose only screen stylesheets
if (!ss.media.length || /\b(all|screen)\b/.test(ss.media.mediaText))
forItems(ss.cssRules, function(r) {
// ignore rules other than style rules
if (r.type == CSSRule.STYLE_RULE && r.selectorText.match(pattern)) {
found = true
throw "found"
}
})
})
} catch(e) {}
return found
}
이것은 (는) 모두 다음과 같습니다. # 33242 http://stackoverflow.com/questions/33242/how-can-i-find-unused-images-and-css-styles-in-a-website –
개봉. 죄송합니다 - 나는 당신이 그 다른 질문의 반대를 묻고 있다는 것을 깨닫지 못했습니다. –
두 질문은 모두 유효한 질문이지만 동일한 문제의 두 측면이므로 조금 다르게 단어를 병합하면 병합 될 수 있습니다. 그냥 생각 :) –