blob: f14877d9e60c2f04cb29ad5dac98fa2ed83459dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/*
* miscRules.json
*
* Simple rules for checking miscellaneous things.
*
*/
{ 'name': 'Misc'
, 'description': 'Miscellaneous rules'
, 'rules': [
//---------------------------------------------------------
{ 'id': 12081801
, 'name': 'Footer check'
, 'description': 'Footer should appear on the page'
, 'rule':
function() {
if ($5('div.footer').length === 0) {
report('Footer does not appear', elt);
}
}
},
//---------------------------------------------------------
{ 'id': 12081802
, 'name': 'Main content width check'
, 'description': 'Main content div should be between 520px and 1200px wide'
, 'rule':
function() {
var width;
var elt = $5('#content');
if (elt) {
width = elt.width();
if (width > 1200) {
report('Main content is too wide: ' + width, elt);
} else if (width < 520) {
report('Main content is too narrow: ' + width, elt);
}
}
}
}//,
//---------------------------------------------------------
]
}
|