あ、ごめん。これだと日本語検索すると文字化けするわ
javascript:(function(){search_engine = "https://www.google.co.jp/search?q=";;search_word = encodeURIComponent("%s");
if (location.href == "about:blank" ) {window.location.href = search_engine + search_word;} else {window.open(search_engine + search_word);}})()
これで多分直ったかな?
識者の方デバッグ&リファクタリングしてくださるととても助かります