View manifest.json
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
{ | |
"id": "your_plugin_id", | |
"name": "your_plugin_name", | |
"version": "1.0.0", | |
"main": "index.html", | |
"host": [ | |
{ | |
"app": "ID", | |
"minVersion": "18.5.0" | |
} |
View pdfPageRangeReset.jsx
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
//@targetengine "PDFpageRangeReset" | |
app.addEventListener("afterOpen", myFunc, false); | |
function myFunc(e) { | |
app.pdfExportPreferences.pageRange = "0"; | |
} |
View getMedian.gs
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 getMedianByMonth(tagetYear, targetMonth) { | |
const currentSS = SpreadsheetApp.getActiveSpreadsheet(); | |
const targetSheet = currentSS.getSheetByName(tagetYear); | |
const targetRange = targetSheet.getDataRange(); | |
const tagetValues = targetRange.getValues(); | |
const result = tagetValues.filter(el => el[2] == targetMonth).map(x => x[9]); | |
const median = (ary) => { | |
if (ary.length === 0) { | |
return 0; | |
} |
View mm2inch.js
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 run(input, parameters) { | |
var input = parseFloat(input[0]); | |
return (Math.round(input * 1000 / 254) / 100) + ""; | |
} |
View overrideUpperHalfMasterPageItems.jsx
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
/** | |
* @fileoverview ページ上半分のマスターページアイテムをオーバーライドするスクリプト | |
* @author Yusuke SAEGUSA | |
* @version 0.0.1 | |
*/ | |
var myDoc = app.activeDocument; | |
var pag = myDoc.pages; | |
for (var i = 0, len = pag.length; i < len; i++) { | |
var halfHeight = (pag[i].bounds[2] - pag[i].bounds[0]) / 2; //ページの半分 |
View extractAnnots.js
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 result = []; | |
for (var i = 0; i < numPages; i++) { | |
var annot = getAnnots(i); // ページに含まれる注釈コメント | |
if (!annot) { continue; } // nullが返ることがあるのでFalsyなら飛ばす | |
for (var j = 0, lenAnnot = annot.length; j < lenAnnot; j++) { | |
var myAnnots = []; | |
myAnnots.push("p." + (annot[j].page + 1)); | |
myAnnots.push(annot[j].contents.replace(/\r/g, "<br>")); | |
result.push(myAnnots.join("\t")); // 区切り文字 | |
} |
View AccessYahooAPISample.js
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
if (!String.prototype.surroundQuotes) { | |
String.prototype.surroundQuotes = function(q) { | |
return q + this + q; | |
} | |
} | |
var p = { | |
url: "https://jlp.yahooapis.jp/FuriganaService/V2/furigana", | |
header: { | |
contentType: "application/json", | |
userAgent: "Yahoo AppID: <アプリケーションID>", //ここにClientIDを記述 |
View toggleProofingType.js
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
/** | |
* @fileoverview Toggle between "Dot Gain 15%" and "Working CMYK" for display proofing settings. | |
* @author @Uske_S | |
* @version 0.1.0 | |
*/ | |
var actWin = app.activeWindow; | |
if (actWin.proofingType === ProofingType.CUSTOM) { | |
actWin.proofingType = ProofingType.WORKING_CMYK; | |
} else { |
View BreakTextThread_mod.jsx
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
//DESCRIPTION:Break text thread | |
/* | |
About Script | |
InDesign makes breaking of thread between text frames without otherwise changing the layout surprisingly difficult! | |
With this script, easily break the text thread | |
(a) between selected text frames | |
(b) between all frames in the selected story, | |
(c) throughout the document according to a selected paragraph style (great for dividing a long document into separate stories, one per chapter) |
View disassemblyParenNum.jsx
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
/** | |
* 選択状態のバリデーション | |
*/ | |
if (app.documents.length === 0) myError("NOT_OPENED_DOCUMENT"); | |
if (app.documents[0].selection.length === 0) myError("INVALID_SELECTION"); | |
/** | |
* メイン処理 | |
*/ | |
var doc = app.activeDocument; |
NewerOlder