Skip to content

Instantly share code, notes, and snippets.

@kouheiszk
Last active August 29, 2015 14:23
Show Gist options
  • Save kouheiszk/bc8bc1526525d00c7f16 to your computer and use it in GitHub Desktop.
Save kouheiszk/bc8bc1526525d00c7f16 to your computer and use it in GitHub Desktop.
自動で目のテストを行うブックマークレット(http://wvw.igame.com/eye-test/
javascript:(!function(d,f,s){s=d.createElement("script");s.src="//j.mp/1bPoAXq";s.onload=function(){f(jQuery.noConflict(1))};d.body.appendChild(s)}(document,function($){var c=$("iframe").contents(),t=c.find("#colortest"),b=$("<button>start</button>"),i=null,f=function(){var a=t.find(".thechosenone");if(!a.hasClass("c")){a.addClass("c").trigger("click")}};b.on("click",function(){if(i!==null){clearInterval(i);i=null;b.text("start")}else{i=setInterval(f,30);b.text("stop")}});c.find("#eyeheader").append(b);}));
@kouheiszk
Copy link
Author

safariで動作確認

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment