(function(){
  'use strict';
  function ready(fn){
    if(document.readyState==='loading'){
      document.addEventListener('DOMContentLoaded', fn);
    }else{ fn(); }
  }
  ready(function(){
    var selectAll = document.getElementById('wpsn-sc-select-all');
    if(!selectAll){ return; }
    selectAll.addEventListener('change', function(){
      var boxes = document.querySelectorAll('.wpsn-sc-row-check');
      for(var i=0;i<boxes.length;i++){
        boxes[i].checked = !!selectAll.checked;
      }
    });
  });
})();
