This file contains hidden or 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
font-family: {{ custom_sans_font }}, ui-sans-serif, system-ui, -system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; | |
font-family: {{ custom_serif_font }}, Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; | |
font-family: {{ custom_mono_font }}, ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; |
This file contains hidden or 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
init(); | |
funtion init() { | |
var layerID, pngPath, pngFile, pngData64, pngBase64Image; | |
layerID = app.activeDocument.activeLayer.id; | |
pngPath = new File(Folder.temp + "/" + layerID).fsName; | |
writeLayerPNGfile(pngPath); |
This file contains hidden or 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
// JSON | |
var result = [...document.querySelectorAll('.n-snippet-cell2')].map(el => { | |
let item = {} | |
item.title = el.querySelector('.n-snippet-cell2__title').innerText; // Получить текст элемента | |
item.img = el.querySelector('img.image').src; // Получить адрес у картинки | |
// item.bg = el.querySelector('...').style.backgroundImage.replace(/url\(['"]?(.+?)['"]?\)/, '$1'); // Получить адрес фонового изображения | |
return item; | |
}) | |
console.log( |
This file contains hidden or 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 getFillColor() { | |
var ref = new ActionReference(); | |
ref.putEnumerated(stringIDToTypeID("contentLayer"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt")); | |
var color = executeActionGet(ref).getList(charIDToTypeID("Adjs")).getObjectValue(0).getObjectValue(charIDToTypeID('Clr ')); | |
return [color.getDouble(charIDToTypeID('Rd ')), color.getDouble(charIDToTypeID('Grn ')), color.getDouble(charIDToTypeID('Bl '))]; | |
} |
This file contains hidden or 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 getLayersCount() { | |
var ref = new ActionReference(); | |
ref.putProperty (stringIDToTypeID ("property"), charIDToTypeID('NmbL')) | |
ref.putEnumerated(charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt')); | |
var count = executeActionGet(ref).getInteger(charIDToTypeID('NmbL')); | |
return count | |
} |
This file contains hidden or 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
// x, y, width, height | |
// x & y position from top left corner of document | |
// width & height of selection | |
// | |
// makeSelection(10,50,200,100); | |
function makeSelection(x,y,sw,sh){ | |
app.activeDocument.selection.select([ [x,y], [x,y+sh], [x+sw,y+sh], [x+sw,y] ]); | |
} |