michael@0: /* -*- Mode: js; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: var s; michael@0: for (s = 0; s < document.styleSheets.length; s++) { michael@0: var sheet = document.styleSheets[s]; michael@0: dump("Style sheet #" + (s+1) + ": " + sheet.title + "\n"); michael@0: var i, r; michael@0: dump("\n"); michael@0: for (i = 0; i < sheet.imports.length; i++) { michael@0: dump("@import url(" + sheet.imports[i].href + ");\n"); michael@0: } michael@0: dump("\n"); michael@0: for (r = 0; r < sheet.rules.length; r++) { michael@0: var rule = sheet.rules[r]; michael@0: dump(rule.selectorText + " {" + "\n"); michael@0: var style = rule.style; michael@0: var p; michael@0: for (p = 0; p < style.length; p++) { michael@0: dump(" " + style[p] + ":" + style.getPropertyValue(style[p]) + ";\n"); michael@0: } michael@0: dump(" }\n"); michael@0: } michael@0: dump("\n"); michael@0: }