The latest builds of Google Chrome / Chromium (the open-source project behind Chrome) now include basic Greasemonkey support and a rudimentary extension framework.
I tried using Mario's Greasemonkey script for changing Koohii's font, but without success. I attempted to debug it for a few minutes -- I found that line 195 was causing a problem and commented it out, but the script still didn't work as intended: it didn't change the font on the review page for me, or add any option to my profile to select a new font... I didn't want to get heavily involved in Mario's code, because it's late for me and I just want to practice kanji!!
So I wrote a very quick-and-dirty script to accomplish the same thing. I've never written any Greasemonkey-esque scripts before, so please correct any mistakes or indelicacies you find... or feel free to run with it, of course, if you want to take it further.
Following are my instructions for anyone else who wants to get this working in Chrom(e/ium):
1) Follow the instructions given here, for enabling user scripts in Chrom(e/ium) (1. Install a recent trunk build of Chromium, or switch to the dev channel; 2. Launch chrome.exe with the --enable-user-scripts flag; 3. Create a directory called "User Scripts" in your user data directory -- probably "C:\Documents and Settings\[your Windows account name]\Local Settings\Application Data\Chromium\User Data\Default\User Scripts").
2) Open a text editor and paste the following:
3) You can edit the name of the font as you please -- I used 'YOzFontNF'. Just type the name of whatever font you'd like to use instead. Save this file in the "User Scripts" directory you created in step 1, making sure the filename ends with the extension "user.js" -- mine's called "koohiiChangeFont.user.js".
4) Enjoy!
Here are links to a few handwriting-style fonts, which I found in this thread:
http://sites.google.com/site/nihilistorguk/
http://yozvox.web.infoseek.co.jp/446F776E6C6F6164.html
http://www.vector.co.jp/download/file/da...35315.html
http://mikachan.sourceforge.jp/win.html
I tried using Mario's Greasemonkey script for changing Koohii's font, but without success. I attempted to debug it for a few minutes -- I found that line 195 was causing a problem and commented it out, but the script still didn't work as intended: it didn't change the font on the review page for me, or add any option to my profile to select a new font... I didn't want to get heavily involved in Mario's code, because it's late for me and I just want to practice kanji!!
So I wrote a very quick-and-dirty script to accomplish the same thing. I've never written any Greasemonkey-esque scripts before, so please correct any mistakes or indelicacies you find... or feel free to run with it, of course, if you want to take it further.
Following are my instructions for anyone else who wants to get this working in Chrom(e/ium):
1) Follow the instructions given here, for enabling user scripts in Chrom(e/ium) (1. Install a recent trunk build of Chromium, or switch to the dev channel; 2. Launch chrome.exe with the --enable-user-scripts flag; 3. Create a directory called "User Scripts" in your user data directory -- probably "C:\Documents and Settings\[your Windows account name]\Local Settings\Application Data\Chromium\User Data\Default\User Scripts").
2) Open a text editor and paste the following:
Code:
if (window.location.href.indexOf("http://kanji.koohii.com/review/review.php") != -1)
{
var kanjiBig = document.getElementById('kanjibig');
kanjiBig.getElementsByTagName('span')[0].setAttribute('style', 'font-family: YOzFontNF;');
}4) Enjoy!
Here are links to a few handwriting-style fonts, which I found in this thread:
http://sites.google.com/site/nihilistorguk/
http://yozvox.web.infoseek.co.jp/446F776E6C6F6164.html
http://www.vector.co.jp/download/file/da...35315.html
http://mikachan.sourceforge.jp/win.html
Edited: 2009-05-29, 3:32 am
