The source of it would be highly appreciated!
![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
I'm pretty sure this is what you are asking for:
http://rgbkey.github.io/verify/PrimeDice
It's a little buggy, where it says "if (index + 5 == 128 + 1) {" but that shouldn't matter in the lifetime of this universe.
View the source of that page - it runs in your browser, and so must be "plain javascript".
@dooglus that code is no where near working. I tried a few different rolls, and they were all computed wrong.
That means either every roll on PD is not provably fair (unlikely) or the JS is wrong (much more likely).