a javascript to adjust fonts and valid contents