2010-11-05

jQueryをロードするbookmarklet

ときどき、どうしても$("textarea").resizable();したくなったりするときがあるわけで、ブックマークにこんなのを転がしておいて久しい。
javascript:(function(w,d){var%20h=d.getElementsByTagName("head").item(0);var%20appendScript=function(d,h,u){var%20s=d.createElement("script");s.charset="UTF-8";s.src=u;s.type="text/javascript";h.appendChild(s)};var%20c=w.$;if(!w.jQuery){appendScript(d,h,"https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js")}if(c){jQuery.noConflict()}if(!w.jQuery.ui){appendScript(d,h,"https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/jquery-ui.min.js")}})(window,document)

0 件のコメント: