Permalink
Browse files

Optimize test hiding, add class on page load if stored in sessionStorage

  • Loading branch information...
1 parent 39a23df commit 3adbe65bb7083d29cfae698c4761d563db532f92 @jzaefferer jzaefferer committed Feb 16, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 qunit/qunit.js
View
@@ -674,7 +674,7 @@ addEvent(window, "load", function() {
filter.type = "checkbox";
filter.id = "qunit-filter-pass";
addEvent( filter, "click", function() {
- var ol = document.getElementById("qunit-tests")
+ var ol = document.getElementById("qunit-tests");
if ( filter.checked ) {
ol.className = ol.className + " hidepass";
} else {
@@ -687,6 +687,8 @@ addEvent(window, "load", function() {
});
if ( defined.sessionStorage && sessionStorage.getItem("qunit-filter-passed-tests") ) {
filter.checked = true;
+ var ol = document.getElementById("qunit-tests");
+ ol.className = ol.className + " hidepass";
}
toolbar.appendChild( filter );

0 comments on commit 3adbe65

Please sign in to comment.