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
| <?xml version="1.0" encoding="utf-8"?> | |
| <!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> | |
| <svg version="1.1" id="Arrow_1_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" | |
| viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> | |
| <rect id="_x3C_BG_x3E_" fill="none" width="24" height="24"/> | |
| <g id="_x3C_Path_x3E_"> | |
| <path d="M5.68,23.96c-0.49,0-0.97-0.2-1.32-0.6c-0.64-0.73-0.57-1.83,0.16-2.47L14.66,12L4.52,3.11C3.8,2.47,3.72,1.36,4.36,0.64 | |
| C5-0.09,6.1-0.16,6.83,0.48L19.97,12L6.83,23.52C6.5,23.81,6.09,23.96,5.68,23.96z"/> | |
| </g> | |
| </svg> |
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
| var kinoJoined = false | |
| client.on('join', (channel, username, self) => { | |
| if(username == 'kinotheproducer'){ | |
| kinoJoined = true | |
| } | |
| }) | |
| client.on('message', (channel, userstate, message, self) => { | |
| if (self) return |
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
| const arrayOfDads = ['lcfinch','kinotheproducer','iplayforcharity'] | |
| client.on('message', (channel, userstate, message, self) => { | |
| if (self) return | |
| if ( | |
| arrayOfDads.indexOf(userstate.username) > -1){ | |
| client.say(channel, 'Hey Dad') | |
| arrayOfDads.splice(arrayOfDads.indexOf(userstate.username)) | |
| } | |
| } |
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
| const developerColorNames = [ | |
| "shadowColor", | |
| "labelColor", | |
| "secondaryLabelColor", | |
| "tertiaryLabelColor", | |
| "quaternaryLabelColor", | |
| "systemRedColor", | |
| "systemGreenColor", | |
| "systemBlueColor", | |
| "systemOrangeColor", |
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
| var sketch = require("sketch"); | |
| var SharedStyle = require('sketch/dom').SharedStyle | |
| var Style = require('sketch/dom').Style | |
| var document =sketch.getSelectedDocument() | |
| function getSharedStyles(type) { | |
| var myStyles = [] | |
| if (sketch.version.sketch < 52) { | |
| var styles = (type == 0) ? MSDocument.currentDocument().documentData().layerStyles().objects() : MSDocument.currentDocument().documentData().layerTextStyles().objects(); | |
| } else { |
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
| var sketch = require('sketch') | |
| var Document = require('sketch/dom').Document | |
| var document = Document.getSelectedDocument() | |
| var texts = [] | |
| var paints = [] | |
| var output = {} | |
| //Sketch's document.getTextStyles() doesn't return all the info. |
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
| { | |
| "gradientDark010": "linear-gradient(90deg, rgba(48, 49, 49, 0) 0%, rgba(48, 49, 49, 1) 100%)", | |
| "gradientLight010": "linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%)", | |
| "overlayDark010": "rgba(48, 49, 49, 0.2)", | |
| "overlayDark020": "rgba(48, 49, 49, 0.4)", | |
| "overlayDark030": "rgba(48, 49, 49, 0.6)", | |
| "overlayDark040": "rgba(48, 49, 49, 0.8)", | |
| "overlayDark110": "rgba(48, 49, 49, 0.2)", | |
| "overlayDark120": "rgba(48, 49, 49, 0.4)", | |
| "overlayDark130": "rgba(48, 49, 49, 0.6)", |
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
| var doc = context.document | |
| var Text = require('sketch/dom').Text | |
| var page = MSDocument.currentDocument().currentPage(); | |
| var fontFamilies = ['Monaco','Helvetica-Black'] | |
| fontFamilies.forEach(fam => {console.log(getCropsForFontFamily(fam))}) |
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 splitWords(s) { | |
| var re, match, output = []; | |
| // re = /[A-Z]?[a-z]+/g | |
| re = /([A-Za-z]?)([a-z]+)/g; | |
| match = re.exec(s); | |
| while (match) { | |
| output.push([match[1].toUpperCase(), match[2]].join("")); | |
| match = re.exec(s); | |
| } |
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
| let sel = context.selection | |
| sel.forEach(layer => { | |
| layer.frame = layer.parentArtboard().frame() | |
| if(layer.class() == 'MSTextLayer'){ | |
| let txt = layer.stringValue() | |
| layer.stringValue = 'T' | |
| layer.frame().y = layer.frame().y() - (layer.pathInFrame().bounds().origin.y - layer.frame().y()) | |
| layer.stringValue = txt | |
| } |
OlderNewer