Skip to content
This repository has been archived by the owner on Dec 21, 2019. It is now read-only.

Commit

Permalink
- Moving slickspeed to github. Yey!
Browse files Browse the repository at this point in the history
 - This code, originally hosted on google code, has been updated with John Resig's latest changes, http://github.com/jeresig/sizzle/tree/cc1213bc4d9402765d7699f2f9d2db2298830ff5/speed
  • Loading branch information
kamicane committed Feb 21, 2009
0 parents commit 538fec7
Show file tree
Hide file tree
Showing 13 changed files with 3,467 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Readme.md
@@ -0,0 +1,14 @@
# SlickSpeed

## Speed / Validity tests for dom queries in JavaScript web frameworks.

### Instructions

* Edit config.ini and fill in your framework list. Place frameworks in /frameworks.
* Edit selectors.list and fill in your preferred selectors list.
* Edit style.css, header.html and footer.html, if you wish.
* Edit template.html if you want to change the selectors html file. It DOES NOT accept the full document, just elements.

### License

MIT-Style License.
24 changes: 24 additions & 0 deletions config.ini
@@ -0,0 +1,24 @@
; [MooTools]
; file = "mootools.js"
; function = "$$"

; [Prototype]
; file = "prototype.js"
; function = "$$"

; [Dojo]
; file = "dojo.js"
; function = "dojo.query"

; [jQuery]
; file = "jquery.js"
; function = "jQuery"


; just add a framework here following the conventions to add another framework.
; the function parameter is to choose the right css selector function name
; the include parameter is to include the right javascript file

; [myframework]
; file = "myFramework.js"
; function = "getElements"
3 changes: 3 additions & 0 deletions footer.html
@@ -0,0 +1,3 @@
<div id="footer">
<p class="footer">copyright &copy; 2007 <a href="http://mootools.net">http://mootools.net</a> | MIT License | <a href="http://slickspeed.googlecode.com/svn/trunk">download from googlecode</a></p>
</div>
7 changes: 7 additions & 0 deletions header.html
@@ -0,0 +1,7 @@
<h1><span>SlickSpeed</span></h1>
<h2>Speed/validity selectors test for frameworks.</h2>
<p>Every framework runs in his own iFrame, thus no conflicts can happen. Tests are run selector by selector, with an interval to prevent the browser from freeezing.</p>
<p>Tests are run in a neutral environment, no library or framework is included in the main javascript test.</p>
<p>Under firefox, disable firebug for more accurate results, as most frameworks could throw warnings, slowing down the dom query process.</p>

<p>Tests are run against a local copy of <a href="template.html">this document</a>.</p>
1 change: 1 addition & 0 deletions index.php
@@ -0,0 +1 @@
<?php include('system/index.php');?>
21 changes: 21 additions & 0 deletions license.txt
@@ -0,0 +1,21 @@
The MIT License

Copyright (c) 2006-2009 Valerio Proietti, <http://mad4milk.net/>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Binary file added logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions selectors.list
@@ -0,0 +1,40 @@
body
div
body div
div p
div > p
div + p
div ~ p
div[class^=exa][class$=mple]
div p a
div, p, a
.note
div.example
ul .tocline2
div.example, div.note
#title
h1#title
div #title
ul.toc li.tocline2
ul.toc > li.tocline2
h1#title + div > p
h1[id]:contains(Selectors)
a[href][lang][class]
div[class]
div[class=example]
div[class^=exa]
div[class$=mple]
div[class*=e]
div[class|=dialog]
div[class!=made_up]
div[class~=example]
div:not(.example)
p:contains(selectors)
p:nth-child(even)
p:nth-child(2n)
p:nth-child(odd)
p:nth-child(2n+1)
p:nth-child(n)
p:only-child
p:last-child
p:first-child
189 changes: 189 additions & 0 deletions style.css
@@ -0,0 +1,189 @@
body {
font: 11px "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
color: #41464D;
margin: 0;
padding: 0;
background: #F3F1F1;
}

/*main rules*/

a:link, a:visited {
color: #528CE0;
}

a:hover, a:active {
color: #C65F5E;
}

p {
font-size: 13px;
margin: 0;
padding: 3px 0;
}

iframe {
height: 1px;
width: 1px;
visibility: hidden;
}

span.clr {
display: block;
clear: both;
}

/*header*/

h1 {
font-family: Georgia;
margin: 0;
padding: 0;
background: url(logo.png) no-repeat top left;
height: 69px;
width: 280px;
}

h1 span {
display: none;
}

h2 {
margin: 0;
padding: 10px 0;
font-size: 15px;
}

#container {
padding: 30px;
}

/*controls*/

#controls a:link, #controls a:visited {
display: block;
float: right;
background: #D0C8C8;
padding: 7px 10px;
font-size: 13px;
font-weight: bold;
margin-left: 10px;
text-align: center;
text-decoration: none;
border: 3px solid #fff;
color: #41464D;
text-shadow: 2px 2px 1px #B9ACAC;
}

#controls a:hover, #controls a:active {
text-shadow: none;
background: #F3F1F1;
color: #528CE0;
}

/*table*/

table {
border-collapse: collapse;
width: 100%;
min-width: 800px;
margin: 0;
padding: 0;
}

#legend td {
padding: 15px;
}

td, th {
background: #C8CBD0;
padding: 5px 8px;
margin: 0;
width: 150px;
font-weight: bold;
border: 3px solid #fff;
}

th {
font-weight: bold;
background: #D0C8C8;
color: #8A7575;
}

th.framework {
font-size: 15px;
text-shadow: 2px 2px 1px #B9ACAC;
}

td.test, td.empty, th {
text-align: right;
}

td.normal {
color: #636A75;
}

td.mismatch {
color: #AD7520;
}

td.good {
color: #657528;
background: #CFE773;
}

td.bad {
color: #B33F3F;
background: #EE9A9A;
}

td.exception {
color: #F3F1F1;
background: #41464D;
}

span.exception {
color: #DBEAF0;
text-decoration: underline;
cursor: help;
}

td.zero {
color: #F3F1F1;
background: #41464D;
}

th.selector {
background: #D2E0E6;
color: #528CE0;
text-align: left;
}

th.score-title, th.selectors-title {
text-align: left;
font-size: 12px;
width: 180px;
}

td.score {
color: #8A7575;
background: #D0C8C8;
text-align: center;
font-size: 12px;
}

td.mismatch {
background: #E8C896;
}

/*page footer*/

div#footer {
padding: 20px 0;
}

div#footer p {
font-size: 11px;
color: #B9ACAC;
}

0 comments on commit 538fec7

Please sign in to comment.