Discussions » Creation Requests

[SOLVED] Need someone to rewrite a currency conversion script

§
Posted: 23.10.2016
Edited: 23.10.2016

[SOLVED] Need someone to rewrite a currency conversion script

I have this old currency conversion script that stopped working, probably because of changes to greasemonkey or the currency conversion service. It is the best currency conversion script I've ever used, and I've not been able to find a suitable replacement. The script can be found here. If you know of a working version of this script or a suitable alternative, do let me know. Otherwise I'm hoping someone can rewrite the script with the same functionality, using a different conversion service if necessary. Thanks for any help.

woxxomMod
§
Posted: 23.10.2016

Every function with GM_ prefix should be listed in the metablock:

// @grant          GM_openInTab
// @grant          GM_xmlhttpRequest
// @grant          GM_setValue
// @grant          GM_getValue
// @grant          GM_addStyle
// @grant          GM_registerMenuCommand

Insert that before // ==/UserScript==.

§
Posted: 23.10.2016

That partly fixed it - now the tooltip appears but it just shows "retrieving" where the converted values are supposed to be. Is it working for you?

§
Posted: 23.10.2016

The currency conversion service used (Yahoo finances) is still working. But actually works in a different sense that expected by this old script. The answer of Yahoo finances is always like "CCY",0.7609, where "CCY" means "currency", and 0.7609 is the rate value in this example. The script use the CCY as the returned currency symbol. Wrong. We need to use USD, AUD, EUR, or wharever currency is displayed in the site.

You must delete or comment the line var foreign_currency = response[0].substring(1,4); in the getexchangerate function.

Also I recomend you to add other line in the header:

// @connect        download.finance.yahoo.com

As said wOxxom, Insert before // ==/UserScript==.

§
Posted: 23.10.2016
Edited: 23.10.2016

Success! That did it, thanks @wOxxOm and @leoncastro :smiley:

Post reply

Sign in to post a reply.