aboutsummaryrefslogtreecommitdiffstats
path: root/firefox/jp-hash.js
Commit message (Collapse)AuthorAgeFilesLines
* firefox: make undo work.Kaz Kylheku2022-10-251-6/+8
| | | | | | | * firefox/jp-hash.js (jp_hash_edit): Use execCommand to issue insertText actions to edit the object, rather than doing it directly, so that undo integrity is preserved.
* firefox: re-select replaced selection.Kaz Kylheku2022-10-241-1/+5
| | | | | | * firefox/jp-hash.js (jp_hash_edit): After replacing the content of the text object, select that portion of it which replaced the prior selection.
* firefox: feature: JP-Hash selection.Kaz Kylheku2022-10-241-1/+13
| | | | | | | * firefox/jp-hash.js (jp_hash_edit): If there is no selection, the whole input box is replaced with its hash. Oterwise, only the selection is replaced.
* firefox: convert to built-in async SHA256.Kaz Kylheku2022-10-241-105/+11
| | | | | | | | | | | | | * firefox/jp-hash.js (jp_hash): Renamed to async function jp_hash_complete which receives digest as an argument. (jp_hash_start): New async function: initiates SHA256 async operation, returning promise. (jp_hash_sha256): Andrea Griffini's portable synchronous implementation removed. (jphash): New async function: stages the two steps of the hash, and then invokes the continuation. (jp_hash_edit): Switch to async. Assignment of new value is done in continuation.
* New: JP-Hash Firefox extension.Kaz Kylheku2022-10-241-0/+199
Puts a button on the toolbar which will replace the contents of the current input box with its JP-Hash. The Alt-J hot key sequence does the same. * firefox/background.js, * firefox/jp-hash.js: New files. * firefox/jp-hash-32.png, * firefox/jp-hash-48.png, * firefox/jp-hash-96.png: Likewise. * firefox/manifest.json: Likewise.