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(){ | |
var eventMatchers = { | |
'HTMLEvents': /^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/, | |
'MouseEvents': /^(?:click|mouse(?:down|up|over|move|out))$/ | |
} | |
var defaultOptions = { | |
pointerX: 0, | |
pointerY: 0, | |
button: 0, |
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
/** | |
* Pattern Module | |
* p - parent object | |
* t - reference to this into the module | |
*/ | |
var App; | |
App = (function(){ | |
return {}; |
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
var MODULE = {}; | |
/* User page */ | |
MODULE.User = (function(module){ | |
var username = ''; | |
var methods = { | |
setName: function(name){ | |
username = name; |
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
/* User settings */ | |
var time = 500; // time delay, 500 work fine | |
var type = 'deactivated'; // type of user: deactivated or all | |
/* do not change */ | |
var | |
fans = document.querySelectorAll('.fans_fan_row'), | |
fans_length = fans.length, | |
fans_bl = [], |
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
/** | |
* Get window viewport width | |
* @param side {string} - (width|height|both) | |
* | |
* Usage getViewPort('width'); // return viewport width | |
*/ | |
function getViewPort(side){ | |
var side = side || 'both'; | |
var viewport = { width: 0, height: 0 }; |
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
/** | |
* Application | |
* @constructor | |
*/ | |
function App(){ | |
var T = this; | |
this.body = $("body"); | |
this.doc = $(document); | |
this.win = $(window); | |
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
module.exports = function (grunt) { | |
//описываем конфигурацию | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), //подгружаем package.json, чтобы использовать его данные | |
/*jshint: { // описываем как будет проверять наш код - jsHint | |
options: { | |
curly: true, | |
eqeqeq: true, | |
immed: true, |
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
{ | |
"name": "terminal-ukraine", | |
"version": "1.0.0", | |
"description": "project description", | |
"main": "Gruntfile.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"devDependencies": { | |
"grunt": "~0.4.2", |
NewerOlder