Pin Copy URL extension id
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
"name": "Copy URL",
|
"name": "Copy URL",
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"description": "Copy current URL to clipboard, this extension is installed by Omarchy",
|
"description": "Copy current URL to clipboard, this extension is installed by Omarchy",
|
||||||
|
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxbOMKgGcG20uelP6lx5OnuafGP9gNR1ajzURuQ45tv/Is5sc1tn9ii9PsKxpzDzPL9Z5lAqrTFgEcKHyTJnZXAGOMIruB0odJ0BW6eoQ3rxaQ/fBK2yGN7FZAfygPOWHj+Fdrh2eYQ7Ap92Dmlz8x0ceGyais415KmeevVcPwS7jjHFd1bGBp17cEMOBQcOx/3zCnko1hGtCzSdyZQl3cNMebW/FGvmxlPUMLVfWhysfFUuzxMRRf58+/j0mo/9iKQ0uTuxbQ8+W64OmYOVR87IXYNgbo+hEtORjiQhVg1KzaBx1bZ6clQMv96W/xYy1cIzUA5yI9y7lNr7n9zKijwIDAQAB",
|
||||||
"permissions": ["activeTab", "scripting", "notifications"],
|
"permissions": ["activeTab", "scripting", "notifications"],
|
||||||
"icons": {
|
"icons": {
|
||||||
"16": "icon.png",
|
"16": "icon.png",
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source "$(dirname "${BASH_SOURCE[0]}")/base-test.sh"
|
||||||
|
|
||||||
|
export PATH="$ROOT/bin:$PATH"
|
||||||
|
|
||||||
|
require_command jq
|
||||||
|
require_command node
|
||||||
|
|
||||||
|
copy_url_id=$(node - <<'JS' "$ROOT/default/chromium/extensions/copy-url/manifest.json"
|
||||||
|
const crypto = require('crypto')
|
||||||
|
const fs = require('fs')
|
||||||
|
|
||||||
|
const manifest = JSON.parse(fs.readFileSync(process.argv[2], 'utf8'))
|
||||||
|
const hash = crypto.createHash('sha256').update(Buffer.from(manifest.key, 'base64')).digest()
|
||||||
|
const alphabet = 'abcdefghijklmnop'
|
||||||
|
let id = ''
|
||||||
|
|
||||||
|
for (const byte of hash.subarray(0, 16)) {
|
||||||
|
id += alphabet[byte >> 4]
|
||||||
|
id += alphabet[byte & 0x0f]
|
||||||
|
}
|
||||||
|
|
||||||
|
process.stdout.write(id)
|
||||||
|
JS
|
||||||
|
)
|
||||||
|
|
||||||
|
[[ $copy_url_id == "bgpiichlckmfanooecilcjemknkcpngb" ]] ||
|
||||||
|
fail "copy-url extension manifest has the stable id" "$copy_url_id"
|
||||||
|
pass "copy-url extension manifest has the stable id"
|
||||||
Reference in New Issue
Block a user