Loading
Showing posts with label Javascript. Show all posts
Showing posts with label Javascript. Show all posts

Burglish Update v1.9.2

updates for unicode 5.1 direct input layout (typewriter input)

In Unicode 5.1, သေဝထိုး and ရရစ္ need to store after consonent(က-အ), like this က, ေက

But from user side, most people want to type ဩေဝထိုး first.

so, i reorder the input sequence after you type in burglish test area.

http://burglish.googlepages.com/testarea.htm
or
http://burglish.my-mm.org/latest/trunk/web/testarea.htm

when you type ေက, it will automatically fix က, and ေျက to က , if you have proper unicode 5.1 font(Myanmar3,Padauk,Parabaik) and render engine (eg. latest uniscribe), you will not see like this ျက , you will instead see, ျက

for ေျမာင္, you need to type ေမ ာ ျင ္. it will properly convert to unicode 5.1 compatible one မ ာ ေျင ္.

and few others update.

Zawgyi's some useful shortcuts like,

Shift Q -်ွ
Shift W -်ြွ
Shift E - ်ြ
Shift K -ွု

can also type in Unicode 5.1 (Myanmar3) through Burglish Test Engine

Cheers,
Soe Min

Opera raise js Error for UTF8 Without BOM (signature)

I found this today, Opera cant load UTF8 .js files without BOM, raising js error on the error log.

Firefox, IE, no problem at all for that.

so, Just attach following character at first

\ufeff

#http://en.my-mm.org/lookup.htm?zawgyi works for opera now, need to clear cache though

Cheers,
Soe Min

Get a English Word under mouse cursor with Javascript

Get a English Word under mouse cursor with Javascript

event.target.innerHTML.substring(event.target.innerHTML.lastIndexOf(" ",event.rangeOffset),event.target.innerHTML.indexOf(" ",event.rangeOffset));

+

Mouse Cursor in Pixel by event.clientX and event.clientY.

can make popup english to burmese dictionary when you point to english words.

just an idea.

:-)

Javascript Shell

Most decent script engine has a shell like Python / Ruby to test it.

There is one for Javascript also. Its nice.

http://www.squarefree.com/shell/shell.html

Building Javascript Shell with V8 (Chrome's Engine)

First of all, checkout from google svn.

svn checkout http://v8.googlecode.com/svn/trunk/ v8

then just build with scons (make sure you already have installed scons)
jeos@jeos:~/v8$ scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
...........

You will get libv8.a

Then build js shell from sample

jeos@jeos:~/v8$ scons sample=shell
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...

You will get a file named shell

jeos@jeos:~/v8$ ./shell
V8 version 0.3.4.1
>

Run some js test
>   for(var i=0; i<5;i++) print(i);
0
1
2
3
4
regex test
> /^[a-z]*$/.test("abcd")   
true
>

Wow, Pretty easy huh?

GreaseMonkey on Google Chrome

သင့္ကိုယ္ပိုင္ Javascript ေတြကို Page ေတြအထဲမွာ ထည့္ခ်င္ျပီ ဆိုရင္ Browser ကေန Injector တစ္ခုခုကိုသံုးရပါတယ္။

Firefox မွာဆိုရင္ေတာ့ GreaseMonkey ဆိုတာ နာမည္အျကီးဆံုးေပါ့။

အခု Goolge Chrome မွာပါ Run လို့ရေအာင္ လုပ္ထားတာရွိေနပါျပီ။

ဂ်ပန္ကပဲ တစ္ေယာက္ေယာက္လုပ္ထားတာလို့ယူဆပါတယ္။

GreaseMonkey on Google Chrome

GreaseMetal လို့ေခါ္တယ္ထင္ပါတယ္။

အင္စေတာျပီးရင္ userscripts.org ကေနျဖစ္ျဖစ္ကိုယ္ပိုင္ scripts ေတြကို My Documents\userjs ဆိုတဲ့ Folder ထဲကိုထည့္ေပးရပါတယ္။

အလုပ္ေကာင္းေကာင္းလုပ္ပါတယ္။ GUI မွာေတာ့ Firefox မွာလို ေမ်ာက္ရုပ္ကေလး လာျပမွာ မဟုတ္ပါေသးဘူး။

မာ့ခ္

ECMAScript 3.1

JavaScript ရဲ့အေျခခံျဖစ္တဲ့ ECMAScript ၃.၁ ေပါ္ေပါက္လာေတာ့မယ္လို့ေျပာပါတယ္။

ဒါကိုအေျခခံျပီးအဓိကေျပာင္းလဲလာမွာကေတာ့ အင္ဂ်င္ေရးတဲ့ ကုမဿပဏီျကီးမ်ား အားလံုးက အဲဒီ စံကို လိုက္နာျကမယ္လို့ ဆိုပါတယ္။
* Mozilla (Firefox)
* Apple (Safari)
* Microsoft (Internet Explorer)
* Opera (Opera)
* Adobe (Flash)
* Yahoo (Yahoo Widget)
* Google

ဒါဆို က်ေနာ္တို့ ဂ်ာဗားစကရစ္ကို ေရးတဲ့အခါ ထဲ့စဉ္းစားရမယ့္ဟာေတြ ေလ်ွာ့သြားတယ္လို့ေျပာလို့ရပါတယ္။
ဥပမာ တူမတူ ျကည့္ခ်င္ရင္ ဒီကုတ္ေလးကိုစမ္းျကည့္ပါ။
"a,b,c,d".split(/(,)/).length

Mozilla Firefox က ရလို့ေျပာေနတဲ့အခ်ိန္မွာ IE က ၄လို့ေျပာေနပါလိမ့္မယ္။ အဲဒါေတြ အဆင္ေျပ သြားလိမ့္မယ္လို့ ေမ်ွာ္လင့္ရပါတယ္။

ဒီေနရာမွ ဘာသာျပန္ဆိုသည္။ http://d.hatena.ne.jp/amachang/20080821/1219302804

ECMA ရဲ့ Draft http://wiki.ecmascript.org/doku.php?id=es3.1:es3.1_proposal_working_draft

Firefox -> Grease Monkey Scripts

I am creating some Firefox -> Grease Monkey Scripts.
http://userscripts.org/users/32185;scripts

1. Blogger template customization for 3 columns or wide templates.
http://userscripts.org/scripts/show/12534



2. Font Converter
http://userscripts.org/scripts/show/12332



က်ေနာ္ဖတ္ေသာ အျခား ဘေလာ့ / ဆိုဒ္မ်ား