(Site Identification)

'Eye' Focus: Web Support Tutorials

JavaScript: View Bookmarklet Source for FontChanger

Remote Bookmarklet Script Call

The bookmarklets we use on our site is actually a two part JavaScript. The JavaScript for the first part is actually a script that calls a remote file. This helps to keep the actual bookmark on your computer at a limited size, while it allows the actual script to be of any necessary size.

Another benefit for loading a remote file is that the bookmarklet can easily be maintained and updated, regardless of when it was bookmarked. The technique allows me to improve my bookmarklets and always have the current version when I use my bookmarks from any browser.

The drawback in using this technique is that Opera browsers do not support the remote file JavaScript loader. This means the script must be written all on one line, must be a limited maximum length, and will not be automatically updated when the script on the server is updated. We hope that Opera will soon support remote file loading with their JavaScripts.

The remote file loader for: FontChanger.js (skip code)

javascript:(function(){var s=document.createElement('script');s.setAttribute('src','http://www.melvinwallerjr.com/tutorial/scripts/bookmarklet/files/FontChanger.js');s.setAttribute('type','text/javascript');document.getElementsByTagName('head')[0].appendChild(s);})();

Please keep in mind that the above Javascript call MUST be remain as one continuous line, and not contain any carriage returns. If you do not do this the bookmarklet will break and not be functional.

(to Top) The Remote Bookmarklet

Below is the source file that is loaded for this Bookmarklet. This file only exists within this web site and called by the above remote file loader. (skip code)

//  Title: Font Changer
// Origin: MyIE2 Web site
// Author: Tara
// Tweaks: www.melvinwallerjr.com (JoeFlash)
(function() {
  window.onerror = null;
  var wdb = window.document.body.createTextRange();
  if (wdb != null) {

For more information on browser bookmarklets, please have a look at our Bookmarklets Tutorial.

[Updated: Sunday, November 18, 2007]