You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.3 KiB
54 lines
1.3 KiB
// load interface
|
|
var CSI = new CSInterface();
|
|
/*
|
|
// Example: Saving a variable to a file
|
|
var settings = { "theme": "dark", "lastFolder": "/path" };
|
|
path="./settings.json"
|
|
window.cep.fs.writeFile(path, JSON.stringify(settings));
|
|
*/
|
|
|
|
|
|
//define buttons
|
|
|
|
var plus1BTN = document.querySelector("#plus1BTN");
|
|
var tagWipBTN = document.querySelector("#tagWipBTN");
|
|
var collectBTN = document.querySelector("#collectBTN");
|
|
var tagDoneBTN = document.querySelector("#tagDoneBTN");
|
|
var yFlatBTN = document.querySelector("#yFlatBTN");
|
|
|
|
|
|
|
|
//add listeners
|
|
minus1BTN.addEventListener("click", minus1);
|
|
plus1BTN.addEventListener("click", plus1);
|
|
tagWipBTN.addEventListener("click", tagWip);
|
|
collectBTN.addEventListener("click", collect);
|
|
tagDoneBTN.addEventListener("click", tagDone);
|
|
ySetStrBTN.addEventListener("click", ySetStr);
|
|
yFlatBTN.addEventListener("click", yFlat);
|
|
|
|
//jsx wrappers
|
|
function minus1() {
|
|
CSI.evalScript("minus1()");
|
|
}
|
|
function plus1() {
|
|
CSI.evalScript("plus1()");
|
|
}
|
|
function tagWip() {
|
|
CSI.evalScript("tagWip()");
|
|
}
|
|
|
|
function collect() {
|
|
CSI.evalScript("collect()");
|
|
}
|
|
|
|
function tagDone() {
|
|
CSI.evalScript("tagDone()");
|
|
}
|
|
function ySetStr() {
|
|
CSI.evalScript("ySetProject()");
|
|
}
|
|
function yFlat() {
|
|
CSI.evalScript("yFlattenSelectedFolderContents()");
|
|
}
|