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
text: 4 | 4 | 4 | |
code: <div class="four"> </div> <div class="four"> </div> <div class="four"> </div> | |
text: 3 | 3 | 3 | 3 | |
code: <div class="three"> </div> <div class="three"> </div> <div class="three"> </div> <div class="three"> </div> | |
text: 2 | 2 | 2 | 6 | |
code: <div class="two"> </div> <div class="two"> </div> <div class="two"> </div> <div class="six"> | |
text: 3 | 2 | 4 | 3 |
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
data:text/html;charset=utf-8, <title>Writability</title><body OnLoad='document.body.focus();' contenteditable style="font-size:21px;line-height:1.6;font-family:'Chaparral Pro',Georgia;max-width:21em;margin:0 auto;padding:3rem;background-color:rgb(233,233,225);color:rgb(68,68,68);" spellcheck="false"> |
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
document.getElementsByTagName("body")[0].innerHTML="<div id='qrcode' style='position:absolute; top:0; left:0; z-index:99993; width:550px; height:550px;background-color:#fff; padding:49px; border:1px solid #ccc'><img src='http://chart.apis.google.com/chart?cht=qr&chs=500x500&choe=UTF-8&chld=H&chl="+window.location+"' /></div>" |
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
$("body").append("<div id='qrcode' style='position:absolute; top:0; left:0; z-index:99993; width:550px; height:550px;background-color:#fff; padding:49px; border:1px solid #ccc'><img src='http://chart.apis.google.com/chart?cht=qr&chs=500x500&choe=UTF-8&chld=H&chl="+window.location+"' /></div>"); |
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 layerNum = app.activeDocument.layers.length; | |
prompt("Layers Number:", layerNum); |
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 layerNum = app.activeDocument.layers.length; | |
var a = []; | |
for (var i = 0; i < layerNum; i++) { | |
a[i] = '"' + app.activeDocument.layers[i].name + '"'; | |
} | |
prompt("Layers Names:", a); |
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 layers = activeDocument.layers; | |
var layersArray = []; | |
var len = layers.length; | |
// store all layers in an array | |
for (var i = 0; i < len; i++) { | |
layersArray.push(layers[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
var layerNum = app.activeDocument.layers.length; | |
var arr = []; | |
for (var i = 0; i < layerNum; i++) { | |
arr[i] = '"'+app.activeDocument.layers[i].name+'"'; | |
} | |
// taken from: http://stackoverflow.com/questions/840781/easiest-way-to-find-duplicate-values-in-a-javascript-array | |
var sorted_arr = arr.sort(); // You can define the comparing function here. |
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 doc = app.activeDocument; | |
var guides = app.activeDocument.guides; | |
var w = doc.width; | |
var h = doc.height; | |
function MakeGuidesGrid(numVerticalGuides, gutterVertical, numHorisontalGuides, gutterHorisontal) { | |
if (numHorisontalGuides !== 0) { | |
var j = h / numHorisontalGuides; | |
for (var i = 0; i < numHorisontalGuides; i++) { | |
guides.add(Direction.HORIZONTAL, j * 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
var doc = app.activeDocument; | |
var guides = app.activeDocument.guides; | |
var w = doc.width; | |
var h = doc.height; | |
function MakeGuidesGrid(unitVertical, gutterVertical, unitHorisontal, gutterHorisontal) { | |
if (unitHorisontal !== 0) { | |
var j = h / unitHorisontal; | |
for (var i = 0; i < j; i++) { | |
guides.add(Direction.HORIZONTAL, i * unitHorisontal); |
NewerOlder