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
/*global ig*/ | |
ig.module( | |
'plugins.persistence.localstorage' | |
).requires( | |
'impact.game' | |
).defines(function () { | |
'use strict'; | |
ig.PersistenceLocalStorage = ig.Class.extend({ | |
/** | |
* Initialize Persistence as localStorage |
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
/* | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Copyright (C) 2014 Felipe Budinich <[email protected]> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this document and license. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
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
// bind keyboard and gamepad buttons | |
ig.input.bind( ig.KEY.X, 'shoot1'); | |
ig.input.bind( ig.GAMEPAD1.FACE_1, 'shoot1'); | |
ig.input.bind( ig.GAMEPAD2.FACE_1, 'shoot2'); | |
ig.input.bind( ig.GAMEPAD3.FACE_1, 'shoot3'); | |
ig.input.bind( ig.GAMEPAD4.FACE_1, 'shoot4'); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Javascript, Client side domain validation.</title> | |
<script type="text/javascript"> | |
function checkAllowedDomains() { | |
// add allowed domains on the "allowed" array | |
var allowed = ['127.0.0.1'], | |
isAllowed = false; |
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
function isValidEmailAddress(emailAddress) { | |
var pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i); | |
return pattern.test(emailAddress); | |
} |
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
/*global ig*/ | |
ig.module( | |
'plugins.domain' | |
).requires().defines(function () { | |
'use strict'; | |
var DomainUtils = { | |
isCurrentDomainAllowed: function () { | |
var allowed = ['127.0.0.1', 'www.example.com', 'example.com'], | |
isAllowed = false, | |
i; |