feat(vault): added vault script

This commit is contained in:
Tigor Hutasuhut 2022-10-11 19:38:17 +07:00
parent 3a744e2c54
commit 82b0edc88b
3 changed files with 63 additions and 0 deletions

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License Copyright (c) 2022 Tigor Hutasuhut
Permission is hereby granted,
free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice
(including the next paragraph) shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

19
package.json Normal file
View File

@ -0,0 +1,19 @@
{
"name": "y",
"version": "1.0.0",
"description": "Violent Monkey scripts to manipulate websites from browser",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "ssh://git@gitlab.tigor.web.id:2222/tigor/userscripts.git"
},
"keywords": [
"violent-monkey",
"userscript"
],
"author": "tigor.hutasuhut@gmail.com",
"license": "MIT"
}

23
vault.js Normal file
View File

@ -0,0 +1,23 @@
// ==UserScript==
// @name Vault Code Mirror expander
// @namespace Vault
// @match https://vault-ha.bareksa.dev/ui/vault/secrets/*
// @grant none
// @require https://cdn.jsdelivr.net/npm/@violentmonkey/dom@2
// @version 1.0
// @author tigor.hutasuhut@gmail.com
// @description Code Mirror code expander
// ==/UserScript==
VM.observe(document.body, () => {
const node = document.querySelector(".container.is-widescreen");
if (node) {
VM.observe(node, () => {
const codeMirror = node.querySelector(".CodeMirror");
if (codeMirror) {
codeMirror.style.height = "70vh";
}
});
return true;
}
});