apply.js: don't alter DOM stylesheet state if same

This commit is contained in:
tophf 2017-03-23 02:25:36 +03:00
parent d53db2d45c
commit 49cba8cced

View File

@ -84,7 +84,8 @@ function disableAll(disable) {
function disableSheets(disable, doc) { function disableSheets(disable, doc) {
Array.prototype.forEach.call(doc.styleSheets, function(stylesheet) { Array.prototype.forEach.call(doc.styleSheets, function(stylesheet) {
if (stylesheet.ownerNode.classList.contains("stylus")) { if (stylesheet.ownerNode.classList.contains("stylus")
&& stylesheet.disabled != disable) {
stylesheet.disabled = disable; stylesheet.disabled = disable;
} }
}); });