Clicking on ads themselves wouldn't be legal. Since this doesn't circumvent normal behaviour and actually waits 31 seconds before skipping an ad, it def isn't illegal. There's no trickery involved either. It's just doing what the user would ideally do under normal circumstances but doing it automatically.