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
<script>for(var e,l='article aside figcaption figure footer header hgroup section time'.split(' ');e=l.pop();document.createElement(e))</script> |
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 runMe() { | |
if(i == 2){ | |
return true | |
} | |
} | |
for(var i = 0; i < something.length; i++){ | |
runMe(i); | |
} |
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
//start script | |
var subLayers = app.activeDocument.layers.getByName("parent").pageItems; | |
var smallestParentArea = 100000000; | |
var parentSmallest = []; | |
var smallestChild = "no smallest child found yet"; | |
//loop through all sublayers to find children | |
for(var i = 0; i < subLayers.length; i++){ | |
var smallestChild; |
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 SymbolContainer(theSymbol){ | |
this.child = null; // reference to single child container | |
this.symbolItems = null; //array of symbols | |
this.parent = null; | |
} | |
SymbolContainer.prototype.checkIfChild = function(containerToCheckIfChild) { | |
this.parent = []; | |
var childVB = containerToCheckIfChild.visibleBounds, | |
childLeft = childVB[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
var subLayers = app.activeDocument.layers.getByName("parent").pageItems; | |
var smallestParentArea = 10000000; | |
var smallestChild = "this is the first smallest child found"; | |
var parentSmallest = []; | |
//loop through all sublayers to find children | |
for(var i = 0; i < subLayers.length; i++){ | |
var smallestChild, | |
childContainer = subLayers[i], |
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
// objects and methods | |
function Container(theChild){ | |
this.value = theChild; // reference to single child container | |
this.symbolItems = []; //array of symbols | |
this.parent = []; | |
} | |
//$.writeln(mySymbolContainer.parent); |
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
#target illustrator | |
function init(){ | |
// @include lukaszLibrary.jsx | |
// objects and methods | |
function Container(theChild){ | |
this.value = theChild; // reference to single child container | |
this.symbolItems = []; //array of symbols | |
this.parent = []; |
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
width,height,top,left,name,parent container,type,color,text size(px),alignment,font name,font style,date/time exported | |
255,255,,,,Canvas | |
11,11,27.6220703125,3.60205078125,undefined.png, top left green of lime parent,image,,,,,,dateTime | |
,15,20,7.54443359375,9.3076171875,undefined.png, top left green of lime parent,image,,,,,,dateTime | |
11,11,3.7939453125,6.29443359375,undefined.png, orange footer,image,,,,,,dateTime | |
11,11,27.6220703125,3.60205078125,undefined.png, - parent inner,image,,,,,,dateTime | |
,15,20,7.54443359375,9.3076171875,undefined.png, - parent inner,image,,,,,,dateTime |
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 getAllTextItems(){ | |
var doc = app.activeDocument; | |
for(var j = 0; j < doc.textFrames.length; j++){ | |
var currentTextItem = doc.textFrames[j]; | |
// loop through all the symbols to check if it is in the div | |
for(var i = 0; i < allParentsOfSymbols.length; i++){ | |
var container = allParentsOfSymbols[i]; | |
if(textIsIn(currentTextItem, container)) { | |
var left = Math.round(currentTextItem.anchor[0]), | |
top = Math.round(currentTextItem.anchor[1]), |
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
<?php | |
//######################################################## | |
// edit custom columns display for back-end | |
//######################################################## | |
// ADDING CUSTOM POST TYPE | |
add_filter( 'manage_posts_columns', 'fb_AddThumbColumn' ); | |
add_action( 'manage_posts_custom_column', 'fb_AddThumbValue', 10, 2 ); |