-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cecc49c
Showing
9 changed files
with
316 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text eol=lf |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/ | ||
npm-debug.log |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.gitattributes | ||
.gitignore | ||
.npmignore | ||
Gruntfile.js | ||
test.html |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
/* jshint node: true */ | ||
|
||
'use strict'; | ||
|
||
module.exports = | ||
function (grunt) | ||
{ | ||
// Project configuration. | ||
grunt.initConfig( | ||
{ | ||
clean: { default: '*.screwed.js' }, | ||
jscs: | ||
{ | ||
default: '*.js', | ||
options: | ||
{ | ||
disallowMixedSpacesAndTabs: true, | ||
disallowSpaceAfterObjectKeys: true, | ||
disallowSpaceAfterPrefixUnaryOperators: true, | ||
disallowSpaceBeforePostfixUnaryOperators: true, | ||
disallowSpacesInCallExpression: true, | ||
disallowSpacesInFunctionDeclaration: { beforeOpeningRoundBrace: true }, | ||
disallowSpacesInNamedFunctionExpression: { beforeOpeningRoundBrace: true }, | ||
disallowSpacesInsideBrackets: true, | ||
disallowSpacesInsideParentheses: true, | ||
disallowTrailingWhitespace: 'ignoreEmptyLines', | ||
disallowYodaConditions: true, | ||
requireBlocksOnNewline: 1, | ||
requireKeywordsOnNewLine: | ||
[ | ||
'break', | ||
'case', | ||
'catch', | ||
'continue', | ||
'default', | ||
'do', | ||
'else', | ||
'finally', | ||
'for', | ||
'switch', | ||
'throw', | ||
'try' | ||
], | ||
requireLineBreakAfterVariableAssignment: true, | ||
requireLineFeedAtFileEnd: true, | ||
requireSpaceAfterBinaryOperators: true, | ||
requireSpaceAfterKeywords: true, | ||
requireSpaceAfterLineComment: true, | ||
requireSpaceBeforeBinaryOperators: true, | ||
requireSpaceBeforeBlockStatements: true, | ||
requireSpaceBeforeKeywords: | ||
[ | ||
'delete', | ||
'if', | ||
'in', | ||
'instanceof', | ||
'return', | ||
'while' | ||
], | ||
requireSpaceBeforeObjectValues: true, | ||
requireSpaceBetweenArguments: true, | ||
requireSpacesInAnonymousFunctionExpression: | ||
{ | ||
beforeOpeningRoundBrace: true | ||
}, | ||
requireSpacesInConditionalExpression: true, | ||
requireSpacesInForStatement: true, | ||
requireSpacesInFunctionDeclaration: { beforeOpeningCurlyBrace: true }, | ||
requireSpacesInFunctionExpression: { beforeOpeningCurlyBrace: true }, | ||
requireSpacesInsideObjectBrackets: 'all', | ||
validateIndentation: 4, | ||
validateParameterSeparator: ', ' | ||
} | ||
}, | ||
jshint: | ||
{ | ||
src: '*.js', | ||
options: | ||
{ | ||
curly: true, | ||
eqeqeq: true, | ||
immed: true, | ||
latedef: true, | ||
maxlen: 100, | ||
newcap: false, | ||
noarg: true, | ||
noempty: true, | ||
quotmark: true, | ||
singleGroups: true, | ||
strict: true, | ||
trailing: true, | ||
undef: true, | ||
unused: true, | ||
|
||
boss: true, | ||
elision: true, | ||
eqnull: true, | ||
evil: true, | ||
validthis: true, | ||
'-W018': true, | ||
} | ||
}, | ||
shell: | ||
{ | ||
default: | ||
{ | ||
command: | ||
'node node_modules/jscrewit/screw.js ' + | ||
'-w -f SELF ' + | ||
'node_modules/jquery/dist/cdn/jquery-2.1.3.min.js ' + | ||
'jquery-2.1.3.screwed.js' | ||
} | ||
} | ||
} | ||
); | ||
|
||
// These plugins provide necessary tasks. | ||
grunt.loadNpmTasks('grunt-contrib-clean'); | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
grunt.loadNpmTasks('grunt-jscs'); | ||
grunt.loadNpmTasks('grunt-shell'); | ||
|
||
// Default task. | ||
grunt.registerTask('default', ['clean', 'jshint', 'jscs', 'shell']); | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Copyright 2014 jQuery Foundation and other contributors | ||
http://jquery.com/ | ||
|
||
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. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
jQuery *Screwed* | ||
================ | ||
|
||
jQuery JavaScript library made using only six different characters: `[]()!+` | ||
|
||
Usage | ||
----- | ||
|
||
You can use jQuery Screwed anywhere in your code like the regular jQuery. | ||
|
||
```html | ||
<script src="jquery-2.1.3.screwed.js"></script> | ||
``` | ||
|
||
```html | ||
<script> | ||
$(function(){ | ||
alert("You are using jQuery Screwed!"); | ||
}); | ||
</script> | ||
``` | ||
|
||
See the section [Browser Support](#browser-support) for information about supported browsers. | ||
|
||
Creation | ||
-------- | ||
|
||
jQuery Screwed was created with [JScrewIt](https://github.com/fasttime/JScrewIt). | ||
Below are the steps to recreate it manually. | ||
|
||
* Install [Node.js](http://nodejs.org) if you haven't done so yet. | ||
* Install JScrewIt: run `npm install -g jscrewit` | ||
* Download jQuery - current stable version is 2.1.3: http://code.jquery.com/jquery-2.1.3.min.js | ||
* Replace path names as appropriate and run<br> | ||
`node jscrewit -w -f SELF path/to/source/jquery-2.1.3.min.js path/to/dest/jquery-2.1.3.screwed.js` | ||
|
||
Browser Support | ||
--------------- | ||
|
||
jQuery Screwed supports all browsers also supported by jQuery 2.x, except for those not compatible | ||
with JScrewIt. | ||
|
||
The table below shows browser support of jQuery and jQuery Screwed. | ||
Differences are marked in bold. | ||
|
||
| | jQuery 2.x | jQuery Screwed | | ||
|-------------------|:-----------------------------------:|:------------------------:| | ||
| Chrome | (Current - 1) or Current | (Current - 1) or Current | | ||
| Internet Explorer | 9+ | 9+ | | ||
| Firefox | (Current - 1) or Current | (Current - 1) or Current | | ||
| Safari | **5.1+** | **7.0+** | | ||
| Opera | **12.1x**, (Current - 1) or Current | (Current - 1) or Current | | ||
| iOS | **6.1+** | **7.1+** | | ||
| Android | **2.3**, 4.0+ | 4.0+ | | ||
|
||
Credits | ||
------- | ||
|
||
jQuery Screwed is based on [jQuery](https://github.com/jquery/jquery). | ||
jQuery is Copyright jQuery Foundation and other contributors, and licensed under the MIT license. | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "jquery-screwed", | ||
"version": "2.1.3+screwed.1", | ||
"description": "jQuery JavaScript library made of only six different characters: []()!+", | ||
"keywords": [ | ||
"jquery", | ||
"jscrewit", | ||
"jsfuck" | ||
], | ||
"homepage": "https://github.com/fasttime/jquery-screwed", | ||
"bugs": { | ||
"url": "https://github.com/fasttime/jquery-screwed/issues" | ||
}, | ||
"license": { | ||
"type": "MIT", | ||
"url": "https://github.com/fasttime/jquery-screwed/blob/master/LICENSE.txt" | ||
}, | ||
"author": "Francesco Trotta <[email protected]> (https://github.com/fasttime)", | ||
"main": "jquery-2.1.3.screwed.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/fasttime/jquery-screwed.git" | ||
}, | ||
"devDependencies": { | ||
"grunt": "~0.4.5", | ||
"grunt-contrib-clean": "~0.6.0", | ||
"grunt-contrib-jshint": "~0.11.0", | ||
"grunt-jscs": "~1.5.0", | ||
"grunt-shell": "~1.1.1", | ||
"jquery": "2.1.3", | ||
"jscrewit": ">=1.4.2" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<!DOCTYPE HTML> | ||
<html> | ||
<head> | ||
<meta charset='utf-8'> | ||
<meta http-equiv='X-UA-Compatible' content='IE=edge'> | ||
<meta name='viewport' content='width=device-width'> | ||
<script> | ||
|
||
'use strict'; | ||
|
||
function handleLoad() | ||
{ | ||
setTimeout(loadScript); | ||
} | ||
|
||
function loadScript() | ||
{ | ||
var script = document.createElement('SCRIPT'); | ||
script.onload = | ||
function () | ||
{ | ||
if (window.$) | ||
{ | ||
statusBlock.className = 'success'; | ||
statusBlock.textContent = 'jQuery Screwed was loaded correctly.'; | ||
} | ||
else | ||
{ | ||
statusBlock.className = 'failed'; | ||
statusBlock.textContent = 'jQuery Screwed was not loaded correctly.'; | ||
} | ||
}; | ||
script.src = 'jquery-2.1.3.screwed.js'; | ||
document.querySelector('head').appendChild(script); | ||
} | ||
|
||
addEventListener('load', handleLoad); | ||
|
||
</script> | ||
<style> | ||
|
||
#statusBlock | ||
{ | ||
border: thin solid black; | ||
border-radius: .125em; | ||
color: black; | ||
display: inline-block; | ||
font-weight: bold; | ||
padding: 1em; | ||
} | ||
|
||
.failed { background: tomato; } | ||
|
||
.pending { background: lightgray; } | ||
|
||
.success { background: lightgreen; } | ||
|
||
a { text-decoration: none; } | ||
|
||
body { font: 24px sans-serif; text-align: center; } | ||
|
||
</style> | ||
<title>jQuery Screwed Test Page</title> | ||
<body> | ||
<p>This page tests your browser’s ability to load <a | ||
href='https://github.com/fasttime/jquery-screwed'>jQuery Screwed</a>.</p> | ||
<div class='pending' id='statusBlock'>Trying to load jQuery Screwed…</div> |