better organization, add in eslint as well as package and other helper bookmarklets found on confluence to have here if needed as a reference

This commit is contained in:
Greg Jacobs
2024-06-01 18:12:05 -04:00
parent 21397c5827
commit 1e4c307f97
14 changed files with 132 additions and 13 deletions

View File

@@ -0,0 +1,21 @@
/**
* This JavaScript function takes a string, decodes it using decodeURIComponent,
* alerts the decoded string, and copies the result to the clipboard.
*
* The function works as follows:
* 1. Takes a string as input.
* 2. Decodes the string using decodeURIComponent.
* 3. Alerts the decoded string.
* 4. Copies the decoded string to the clipboard.
*
* Note: This function uses the Clipboard API which might not be fully supported in all browsers.
*/
javascript:(function() {
let answer = prompt("Enter the HashID");
let decodedStr = decodeURIComponent(answer);
alert(decodedStr);
navigator.clipboard.writeText(decodedStr)
.then(() => console.log('Decoded string copied to clipboard'))
.catch(err => console.error('Error in copying decoded string to clipboard: ', err));
})();