@include http://twitter.com/* なので、httpsからはじまる場合は実行されないので、 if ( !url.match(/^https:/) ) { は不要だと思います。 window.onclickにgo_to_https()の実行結果を代入するのも必要ありません。 下のようにすれば十分だと思います。 // ==UserScript== // @name twitter_ssl // @namespace http://yoppa.blog.shinobi.jp/ // @description twitter's protocol changer // @include http://twitter.com/* // ==/UserScript== location.href = location.href.replace( "http", "https"