All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
2 * ie-note.js -- alerts users of IE about lack of standards-compliance
4 * to use, source this script from the HTML file:
6 * <script type="text/javascript" src="js/ie-note.js"></script>
8 * Note that you need an event handler, such as
9 * http://dean.edwards.name/weblog/2005/10/add-event/
10 * or insure otherwise that insertNote() is called *after* the whole page has
11 * been rendered and the DOM initialised.
13 * The notice can be styled with CSS, using the ie-note class name.
15 * SVN url: http://svn.madduck.net/pub/web/martin-krafft.net/js/ie-note.js
17 * Copyright © martin f. krafft <madduck@madduck.net>
18 * Released under the terms of the Artistic Licence 2.0
20 * Revision: $Id: dchangesfilename 295 2006-10-07 11:20:26Z madduck $
25 return navigator.appName.indexOf('Internet Explorer') > 0 ||
26 navigator.appName.indexOf('MSIE') > 0;
31 var query = unescape(location.search);
32 if (isIE() || query.indexOf('ie-note') > 0) {
33 var container = document.createElement("p");
34 container.className = 'ie-note';
36 '<strong>Notice:</strong> you are using Microsoft\'s Internet Explorer, '
37 + 'which does not properly support the <a '
38 + 'href="http://www.w3.org/MarkUp">XHTML</a> and <a '
39 + 'href="http://www.w3.org/Style/CSS">CSS</a> standards used in writing '
40 + 'this page the way it is supposed to look. The information is still '
41 + 'all there, but for a better result, please consider alternative '
42 + 'browsers, such as <a href="http://www.mozilla.org/products/firefox">'
43 + 'Mozilla Firefox</a>.';
44 var body = document.getElementsByTagName("body")[0];
45 body.insertBefore(container, body.firstChild);
49 // see http://dean.edwards.name/weblog/2005/10/add-event/
50 addEvent(window, 'DOMContentLoaded', insertNote);