Browse Source

Add hamsket.parseIntOrZero to the service API.

pull/3202/head
TheGoddessInari 5 years ago
parent
commit
d742e93cfa
No known key found for this signature in database
GPG Key ID: 1209B1B7632D69A
  1. 5
      resources/js/hamsket-service-api.js

5
resources/js/hamsket-service-api.js

@ -39,6 +39,11 @@ window.hamsket.clearUnreadCount = function() {
ipcRenderer.sendToHost('hamsket.clearUnreadCount');
}
window.hamsket.parseIntOrZero = function (n) {
const result = parseInt(n, 10);
return isNaN(result) ? 0 : result;
};
contextMenu({
window: remote.getCurrentWebContents(),
showCopyImageAddress: true,

Loading…
Cancel
Save