Skip to content

Instantly share code, notes, and snippets.

@krisbulman
krisbulman / meetings.js
Last active April 11, 2016 18:06 — forked from willaalt/meetings
<script type="text/javascript">
var meeting = {number:"1"};
while (meeting==meeting) {
document.write( '1++');
}
</script>
@krisbulman
krisbulman / countCSSRules.js
Last active August 25, 2022 19:53 — forked from psebborn/countCSSRules.js
Count the number of rules and selectors for CSS files on the page. Flags up the >4096 threshold that confuses IE. — This snippet has been modified to count more than just the first level of CSSStyleRule objects within CSSMediaRule.
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
return;
}
for (var i = 0; i < document.styleSheets.length; i++) {
countSheet(document.styleSheets[i]);
}
function countSheet(sheet) {