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
// rulerはpx指定にしておく | |
// 指定したフォルダ内にあるxhdpiのサイズのpng,jpgを | |
// mdpi, hdpi, xhdpiそれぞれにサイズを適宜縮小して入れる。 | |
// .9.pngという名前の付いたpngファイルは一度9patchの線の枠を取ってから | |
// 再び9patchの枠を付け直す。 | |
// vim:set ft=javascript: | |
#target photoshop | |
var MIDDLE = "mdpi", HIGH = "hdpi", XTRA_HIGH = "xhdpi"; |
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 () { | |
var id = (function () { | |
var i, l, q, div, el, qs; | |
el = document.getElementsByTagName('SCRIPT'); | |
el = el[el.length-1]; | |
qs = el.src.split('?').pop().split('&'); | |
l = qs.length; | |
for (i=0; i<l; i++) { | |
q = qs[i].split('='); | |
if (q[0]=='id') { |