E.g. in Chrome you can:
- open the dev tools (e.g. menu -> more tools -> developer tools)
- go to "sources" tab -> right-bar -> index.html
- download index.html file and grid.js file
---
that being said I just did a sloppy implementation of: http://www.roguebasin.com/index.php?title=Dungeon-Building_Algorithm - I'll believe you'll have more luck just reading that - there is even C# example implementation there you can use.
Good luck!