Skip to content
Browse files

adsafe is used with the option object, but not with the /*jslint */ c…

…omment.
  • Loading branch information...
1 parent 938b0ee commit f690208ad593b0baee1fca18a3afba43c6c5614b @douglascrockford committed Dec 8, 2011
Showing with 10 additions and 18 deletions.
  1. +4 −2 init_ui.js
  2. +2 −14 jslint.js
  3. +4 −2 lint.html
View
6 init_ui.js
@@ -1,5 +1,5 @@
// init_ui.js
-// 2011-10-19
+// 2011-12-08
// This is the web browser companion to fulljslint.js. It is an ADsafe
// lib file that implements a web ui by adding behavior to the widget's
@@ -43,7 +43,9 @@ ADSAFE.lib("init_ui", function (lib) {
var name = bunch.getTitle(),
value = ADSAFE.get(option, name);
if (typeof value === 'boolean') {
- a.push(name + ': ' + value);
+ if (name !== 'adsafe' && name !== 'safe') {
+ a.push(name + ': ' + value);
+ }
bunch.style('backgroundColor', value ? 'black' : 'white');
} else {
bunch.style('backgroundColor', 'gainsboro');
View
16 jslint.js
@@ -1,5 +1,5 @@
// jslint.js
-// 2011-11-16
+// 2011-12-08
// Copyright (c) 2002 Douglas Crockford (www.JSLint.com)
@@ -155,7 +155,6 @@
// The jslint directive is a special comment that can set one or more options.
// The current option set is
-// adsafe true, if ADsafe rules should be enforced
// bitwise true, if bitwise operators should be allowed
// browser true, if the standard browser globals should be predefined
// cap true, if upper case HTML should be allowed
@@ -183,7 +182,6 @@
// rhino true, if the Rhino environment globals should be predefined
// undef true, if variables can be declared out of order
// unparam true, if unused parameters should be tolerated
-// safe true, if use of some browser features should be restricted
// sloppy true, if the 'use strict'; pragma is optional
// sub true, if all forms of subscript notation are tolerated
// vars true, if multiple var statements per function should be allowed
@@ -2388,15 +2386,6 @@ klass: do {
} else {
stop('unexpected_a');
}
- switch (name) {
- case 'adsafe':
- option.safe = true;
- do_safe();
- break;
- case 'safe':
- do_safe();
- break;
- }
}
advance();
if (next_token.id === ',') {
@@ -6916,8 +6905,7 @@ klass: do {
};
itself.jslint = itself;
- itself.edition = '2011-11-16';
+ itself.edition = '2011-12-08';
return itself;
-
}());
View
6 lint.html
@@ -518,7 +518,8 @@ <h2 id=options>Options</h2>
<td>ADsafe</td>
<td><code>adsafe</code></td>
<td><code>true</code> if <a href="http://www.ADsafe.org/">AD<span style="color: blue;">safe</span></a>
- rules should be enforced. See <a href="http://www.ADsafe.org/">http://www.ADsafe.org/</a>. The <code>/*jslint*/</code> directive cannot be used to turn this option off.</td>
+ rules should be enforced. See <a href="http://www.ADsafe.org/">http://www.ADsafe.org/</a>. <code>adsafe</code> is used with the <code>option</code> object, but not
+ with the <code>/*jslint */</code> comment. </td>
</tr>
<tr>
<td>Tolerate bitwise operators </td>
@@ -662,7 +663,8 @@ <h2 id=options>Options</h2>
<td><code>safe</code></td>
<td><code>true</code> if the safe subset rules are enforced. These rules
are used by <a href="http://www.ADsafe.org/">ADsafe</a>. It enforces
- the safe subset rules but not the widget structure rules.</td>
+ the safe subset rules but not the widget structure rules. <code>safe</code> is used with the <code>option</code> object, but not
+ with the <code>/*jslint */</code> comment. </td>
</tr>
<tr>
<td> Tolerate missing&nbsp;<code>'use strict'</code>&nbsp;pragma </td>

0 comments on commit f690208

Please sign in to comment.
Something went wrong with that request. Please try again.