Skip to content

Instantly share code, notes, and snippets.

@miyagawa
Created March 6, 2009 23:37
Show Gist options
  • Save miyagawa/75134 to your computer and use it in GitHub Desktop.
Save miyagawa/75134 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Use ASCII-only filenames in TypePad
// @namespace typepad
// @description You need to go to Compose, click "Display Options" and enable "Filename" to use this script.
// @creator Tatsuhiko Miyagawa
// @include http://www.typepad.com/site/blogs/*/post/compose
// ==/UserScript==
window.addEventListener("load", function(e){
YAHOO.util.Event.removeListener("name","keyup");
YAHOO.util.Event.on("name", "keyup", function(e){
this.form.filename.value = TC.Tools.dirify(this.value,{ ascii: 1 }).substr(0,100);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment