Add extension link to README

This commit is contained in:
x0x7 2024-03-26 15:58:01 -04:00
parent 681ace0565
commit 6899c455d2
1 changed files with 15 additions and 1 deletions

View File

@ -1,6 +1,20 @@
# Share on Matrix bookmarklet
## The Code
```javascript
javascript:(function() { window.open('https://matrix.gvid.tv/submit/link?title=' + encodeURIComponent(document.title) + '&url=' + encodeURIComponent(document.URL), '_blank'); })();
```
```
## Extention
I'v converted the bookmarklet into an extension for Chrome browsers because personally I do not use a bookmark bar but I do have some pinned extensions, so this fits into my browser UI nicer.
[Link to the extension](https://lab.gvid.tv/x0x7/ShareMatrixBookmarklet/raw/branch/main/ShareOnMatrix.zip/ShareOnMatrix.zip)
The extension is in the format of a zip. To use it simply unzip it. Navigate to "Manage Extensions" in Chrome. Turn on developer mode (slide toggle). And then click the button "Load unpacked extension". Select the folder of the extension and open it. At that point the extention is loaded. Then if you pin the extension you should have a small icon that when clicked will share your current page with matrix.
To make the extension I used this tool: https://sandbox.self.li/bookmarklet-to-extension/
I've read the extension content. It's pretty consise and there isn't any funny business I can find. It's just two JS files, one of them being the bookmarklet above.