The Diet enacted a revised law Tuesday to tackle online stalking in response to an increase in harassment cases involving social media.