Sure! Here's a simple example of an endless RPG game implemented as a single HTML file with JavaScript:
In this game, you control a player whose goal is to level up by gaining experience points. Clicking on the canvas increases the player's experience, and when the experience reaches 100, the player levels up and a congratulations message is shown. The game will continue indefinitely, allowing the player to level up endlessly.
Note: This is a very basic implementation and can be expanded upon with more features, such as battles, quests, items, etc., based on your requirements and preferences.