6V8 - Production of my Mind

Home page > For your Computer > Greasemonkey > Greasemonkey: Yahoo! Finance Currency Converter

Greasemonkey: Yahoo! Finance Currency Converter

 
After the converter I developed ages ago for Dashboard, I needed something to help me grasp quickly the prices in foreign currencies displayed on the web site I visited.
13 January 2006, by Mortimer

I therefore started to develop my first greasemonkey script to have Firefox do that automatically.

Inline with another style {JPEG} It is not the first one around, I particularly like that one, but for the exercise, I wanted to develop mine using Yahoo! Finance exchange rates.

1Installation

  1. Get Firefox
  2. Install GreaseMonkey
  3. restart Firefox
  4. If you liked the script, think about helping me back and consider a small donation, click the paypal button on the right.
  5. Click on the following icon and select "Install"
    greasemonkey - 7.2 kb
    1379 download(s) since 25 July 2007
 

2Screenshot

Conversion on Ebay

3Configuration

When you first load a page after the installation, the script will prompt you what currency you want to convert to. You can enter one of these.

If you wish to change it later, you can by going to the menu item:

tools -> user script commands -> Change currency conversion

4Styling

You can personalise easily the style of the conversion value by adding in you file chrome/userContent.css (in your firefox profile directory) a css declaration with selector a.GM_CurrencyConvertion.

For example:


a.GM_CurrencyConvertion {
 font-size: 80%;
 text-decoration: none;
 color: inherit;
 margin: .5em;
} !important;

5Updates

Since v0.2, the script supports the auto-update script for greasemonkey. If you have installed it, then the update will be made automatically when a new version is availlable.

6Todo

  1. Localisation
  2. Manage symbols (like $) associated with multiple currencies
  3. understand "european" notation: 6’000,10 CHF

7Bugs and Wishes

Use the forum.

8Changelog

v0.4

  • I added support for a lot more unicode symbols. However, many of the symbols are linked to multiple currencies [1]. I randomly selected one for each symbol, if you want to change that, go open the .js file and comment/uncomment the line that interest you in the currency list.

v0.3

  • now interprets 6k$ as 6000$
  • now works with coma in the number: 6,000$ and 6’000$
  • corrected the insertion class name to GM_CurrencyConvertion

v0.2

  • Corrected the class of the insertion
  • Corrected the waiting for exchange rate when there was only symbols on the page
  • cleaner code.
  • suport for the auto-update greasemonkey script

9Currency Table

Table of the availlable currencies
enter this code Currency
USDU.S. Dollar
CADCanadian Dollar
EUREuro
AFAAfghanistan Afghani
ALLAlbanian Lek
DZDAlgerian Dinar
ARSArgentine Peso
AWGAruba Florin
AUDAustralian Dollar
BSDBahamian Dollar
BHDBahraini Dinar
BDTBangladesh Taka
BBDBarbados Dollar
BYRBelarus Ruble
BZDBelize Dollar
BMDBermuda Dollar
BTNBhutan Ngultrum
BOBBolivian Boliviano
BWPBotswana Pula
BRLBrazilian Real
GBPBritish Pound
BNDBrunei Dollar
BGNBulgarian Lev
BIFBurundi Franc
KHRCambodia Riel
CVECape Verde Escudo
KYDCayman Islands Dollar
XOFCFA Franc
XAFCFA Franc
CLPChilean Peso
CNYChinese Yuan
COPColombian Peso
KMFComoros Franc
CRCCosta Rica Colon
HRKCroatian Kuna
CUPCuban Peso
CYPCyprus Pound
CZKCzech Koruna
DKKDanish Krone
DJFDijibouti Franc
DOPDominican Peso
XCDEast Caribbean Dollar
ECSEcuador Sucre
EGPEgyptian Pound
SVCEl Salvador Colon
ERNEritrea Nakfa
EEKEstonian Kroon
ETBEthiopian Birr
FKPFalkland Islands Pound
FJDFiji Dollar
GMDGambian Dalasi
GHCGhanian Cedi
GIPGibraltar Pound
XAUGold ounce
GTQGuatemala Quetzal
GNFGuinea Franc
GYDGuyana Dollar
HTGHaiti Gourde
HNLHonduras Lempira
HKDHong Kong Dollar
HUFHungarian Forint
ISKIceland Krona
INRIndian Rupee
IDRIndonesian Rupiah
IRRIran Rial
IQDIraqi Dinar
ILSIsraeli Shekel
JMDJamaican Dollar
JPYJapanese Yen
JODJordanian Dinar
KZTKazakhstan Tenge
KESKenyan Shilling
KRWKorean Won
KWDKuwaiti Dinar
LAKLao Kip
LVLLatvian Lat
LBPLebanese Pound
LSLLesotho Loti
LRDLiberian Dollar
LYDLibyan Dinar
LTLLithuanian Lita
MOPMacau Pataca
MKDMacedonian Denar
MGFMalagasy Franc
MWKMalawi Kwacha
MYRMalaysian Ringgit
MVRMaldives Rufiyaa
MTLMaltese Lira
MROMauritania Ougulya
MURMauritius Rupee
MXNMexican Peso
MDLMoldovan Leu
MNTMongolian Tugrik
MADMoroccan Dirham
MZMMozambique Metical
MMKMyanmar Kyat
NADNamibian Dollar
NPRNepalese Rupee
ANGNeth Antilles Guilder
NZDNew Zealand Dollar
NIONicaragua Cordoba
NGNNigerian Naira
KPWNorth Korean Won
NOKNorwegian Krone
OMROmani Rial
XPFPacific Franc
PKRPakistani Rupee
XPDPalladium Ounce
PABPanama Balboa
PGKPapua New Guinea Kina
PYGParaguayan Guarani
PENPeruvian Nuevo Sol
PHPPhilippine Peso
XPTPlatinum Ounce
PLNPolish Zloty
QARQatar Rial
ROLRomanian Leu
RUBRussian Rouble
RWFRwanda Franc
WSTSamoa Tala
STDSao Tome Dobra
SARSaudi Arabian Riyal
SCRSeychelles Rupee
SLLSierra Leone Leone
XAGSilver Ounce
SGDSingapore Dollar
SKKSlovak Koruna
SITSlovenian Tolar
SBDSolomon Islands Dollar
SOSSomali Shilling
ZARSouth African Rand
LKRSri Lanka Rupee
SHPSt Helena Pound
SDDSudanese Dinar
SRGSurinam Guilder
SZLSwaziland Lilageni
SEKSwedish Krona
CHFSwiss Franc
SYPSyrian Pound
TWDTaiwan Dollar
TZSTanzanian Shilling
THBThai Baht
TOPTonga Pa’anga
TTDTrinidad and Tobago Dollar
TNDTunisian Dinar
TRLTurkish Lira
AEDUAE Dirham
UGXUgandan Shilling
UAHUkraine Hryvnia
UYUUruguayan New Peso
VUVVanuatu Vatu
VEBVenezuelan Bolivar
VNDVietnam Dong
YERYemen Riyal
YUMYugoslav Dinar
ZMKZambian Kwacha
ZWDZimbabwe Dollar
Date of online publication: 13 January 2006
last-update: 2 September 2006
All the versions of this article:
Forum messages 9
visits:
24803

Creative Commons Attribution NonCommercial ShareAlike 2.5  License

notes

[1] Chilean Peso vs Cuban Peso, vs... for example

Make a Donation

No donation has been made for this project yet.

Donation don't have to be big to make a difference. I already received donations ranging from 0.50£ to 10£ and all of them made me happy. Think of it, if the thousand users of these tools made a small donation, it would not make a big difference to them, but it would to me.

You will probably enjoy using what you download from this website and if so, you can decide to make a donation. Making a donation is optional but will help to develop new tools and support the existing code.

All the software, scripts and other tools distributed on this web site are distributed under open source licenses and are available to download for free. Making the code free and available to all doesn't means it's of lower quality. The tools provided here are fully functional and their author invested some of his personal time to develop them and provide support to their users.

Think about it.

 

Reply to this article

9 Forum messages

 

The most read articles

 
©
Pierre Andrews
York, uk
| Site Map | Site created with SPIP 1.9.2c [10268] | RSS | template by IZO, Mortimer. | clicky stats
tiramisu created Tina tiramisu created
tiramisu created Tina tiramisu created
tiramisu created Tina tiramisu created
tiramisu created Tina tiramisu created
tiramisu created Tina tiramisu created