-
-
Save r7kamura/bc1577d4410891ade243 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Imported from https://github.com/curtisj44/HTML-Lint | |
jQuery.each({ | |
'a:empty, b:empty, abbr:empty, acronym:empty, button:empty, dd:empty, div:empty, dl:empty, dt:empty, h1:empty, h2:empty, h3:empty, h4:empty, h5:empty, h6:empty, form:empty, fieldset:empty, label:empty, li:empty, ol:empty, p:empty, span:empty, strong:empty, ul:empty': { | |
'label': 'empty tag' | |
}, | |
'applet': { | |
'label': '<code><applet></code>' | |
}, | |
'center': { | |
'label': '<code><center></code>' | |
}, | |
'font': { | |
'label': '<code><font></code>' | |
}, | |
//'iframe': { | |
// 'label': '<code><iframe></code>' | |
//}, | |
'noscript': { | |
'label': '<code><noscript></code>' | |
}, | |
's': { | |
'label': '<code><s></code>' | |
}, | |
'strike': { | |
'label': '<code><strike></code>' | |
}, | |
'u': { | |
'label': '<code><u></code>' | |
}, | |
'br + br': { | |
'label': 'Multiple <code><br></code>’s (* not quite accurate)' | |
}, | |
':contains("=NOTFOUND!")': { | |
'label': 'Missing SiteCore resource' | |
}, | |
'abbr:not([title])': { | |
'label': '<code><abbr></code> missing <code>title</code>' | |
}, | |
'acronym:not([title])': { | |
'label': '<code><acronym></code> missing <code>title</code>' | |
}, | |
'a:contains("Click here"), a:contains("click here")': { | |
'label': '“Click here” used as link text' | |
}, | |
'a:contains("Read more"), a:contains("Read more")': { | |
'label': '“Read more” used as link text' | |
}, | |
'a:not([href])': { | |
'label': '<code><a></code> missing <code>href</code>' | |
}, | |
'a[href=""]': { | |
'label': '<code>a[href=""]</code>' | |
}, | |
'a[href="#"]': { | |
'label': '<code>a[href="#"]</code>' | |
}, | |
'a[href*="javascript:"]': { | |
'label': '<code>a[href*="javascript:"]</code>' | |
}, | |
'a[href*="<"]': { | |
'label': '<code>a[href*="<"]</code>' | |
}, | |
'a[href*=">"]': { | |
'label': '<code>a[href*=">"]</code>' | |
}, | |
'a[target]': { | |
'label': '<code>a[target]</code>' | |
}, | |
'head script:not([src*="hasJS.js"], [src*="swfobject.js"], [src*="google-analytics.com"])': { | |
'label': '<code><script></code> in the <code><head></code>' | |
}, | |
'fieldset:not(:has(legend))': { | |
'label': '<code><fieldset></code> missing <code><legend></code>' | |
}, | |
'form[action=""]': { | |
'label': '<code>form[action=""]</code>' | |
}, | |
'form[action="#"]': { | |
'label': '<code>form[action="#"]</code>' | |
}, | |
'form:not(:has(fieldset))': { | |
'label': '<code><form></code> missing <code><fieldset></code>' | |
}, | |
'input[type="text"]': { | |
'label': '<code>type="text"</code> is not needed on <code><input></code>' | |
}, | |
'img:not([alt])': { | |
'label': '<code><img></code> missing <code>alt</code>' | |
}, | |
'img:not(".tracking")[alt=""]': { | |
'label': '<code>img[alt=""]</code>' | |
}, | |
'img[src=""]': { | |
'label': '<code>img[src=""]</code>' | |
}, | |
'label:not([for])': { | |
'label': '<code><label></code> missing for' | |
}, | |
'body link:not("#html-lint-css")': { | |
'label': '<code><link></code> not in <code><head></code>' | |
}, | |
'link:not([rel])': { | |
'label': '<code><link></code> missing rel' | |
}, | |
'link[charset]': { | |
'label': '<code>link[charset]</code>' | |
}, | |
'link[rel="shortcut icon"][type="image/ico"]': { | |
'label': '<code>type="images/ico"</code> is not needed on <code><link></code>' | |
}, | |
'link[rel="stylesheet"][media="all"]': { | |
'label': '<code>media="all"</code> is not needed on <code><link></code>' | |
}, | |
'link[rel="stylesheet"][type="text/css"]': { | |
'label': '<code>type="text/css"</code> is not needed on <code><link></code>' | |
}, | |
'script[charset]': { | |
'label': '<code>script[charset]</code>' | |
}, | |
'script[language]': { | |
'label': '<code>language</code> attribute is not valid on <code><script></code>' | |
}, | |
'script[type="text/javascript"]': { | |
'label': '<code>type="text/javascript"</code> is not needed on <code><script></code>' | |
}, | |
'table:not([summary])': { | |
'label': '<code><table></code> missing <code>summary</code>' | |
}, | |
'table:not(:has(caption))': { | |
'label': '<code><table></code> missing <code><caption></code>' | |
}, | |
'table:not(:has(th))': { | |
'label': '<code><table></code> missing <code><th></code>' | |
}, | |
'table table': { | |
'label': '<code><table></code> inside <code><table></code>' | |
}, | |
'th:not([scope])': { | |
'label': '<code><th></code> missing scope' | |
}, | |
'th[scope=""]': { | |
'label': '<code>th[scope=""]</code>' | |
}, | |
':not("canvas, img, object")[width]': { | |
'label': 'Invalid attribute: <code>width</code>' | |
}, | |
'[align]': { | |
'label': 'Invalid attribute: <code>align</code>' | |
}, | |
'[alink]': { | |
'label': 'Bad attribute: <code>alink</code>' | |
}, | |
'[background]': { | |
'label': 'Invalid attribute: <code>background</code>' | |
}, | |
'[bgcolor]': { | |
'label': 'Invalid attribute: <code>bgcolor</code>' | |
}, | |
'[border]': { | |
'label': 'Bad attribute: <code>border</code>' | |
}, | |
'[cellpadding]': { | |
'label': 'Bad attribute: <code>cellpadding</code>' | |
}, | |
'[cellspacing]': { | |
'label': 'Bad attribute: <code>cellspacing</code>' | |
}, | |
'[class=""]': { | |
'label': '<code>class=""</code>' | |
}, | |
'[halign]': { | |
'label': 'Invalid attribute: <code>halign</code>' | |
}, | |
'[id=""]': { | |
'label': '<code>id=""</code>' | |
}, | |
'[link]': { | |
'label': 'Bad attribute: <code>link</code>' | |
}, | |
'[name=""]': { | |
'label': '<code>name=""</code>' | |
}, | |
'[shape]': { | |
'label': 'Bad attribute: <code>shape</code>' | |
}, | |
'[size]': { | |
'label': 'Bad attribute: <code>size</code>' | |
}, | |
'[style*="background"]': { | |
'label': 'Inline style: <code>background</code>' | |
}, | |
'[style*="border"]': { | |
'label': 'Inline style: <code>border</code>' | |
}, | |
'[style*="font"]': { | |
'label': 'Inline style: <code>font</code>' | |
}, | |
'[style*="letter-spacing"]': { | |
'label': 'Inline style: <code>letter-spacing</code>' | |
}, | |
'[style*="line-height"]': { | |
'label': 'Inline style: <code>line-height</code>' | |
}, | |
'[style*="list-style"]': { | |
'label': 'Inline style: <code>list-style</code>' | |
}, | |
'[style*="outline"]': { | |
'label': 'Inline style: <code>outline</code>' | |
}, | |
'[style*="resize"]': { | |
'label': 'Inline style: <code>resize</code>' | |
}, | |
'[style*="text"]': { | |
'label': 'Inline style: <code>text</code>' | |
}, | |
'[style*="vertical"]': { | |
'label': 'Inline style: <code>vertical</code>' | |
}, | |
'[style*="word"]': { | |
'label': 'Inline style: <code>word</code>' | |
}, | |
'[tabindex]': { | |
'label': 'Bad attribute: <code>tabindex</code>' | |
}, | |
'[title=""]': { | |
'label': '<code>title</code> attribute is empty' | |
}, | |
'[valign]': { | |
'label': 'Invalid attribute: <code>valign</code>' | |
}, | |
'[vlink]': { | |
'label': 'Bad attribute: <code>vlink</code>' | |
}, | |
'[onAbort]': { | |
'label': 'Bad attribute: <code>onAbort</code>' | |
}, | |
'[onBlur]': { | |
'label': 'Bad attribute: <code>onBlur</code>' | |
}, | |
'[onChange]': { | |
'label': 'Bad attribute: <code>onChange</code>' | |
}, | |
'[onClick]': { | |
'label': 'Bad attribute: <code>onClick</code>' | |
}, | |
'[onDblClick]': { | |
'label': 'Bad attribute: <code>onDblClick</code>' | |
}, | |
'[onDragDrop]': { | |
'label': 'Bad attribute: <code>onDragDrop</code>' | |
}, | |
'[onError]': { | |
'label': 'Bad attribute: <code>onError</code>' | |
}, | |
'[onFocus]': { | |
'label': 'Bad attribute: <code>onFocus</code>' | |
}, | |
'[onKeyDown]': { | |
'label': 'Bad attribute: <code>onKeyDown</code>' | |
}, | |
'[onKeyPress]': { | |
'label': 'Bad attribute: <code>onKeyPress</code>' | |
}, | |
'[onKeyUp]': { | |
'label': 'Bad attribute: <code>onKeyUp</code>' | |
}, | |
'[onLoad]': { | |
'label': 'Bad attribute: <code>onLoad</code>' | |
}, | |
'[onMouseDown]': { | |
'label': 'Bad attribute: <code>onMouseDown</code>' | |
}, | |
'[onMouseMove]': { | |
'label': 'Bad attribute: <code>onMouseMove</code>' | |
}, | |
'[onMouseOut]': { | |
'label': 'Bad attribute: <code>onMouseOut</code>' | |
}, | |
'[onMouseOver]': { | |
'label': 'Bad attribute: <code>onMouseOver</code>' | |
}, | |
'[onMouseUp]': { | |
'label': 'Bad attribute: <code>onMouseUp</code>' | |
}, | |
'[onMove]': { | |
'label': 'Bad attribute: <code>onMove</code>' | |
}, | |
'[onReset]': { | |
'label': 'Bad attribute: <code>onReset</code>' | |
}, | |
'[onResize]': { | |
'label': 'Bad attribute: <code>onResize</code>' | |
}, | |
'[onSelect]': { | |
'label': 'Bad attribute: <code>onSelect</code>' | |
}, | |
'[onSubmit]': { | |
'label': 'Bad attribute: <code>onSubmit</code>' | |
}, | |
'[onUnload]': { | |
'label': 'Bad attribute: <code>onUnload</code>' | |
}, | |
'#ContentWrapper': { | |
'label': 'Bad Id: <code>ContentWrapper</code>' | |
}, | |
'.MsoNormal': { | |
'label': 'Bad Class: <code>MsoNormal</code>' | |
} | |
}, function(pattern, payload) { | |
node = $(pattern); | |
node.jrumble(); | |
node.trigger('startRumble'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment