Reftagger wherever you go

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:
- The Reftagger script is inserted just before the </body> tag.
- 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.
- 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
-
That's really cool. Would you mind publishing the code for it, and/or add other variables that are in v2? For instance, it would be nice to be able to change more variables such as using Faithlife instead of Biblia.
Thanks,
Andre
0 -
Andre Robitaille said:
That's really cool. Would you mind publishing the code for it, and/or add other variables that are in v2? For instance, it would be nice to be able to change more variables such as using Faithlife instead of Biblia.
I've added in a Faithlife option:
javascript:location.href='http://jpitts.info/reftagger/?version=LEB&reader=fsb&url='+escape(location.href);
Apart from that one, I took the approach of switching all the options on. So you have all of the social media links, even if (like me) you won't be using them. I don't intend to make styles customizable.
0 -
That really did the trick - thank you Jonathan. I hope someday you'll decide to release the code before you ever take down the web server. [:)]
Thanks again,
Andre
0 -
This is awesome.
What I also noticed on sites that are using reftagger already, that your script forces MY preferred Bible version to be used. That is double awesome,
THANKS!
[Y]
0 -
Jonathan Pitts said:
I wrote this primarily as a mental exercise for myself, but I hope it might be helpful to others.
Thanks a lot, a great help!
Have joy in the Lord!
0