From 49cba8cced58e4c1cc7c45ff9f4f50a0dbf3681c Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 23 Mar 2017 02:25:36 +0300 Subject: [PATCH] apply.js: don't alter DOM stylesheet state if same --- apply.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apply.js b/apply.js index 3d95fc4e..9456dc36 100644 --- a/apply.js +++ b/apply.js @@ -84,7 +84,8 @@ function disableAll(disable) { function disableSheets(disable, doc) { 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; } });