-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.js
More file actions
22 lines (22 loc) · 779 Bytes
/
Copy pathcode.js
File metadata and controls
22 lines (22 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
figma.showUI(__html__);
figma.ui.resize(172, 180);
//var testdata = '123';
//localStorage.setItem("object", testdata);
figma.ui.onmessage = msg => {
let special_symbols = " ⟶ ";
figma.currentPage.selection.forEach(node => {
if (node.type == 'FRAME') {
if (msg.type === 'change-status') {
if (node.name.indexOf(special_symbols) != -1) {
node.name = node.name.split(special_symbols)[1];
}
node.name = msg.buttonName + special_symbols + node.name;
}
else {
node.name = node.name.split(special_symbols)[1];
localStorage.getItem("object");
}
node.setRelaunchData({ relaunch: '' });
}
});
};