Update script.js

Pagename with multibyte chars ingnored.

unnecessary urlencode was removed.