-
Notifications
You must be signed in to change notification settings - Fork 40
Plugins
Plugins extend the Password-Manager frontend UI.
v11.08 uses a static frontend. Plugins are loaded from password.html.
Do not follow old plugin instructions that mention editing password.php; that file is not part of the current frontend.
Current plugin files live under:
src/frontend/js/plugins/
Bundled plugins include:
linkbutton.js
tags.js
passwordage.js
keyboardshortcuts.js
passwordhistory.js
The plugin framework is:
src/frontend/js/plugin.js
The password page loads plugins in:
src/frontend/password.html
- Put your plugin file under:
src/frontend/js/plugins/
Example:
src/frontend/js/plugins/myplugin.js
- Add a script tag in
src/frontend/password.html.
Place it after:
<script src="js/plugin.js"></script>
<script src="js/main.js"></script>Example:
<script src="js/plugins/myplugin.js"></script>-
Redeploy the frontend.
-
Clear browser cache or hard-refresh.
Remove or comment out the corresponding <script> tag in:
src/frontend/password.html
Then redeploy the frontend and clear browser cache.
The current plugin framework initializes these hooks:
preDataReady
dataReady
layoutReady
readField
readAccount
drawAccount
accountsReady
fieldsReady
editAccountDialog
showDetails
addAccountPreSend
updateAccountPreSend
logout
preLogout
Example:
registerPlugin("showDetails", function (data) {
console.log(data.account);
console.log(data.out);
});A hook can return a promise. The plugin framework waits for registered hook callbacks through Promise.all.
Examples:
registerPlugin("fieldsReady", function (data) {
console.log(data.fields);
console.log(data.accounts);
});registerPlugin("drawAccount", function (data) {
const account = data.account;
const row = data.row;
console.log(account, row);
});registerPlugin("editAccountDialog", function (data) {
console.log(data.account);
});Plugins run in the same browser context as Password-Manager.
A malicious plugin can compromise saved passwords after decryption.
Only install plugins you trust and review. Protect the static frontend host where plugins are deployed.