Skip to content

Commit 90e91d6

Browse files
committed
cleanup
1 parent ab257fb commit 90e91d6

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

Diff for: Assets/js/checkbox.js

+8-10
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,18 @@ KB.on('dom.ready', function () {
1616
task_id = taskIdElem.value;
1717
}
1818

19+
let link = "";
1920
if (URLRewrite) {
20-
const link = '/MarkdownPlus/Checkbox';
21-
KB.http.postJson(link, {
22-
'task_id': task_id,
23-
'number': e.target.getAttribute('number')
24-
});
21+
link = '/MarkdownPlus/Checkbox';
2522
}
2623
else {
27-
const link = '?controller=CheckboxController&action=toggle&plugin=MarkdownPlus';
28-
KB.http.postJson(link, {
29-
'task_id': task_id,
30-
'number': e.target.getAttribute('number')
31-
});
24+
link = '?controller=CheckboxController&action=toggle&plugin=MarkdownPlus';
3225
}
26+
27+
KB.http.postJson(link, {
28+
'task_id': task_id,
29+
'number': e.target.getAttribute('number')
30+
});
3331
}
3432
}
3533
});

0 commit comments

Comments
 (0)