(芸人風に)「どうもー!、さっそくショートコード!」
特定の文字列が入っているcheckboxのみオン
http://oshiete.goo.ne.jp/qa/7715742.html
<script type="application/javascript; version=1.8"> function hoge(){ [].forEach.call(arguments,function({text:a,max:b}) this.filter(function([,t])t==a).forEach(function([c],i)c.checked=i<b) ,[].map.call(document.querySelectorAll('*[type=checkbox]'),function(c)[c,c.nextSibling.data.trim()])); } </script>
なんというか、ここ最近の課題として「変数に代入をしない」を頭においた回答をしている。
もう小細工しか通用しないくらい、スリムだと思っている(?)ため、短くできない。残念。
"function" という文字、すでに長く感じる。