Reftagger wherever you go

Jonathan Pitts
Jonathan Pitts Member Posts: 670 ✭✭
edited November 2024 in English Forum

I've written a web page that inserts the Reftagger script into the HTML of another page. In theory, this should allow you to have the Reftagger pop-ups on any page you are browsing. In practice, it's effective on most (but not all) sites.

To use it, you need to create a bookmark in your browser that links to:

javascript:location.href='http://jpitts.info/reftagger/?version=LEB&url='+escape(location.href);

To create this, create a bookmark to any old page. Then edit that bookmark, calling it "Reftagger" and replacing the URL with the code in bold above. You can replace "LEB" with another Bible version.

The Javascript code simply directs your browser to my Reftagger page and passes to that page the URL of the page you were already browsing.

So, open a page with Bible references on, then select the Reftagger bookmark from your bookmark menu or bookmark bar.

The page you are redirected to gets the HTML of the page you were browsing and outputs it with three changes:

  1. The Reftagger script is inserted just before the </body> tag.
  2. The base for hyperlinks is set to the page you were browsing. So, links should still work, but the linked page will not have Reftagger until you click on the bookmark again.
  3. Unicode characters are converted to their numerical codes, so that they display properly. This doesn't work perfectly, but it is better than not doing it.

The coding is very similar to the approach I took to the Logos forum RSS feeds here.

_____

I wrote this primarily as a mental exercise for myself, but I hope it might be helpful to others. It is provided in that spirit, with no guarantee that it will work for you or on any particular web page.

I've tested it on the latest versions of Chrome and Internet Explorer on Windows 7, and Safari on iOS.

Enjoy!

Comments