-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
118 lines (101 loc) · 6.47 KB
/
index.html
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>JS Manners</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="css/libs/bootstrap.min.css">
<link rel="stylesheet" href="css/libs/font-awesome.min.css">
<link rel="stylesheet" href="css/main.css">
<script src='js/libs/jquery.min.js'></script>
<script src='js/libs/bootstrap.min.js'></script>
<script src='js/libs/mustache.min.js'></script>
<script src='js/libs/filesaver.js'></script>
<script src='js/tests.js'></script>
<script src='js/app.js'></script>
</head>
<body>
<div class="container">
<div class='page-header'>
<h1>JS Manners</h1>
</div>
<p>JS Manners is a tool to score scripts that 3rd parties (people or companies outside your dev team) provide for you to put on your page. These scripts can save you a lot of time and provide neat features on your site, but they can also be security risks, cause performance problems, and make debugging a nightmare.</p>
<p>Call it the 'YSlow for widgets' if you will.</p>
<h2>Rate a script now</h2>
<p>Filter the list of tests by disabling those that do not interest you:</p>
<ul class="btn-toolbar" id='filters'></ul>
<form id='scoring-form' class='well'></form>
<h3>Verdict</h3>
<div id='overall-scores'></div>
<p>Key to grades:</p>
<ul>
<li><strong>A</strong>: Best practice</li>
<li><strong>B</strong>: Reasonable behaviour. May sometimes be the best possible behaviour.</li>
<li><strong>C</strong>: Undesirable behaviour that should be avoidable, but which does not significantly affect the host site (it may make debugging harder or otherwise make a developer's life hard)</li>
<li><strong>D</strong>: Undesirable behaviour which poses a significant risk or disadvantage to the host site. Investigate carefully before using this script.</li>
<li><strong>E</strong>: Dangerous.</li>
</ul>
<p>Key to categories</p>
<ul>
<li><strong>Stability</strong>: Properties that affect the robustness of the host site or the component, or their interaction with one another or any other element on the page.</li>
<li><strong>Performance</strong>: Page load speed, rendering performance and tying up the main UI thread, use of CPU and memory</li>
<li><strong>Footprint</strong>: The amount of stuff touched / interfered with by the script</li>
<li><strong>Flexibility</strong>: Things that affect the ability of the developer to use the script in the way that they want to</li>
<li><strong>Security</strong>: Behaviour that affects the potential surface area in which vulnerabilities might occur.</li>
</ul>
<h3>Save / submit this result?</h3>
<p>To save this result to your computer, fill in the following details and hit the button to generate a JSON file with the data for your script:</p>
<div class='well'>
<form id='download-form'>
<div class='form-group'>
<label for='scriptname'>The name of this script</label>
<input type='text' id='scriptname' class='form-control' placeholder='eg. Disqus' />
</div>
<div class='form-group'>
<label for='scriptdesc'>One line description of what this script does</label>
<input type='text' id='scriptdesc' class='form-control' placeholder='eg. Adds commenting to web pages' />
</div>
<div class='form-group'>
<label for='scripthomeurl'>URL to go to for more information about the script</label>
<input type='text' id='scripthomeurl' class='form-control' placeholder='eg. http://www.disqus.com' />
</div>
<div class='form-group'>
<label for='scripturl'>URL (or example URL) where the script itself can be found</label>
<input type='text' id='scripturl' class='form-control' placeholder='eg. http://go.disqus.com/embed.js' />
</div>
<div class='form-group'>
<label for='scriptevaluator'>Your name, organisation or attribution</label>
<input type='text' id='scriptevaluator' class='form-control' placeholder='eg. David Smith, Acme Inc' />
</div>
<input type='button' id='download-button' class='btn btn-primary' value='Download' />
</form>
</div>
<p>To make your result part of the JSManners public ranking, <a href='https://github.com/triblondon/thirdpartysla/compare/'>submit a pull request on GitHub</a> to add your file to the `/data` directory. Once accepted, it will appear in the ranking below.</p>
<h2>Scores for popular libraries (TODO)</h2>
<table class='table'>
<thead>
<tr><th>Script</th><th>Test date</th><th>Scores</th></tr>
</thead>
<tbody>
<!--
TODO. Example:
<tr>
<td><h4>Disqus</h4>Adds comments to a web page</td>
<td>3 Oct 2013</td>
<td>
<div title='Flexibility' class='verdict verdict-a' data-score='1'>A</div>
<div title='Flexibility' class='verdict verdict-a' data-score='1'>A</div>
<div title='Flexibility' class='verdict verdict-a' data-score='1'>A</div>
<div title='Flexibility' class='verdict verdict-a' data-score='1'>A</div>
<div title='Flexibility' class='verdict verdict-a' data-score='1'>A</div>
</td>
</tr>
-->
</tbody>
</table>
<h2>Who build this?</h2>
<p>JS Manners was built by <a href='http://trib.tv'>Andrew Betts</a>, with assistance and contributions from Ilya Grigorik, Ben Vinegar, Guy Podjarny, Steve Thair, Kyle Kinnaman, Stoyan Stefanov, and Barbara Bermes. If you have feedback or suggestions, please <a href='https://github.com/triblondon/thirdpartysla/compare/'>submit a pull request</a> or <a href='https://github.com/triblondon/thirdpartysla/issues'>open an issue</a>.</p>
</div>
</body>
</html>