Skip to content

Instantly share code, notes, and snippets.

@elnikkis
Created April 13, 2016 05:46
Show Gist options
  • Save elnikkis/6518426566e8facdf8633e64b71190f7 to your computer and use it in GitHub Desktop.
Save elnikkis/6518426566e8facdf8633e64b71190f7 to your computer and use it in GitHub Desktop.
圧縮済み休講ページ用ブックマークレット
javascript:(function(c,b,a){a=c.createElement("script");a.src="//code.jquery.com/jquery-2.1.3.min.js";a.onload=function(){b(jQuery.noConflict(1))};c.body.appendChild(a)})(document,function(c){var h=setTimeout(function(){});for(var d=0;d<h;d++){clearTimeout(d)}var f="#grvCancel";var e="#grvSupplement";var a=function(k,i){c(k+" tr").css("visibility","visible").css("display","table-row");if(i!="ALL"){c(k+" tr:not(:contains('"+i+"'))").css("visibility","collapse").css("display","none");c(k+" tr:first").css("visibility","visible").css("display","table-row")}};line1=c('<tr id="line1">');line2=c('<tr id="line2">');for(var d=0;d<9;d++){line1.append("<td>");line2.append("<td>")}c("#grvCancel tr:first").after(line1);c("#grvSupplement tr:first").after(line2);var j=function(n,p,m,o){var k=c("<select>").attr("name",n).css({width:"100%"});for(var l=0;l<p.length;l++){c("<option>").attr("value",p[l]).text(p[l]).appendTo(k)}c("#line"+o+" td:eq("+m+")").css({margin:"0",padding:"0"}).append(k);k.change(function(){console.log(this.value);a(this.name,this.value)})};var b=["ALL","B1","B2","B3","B4","M1","M2","D1","D2","D3"];var g=["ALL","共通","機械","電気・電子情報","情報・知能","環境・生命","建築・都市"];j("#grvCancel",b,5,1);j("#grvCancel",g,6,1);j("#grvSupplement",b,5,2);j("#grvSupplement",g,6,2)});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment