Navigation Menu

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 / 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();
}
@IOZ
IOZ / cssAutoReloader.js
Last active August 29, 2015 14:14
css auto reloader
/**
* Css auto reload
* NOTE!!! remove on production
*/
(function() {
'use strict';
var CssReload = {
config: {
keyCode: 83
@IOZ
IOZ / Tags.xml
Last active August 29, 2015 14:13
xml tags descriptions
<!-- CACHE
------------------------------------------------>
<iscache type="relative" hour="24"/>
type:
- relative
hour - cache lifetime in hours
minute - cache lifetime in minutes
@IOZ
IOZ / plugin.js
Created March 26, 2014 17:24
jquery plugin pattern
if (typeof Object.create !== "function") {
Object.create = function (obj) {
function F() {}
F.prototype = obj;
return new F();
};
}
(function ($, window, document) {
@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
*/