blob: 9207a698c142ac51376ff881fe2b7f8d34599ec3 [file] [log] [blame]
<!DOCTYPE html>
<html>
<!--
Copyright 2011 Google Inc. All Rights Reserved.
Use of this source code is governed by an Apache 2.0 License.
See the COPYING file for details.
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>BidiChecker Bookmarklet Start Page</title>
<link href="install_bookmarklet.css" rel="stylesheet" type="text/css">
</head>
<body>
<h1>BidiChecker Bookmarklet Installation Page</h1>
<p>A "BidiChecker Bookmarklet" is a button you can add to your web browser
that will run
<a href="https://sites.google.com/a/google.com/bidichecker/home">BidiChecker</a>
on any web page, displaying any bidi errors in an interactive window. We'd
like to thank <a href="http://chris.improbable.org/">developer/blogger
Chris Adams</a> for
<a href="http://chris.improbable.org/2010/11/4/google-bidichecker-bookmarklet/">
demonstrating the concept</a>. His original source code can be found
<a href="https://gist.github.com/662454">here on GitHub</a>.</p>
<p>Below, we offer two bookmarklet links which differ a bit from Chris's
implementation. But the basic concept is the same: By dragging a
bookmarklet link to your browser's Bookmarks toolbar, you create a button
you can click to run BidiChecker on the current page for ad hoc
spot-checking. (In Google Chrome, first press Ctrl-Shift-B to show the
Bookmarks toolbar; other browsers have similar options.)</p>
<p>BidiChecker does not currently support this use case very well. If no
errors are found, pressing the button will have no visible effect. Also,
pressing the button twice in succession will not work correctly. We're
aware of these issues and are currently working on a more sophisticated
bookmarklet implementation.</p>
<ul>
<li>This bookmarklet assumes that the page being checked has an overall
directionality of left-to-right (for example, an English UI):
<a href='javascript:(function(){var id="_bidichecker_bmlet";function run(){bidichecker.runGui(bidichecker.checkPage(false));}if(document.getElementById(id)){if(window.bidichecker){run();}}else{var elem=document.createElement("script");elem.src="http://bidichecker.googlecode.com/svn/trunk/lib/bidichecker_packaged.js";elem.onload=run;elem.id=id;document.getElementsByTagName("head")[0].appendChild(elem);}})()'><br>
<span style="border-style:solid; border-width:thin;">BidiChecker LTR
</a>
</li>
<li>And this bookmarklet assumes that the page being checked has an
overall directionality of right-to-left (for example, a Hebrew or
Arabic UI):
<a href='javascript:(function(){var id="_bidichecker_bmlet";function run(){bidichecker.runGui(bidichecker.checkPage(true));}if(document.getElementById(id)){if(window.bidichecker){run();}}else{var elem=document.createElement("script");elem.src="http://bidichecker.googlecode.com/svn/trunk/lib/bidichecker_packaged.js";elem.onload=run;elem.id=id;document.getElementsByTagName("head")[0].appendChild(elem);}})()'><br>
<span style="border-style:solid; border-width:thin;">BidiChecker RTL
</a>
</li>
</ul>
<p>To run BidiChecker, just navigate your browser to the page you want to
test, interact with the page to get it into the state you want to test,
and click on one of the BidiChecker bookmarklets in your browser's
bookmarks toolbar. If bidi errors are found, an in-page dialog box will
appear, allowing you to browse through the errors, which should be
highlighted within the page.</p>
<h2>Known limitations</h2>
<ul>
<li>The bookmarklet does not work on all versions of Internet
Explorer.</li>
<li>If no errors are found, no visible changes will take place. It will
look as if BidiChecker has not even run.</li>
<li>If you launch the bookmarklet twice without reloading the page, it
may not function correctly.</li>
</ul>
</body>
</html>