Beta Game

By HHG Last update Sep 19, 2012 — Installed 7,053 times.

don't use eval

in
Subscribe to don't use eval 2 posts, 2 voices



newacct User
FirefoxMacintosh

eval('configs.'+configitem+'=!configs.'+configitem);

should be written as

configs[configitem] = !configs[configitem];

var l = (window.location.href.split('.')[2].split('/')[0]);
eval('l = lang.'+(window.location.href.split('.')[2].split('/')[0]));
if(!l)
lang = lang.org;
else
lang = l;

should be written as

var l = window.location.hostname.split('.').pop();
l = lang[l] || lang.org;

 
HHG Script's Author
FirefoxWindows

thank you.