Skip to content

Instantly share code, notes, and snippets.

View hilukasz's full-sized avatar

Łukasz Wieczorek hilukasz

View GitHub Profile
function all() {
var doc = app.activeDocument;
var itemsToLoop = [doc.layers, doc.symbolItems];
var arrayItems = [];
for( i = 0; i < itemsToLoop.length; i++) {
var itemName[i] = itemsToLoop[i].name;
arrayItems.push(itemName[i]);
}
function all() {
var doc = app.activeDocument;
var itemsToLoop = [doc.layers, doc.symbolItems];
var arrayItems = [];
for( i = 0; i < itemsToLoop.length; i++) {
var itemName[i] = itemsToLoop[i].name;
arrayItems.push(itemName[i]);
}
function All() {
var doc = app.activeDocument;
// list of items we might want to loop through
var itemsToLoop = [doc.layers, doc.symbolItems];
//reference for method to know how many layers, pathitems, symbols etc are being looped
//can I do: this.itemsToLoop = [doc.layers, doc.symbolItems]; to remove prev var?
this.name = itemsToLoop;
}
All.prototype.findAndReplace = function(find, replace) {
!!! 5
html
head
title= title
- each tag in meta
meta(name= tag.name, content= tag.content, charset= tag.charset)
link(rel='stylesheet', href='http://fonts.googleapis.com/css?family=Muli' )
link(rel='stylesheet', href='/css/styles.css' )
body(class=pageClass)
function doActionOnLayer(layerName, functionName) {
for (var i = 0; i < numberOfLayers; i++) {
var customName = layerName; //layerName should be string
var myLayer = app.activeDocument.layers[i];
var myLayer = myLayer.name;
if (customName == myLayer) {
var myLayerIndex = i;
return myLayerIndex;
functionName;
}
//not even sure if I can do this? should I declare each var for each value?
var newSalesPageInputs = [$newSaleAddress = $('#newSaleAddress'),
$newSaleAddress = $('#newSaleAddress'),
$newSaleTitle = $('#newSaleTitle'),
$newSaleDescription = $('#newSaleDescription'),
$newSaleSummary = $('#newSaleSummary'),
$newSaleItems = $('#newSaleItems')];
for (var i = 0; i < newSalesPageInputs.length; i++) {
alert(i);
var newSalesPageInputs = [var $newSaleAddress = $('#newSaleAddress'),
var $newSaleTitle = $('#newSaleTitle'),
var $newSaleDescription = $('#newSaleDescription'),
var $newSaleSummary = $('#newSaleSummary'),
var $newSaleItems = $('#newSaleItems')];
for(var i = 0; i < newSalesPageInputs.length; i++) {
alert(i);
$('.inputFocus').each( function(){
var clearMePrevious;
var c = 0;
$(this).keypress(function() {
if (c == 0) {
clearMePrevious = $(this).val();
$(this).val('');
c++;
}
var myString;
var myStringLine;
var thePath = File.openDialog();
//alert(thePath);
function readPref (thePath) {
if (File(thePath).exists == true) {
var file = File(thePath);
//alert("file :: "+file);
file.open("r");
file.encoding= 'BINARY';
var currentOpenItem,
lastOpenItem,
isOpen = false,
myHeight = 44,
headerNav = $('.header-nav'),
closeDiv = $('#close');
$(".team .thumb").show();
// close .header-nav bar
$('#menu-item-653').click(function() {