If it’s a very simple game the above technique(s) might work, but generally no.
I used to work for Miniclip and all of our more sophisticated games were set up such that they wouldn’t work except on our site – that was more to stop people ‘hosting’ our games on their own sites and creaming off the ad revenue themselves than to stop people playing offline… but in general the company that made owns* the game wants you to play it on their site in order to make money off you one way or the other.
*Miniclip used to make a lot of its own games, and it was fun… then the strategy shifted more towards buying them in and rebranding them (e.g. the massively popular agar.io which was ‘talent-spotted’ and bought)