ShareMatrixBookmarklet/README.md

22 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2024-03-26 15:42:50 -04:00
# Share on Matrix bookmarklet
2024-03-26 15:59:27 -04:00
## The Bookmarklet Code
2024-03-26 15:58:01 -04:00
2024-03-26 15:59:45 -04:00
Name: Share on Matrix
2024-03-26 15:59:27 -04:00
Code:
2024-03-26 15:42:50 -04:00
```javascript
javascript:(function() { window.open('https://matrix.gvid.tv/submit/link?title=' + encodeURIComponent(document.title) + '&url=' + encodeURIComponent(document.URL), '_blank'); })();
2024-03-26 15:58:01 -04:00
```
## Extention
2024-03-26 15:58:39 -04:00
I've 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.
2024-03-26 15:58:01 -04:00
[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.