diff --git a/docs/plugins/keewebhttp/manifest.json b/docs/plugins/keewebhttp/manifest.json index b2ae509..548d3d5 100644 --- a/docs/plugins/keewebhttp/manifest.json +++ b/docs/plugins/keewebhttp/manifest.json @@ -1,5 +1,5 @@ { - "version": "0.1.1", + "version": "0.1.2", "manifestVersion": "0.1.0", "name": "keewebhttp", "description": "KeeWebHttp allows to use browser extensions with KeeWeb", @@ -11,8 +11,8 @@ "licence": "MIT", "url": "https://plugins.keeweb.info/plugins/keewebhttp", "resources": { - "js": "B0VspfvXSHdbPi6Ed2aHBgeda/hI6PT063yoFBTSbcFmdLGZpPVsTnqG9+xjvhNDZ3Q0PolGiSIN/gUheJxJZ8CJafZF2RrOKHFFz302S9bEtJ8ZdjU/+0iRUIuB8wKHuSOWwCBEVrIN/ZQo2nRgNIOZBYCamAhqsNTVXv0OdJfhUPA4OsI6ca8RmwA3ejYphB+/X7ue5k3xWVeIkH1onSPJ1qOoj89HKB7FS7/bz6wsi/bluXPC5M0rAPbtYhUQMhZJsjBJ53TnZ6a8uRyzYCbp/a0kxl8jwI6aFYGRHbsRZLIIxYP0Qm31pyToZA/8/JHTmlped+isCWXeFaLIcQ==" + "js": "xRiIO2Y08FN8Qf/U1I+Ab3WI8UWNnRwVXmV5/XlxKDFUQIoWT1sMLP6pW7IrcUuFJ0zDwag+BlJuutnBt42+WgfRWCAZ2qRV5cRBCQYJ3q4W3JvkWSAfoTulgrmJ5C4ofiN9D8FL567+2eg7ni1BDA0sVrfLsA7SFNRfJ3vULKpeFjJHB6ypwO60v4xm1A8S+Cm3qckmvOA3Bp9WD1M8Gj1t9ULHKT9DYq6QG6rxwGWODqHsQRifFRojp73X5PM2j4GV1tEWASRGYCNmwmA7fCNHFmppk4W7ofpENF1/dbXrxDxqQ/unbHTixPp0oy+6R2Clnb3jOEYw6pnp0wxWLg==" }, "publicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0oZB2Kt7AzRFNqf8FuO3C3kepHPAIQYiDPYdQxHcsiaFCwyKVx6K1cE/3vBhb8/2rj+QIIWNfAAuu1Y+2VK90ZBeq6HciukWzQRO/HWhfdy0c7JwDAslmyGI5olj0ZQkNLhkde1MiMxjDPpRhZtdJaryVO5cFJaJESpv3dV6m0qXsaQCluWYOSNfSjP9C8o2zRVjSi3ZQZnZIV5pnk9K2MtlZIPXrN9iJiM5zZ9DTSnqApI6dC9mX4R3LvGN+GTovm9C8Crl+qb106nGRR3LcweicDnPyMtZLa/E0DBpWYxUVLDp6WeLhxoUBr+6+t3Xp9IDnPoANDQXJXD0f1vQxQIDAQAB", "desktop": true -} +} \ No newline at end of file diff --git a/docs/plugins/keewebhttp/plugin.js b/docs/plugins/keewebhttp/plugin.js index 840dc37..be73ad9 100644 --- a/docs/plugins/keewebhttp/plugin.js +++ b/docs/plugins/keewebhttp/plugin.js @@ -1,6 +1,6 @@ let uninstall; let restart; -let ServerPort = 19455; +let serverPort = 19455; const timeout = setTimeout(run, 500); function run() { @@ -97,7 +97,7 @@ function run() { }); } }); - const port = ServerPort; + const port = serverPort; const hostname = '127.0.0.1'; server.listen(port, hostname, () => { if (uninstalled) { @@ -491,25 +491,25 @@ function run() { module.exports.getSettings = function() { return [{ name: 'ServerPort', - label: 'Port to listen to (do not change if you don\'t know what you are doing)', + label: 'Port to listen to (do not change this setting without a special need to do so)', type: 'text', maxlength: 5, - placeholder: 'port KeeWebHttp will listen to (default is 19455)', + placeholder: '19455', value: '19455' - }] -} + }]; +}; module.exports.setSettings = function(changes) { - if(changes["ServerPort"] != undefined) { - var port = parseInt(changes["ServerPort"]); - if (Number.isInteger(port) && port > 1024 && port < 65535) { - ServerPort = port; - if(restart) { + if (changes.ServerPort) { + const port = +changes.ServerPort; + if (port > 1024 && port < 65535) { + serverPort = port; + if (restart) { restart(); } } } -} +}; module.exports.uninstall = function() { if (uninstall) { diff --git a/package.json b/package.json index 1bdf01f..c333a96 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "start": "node scripts/start.js", "update": "node scripts/update-plugins.js", "translations": "node scripts/download-translations.js", - "watch-plugin": "node ../keeweb/plugins/keeweb-plugin/keeweb-plugin.js watch docs/plugins/theme-nord/ --bump-version --signer-module=/Users/Antelle/Projects/keeweb/keeweb-plugins/scripts/sign.js " + "watch-plugin": "node ../keeweb/plugins/keeweb-plugin/keeweb-plugin.js watch docs/plugins/keewebhttp/ --bump-version --signer-module=/Users/Antelle/Projects/keeweb/keeweb-plugins/scripts/sign.js " }, "repository": { "type": "git",