Skip to content

Instantly share code, notes, and snippets.

View IOZ's full-sized avatar
🏠
Working from home office

Igor Zimnitskiy IOZ

🏠
Working from home office
View GitHub Profile
@IOZ
IOZ / vk_remove_fans
Last active March 25, 2017 18:38
Tiny script, which automatically remove vk fans
/* 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 = [],
@IOZ
IOZ / magento_trigger.jquery.js
Created March 20, 2014 11:13
Call jquery trigger events after init Magento public methods
/**
* Call jquery trigger event after initialize Magento public methods
*/
(function () {
/**
* RegionUpdater
*/
module.exports = function (grunt) {
//описываем конфигурацию
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'), //подгружаем package.json, чтобы использовать его данные
/*jshint: { // описываем как будет проверять наш код - jsHint
options: {
curly: true,
eqeqeq: true,
immed: true,
{
"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",
@IOZ
IOZ / VKPhotoDescriptionUpdater.js
Last active November 29, 2015 16:48
Script, which allow you automatically update all album photos description.
(function() {
'use strict';
var VKPhotoDescriptionUpdater = {
isDone: false,
isCaptcha: false,
maxPhotos: null,
isReplace: false,
isAddToEnd: false,
text: null,
textToReplace: null,
@IOZ
IOZ / VKCliner.js
Last active October 31, 2015 21:40
Remove VK deleted subscribers
(function() {
'use strict';
var VKCleaner = {
init: function() {
this.config = {
'userClass' : '#gedit_users_members .gedit_user',
'photoClass' : '.gedit_user_img',
'buttonsClass' : '.gedit_user_action'
};
@IOZ
IOZ / ada.css
Created June 28, 2015 16:57
ADA Code snippets
/* Hide only visually, but have it available for screenreaders: h5bp.com/v */
.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
/* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: h5bp.com/p */
.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
@IOZ
IOZ / ContentParser2.js
Last active August 29, 2015 14:23
Content Parse for Landing Pages
/**
* Content Parser
*/
function parseContent2() {
var imgPath = 'http://images.menswearhouse.com/is/image/JosBank/';
var $content = $('.additionalInfos').clone();
var output = '<div class="contentSectionArea" dir="ltr" id="main"><div><div class="landingPageContent">{{content}}</div></div></div>';
/**
* Content Parser
* @param imageName - name from scene 7
*/
function parseContent(imageName) {
var imgPath = 'http://images.menswearhouse.com/is/image/JosBank/';
var $content = $('.content.static_content').clone();
var $nav = $('<p class="ea-back"><img src="http://images.menswearhouse.com/is/image/JosBank/Expert_Advice_logoArticle" width="94" height="30" alt="Expert Advice"/> <span aria-hidden="true">&nbsp;|&nbsp; &laquo;</span><a href="ContentView?langId=-1&amp;storeId=11001&amp;catalogId=10050&amp;contentKey=EXPERT_ADVICE">Back To Articles</a></p>');
var center;
@IOZ
IOZ / autoload.js
Created May 25, 2015 12:00
Auto downloading files via js
function downloadURI(uri, name)
{
var link = document.createElement("a");
link.download = name;
link.href = uri;
link.click();
}