Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

current version doesn't work in Chrome? #1

Closed
Luckz opened this issue Dec 10, 2016 · 4 comments
Closed

current version doesn't work in Chrome? #1

Luckz opened this issue Dec 10, 2016 · 4 comments

Comments

@Luckz
Copy link

Luckz commented Dec 10, 2016

I've been using this for a while in Firefox, and while the old version updated to the current works in my Firefox, in my friend's Chrome and my own Chrome a fresh install of the newest version doesn't work.

@Luckz
Copy link
Author

Luckz commented Dec 10, 2016

@Gargauth
Copy link

Same issue here. It seems it's because of this line

var user_currency = window.GetCurrencySymbol(window.GetCurrencyCode(market.walletInfo.wallet_currency));

output in Chrome console:

ERROR: Execution of script 'Steam Economy Enhancer' failed! window.GetCurrencyCode is not a function

@Gargauth
Copy link

Gargauth commented Dec 20, 2016

Okay, I did a quick research and it seems problem is caused by this: http://stackoverflow.com/a/5006952

Possible workarounds:

// @grant       unsafeWindow
[..]
var user_currency = unsafeWindow.GetCurrencySymbol(unsafeWindow.GetCurrencyCode(market.walletInfo.wallet_currency));

or

// @require     http://steamcommunity.com/public/javascript/global.js
[..]
var user_currency = GetCurrencySymbol(GetCurrencyCode(market.walletInfo.wallet_currency));

I don't know much about javascript/Greasemonkey to know all implications of these changes. The second approach seems to be cleaner as usage of unsafeWindow() is adviced against whenever possible both for security sake as well as it may incur compatibility issues between browsers.

@Nuklon
Copy link
Owner

Nuklon commented Dec 21, 2016

Thanks for the research, I have it fixed, will upload a new build soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants