Parse Bible from Watchtower Online Library In JS Console

The following is a function that I wrote to parse the Bible found on the Watchtower Online Library:

Aftering copying and pasting the above code into the JS console while visiting any page within the Watchtower Online Library, you can run the following code to actually parse the entire Bible:

Of course, due to the amount of chapters in the Bible, this process will take a few minutes so DO NOT LEAVE the Watchtower Online Library until an alert appears indicating the parsing has completed. This code is literally using your browser to navigate to each Bible chapter. Once done, an alert will appear on the page. I personally ran this code in Google Chrome. If this code doesn’t work for you, you may have to modify it especially if some time has passed since August 8th, 2017 (the time when I published this code).

PHP – Simple GitHub Login (OAuth)

If your codebase is in PHP and you would like user’s to be able to login to your site using GitHub (single sign-on) you can use the following as a good starting point:

Next you will need to setup an OAuth application within GitHub by doing the following:

  1. Login to
  2. Go to your settings by clicking on your avatar image in the top-right corner of any GitHub page and then clicking on Settings in the drop-down menu.
  3. Scroll down to the Developer settings menu on the left and click OAuth Applications.
  4. Click the Register a new application button.
  5. Enter all of the necessary information to register your new OAuth application and then click Register application when you’re done.
  6. Take the Client ID and the Client Secret and place them in the constants defined in your PHP code from the beginning of this post.

That should be it. Now when you run this code you should be prompted to authorize your application to read your public information and private email addresses. You can remove the scope if you don’t need to be able to read any private information such as email addresses or you can change the scope after reviewing this page. If you want more information about OAuth apps for GitHub you can check out this page.

Happy coding! 😎