Update readme
This commit is contained in:
parent
902bfe950e
commit
9dffd4baf5
15
README.md
15
README.md
|
@ -1,2 +1,13 @@
|
||||||
# share-to-mastodon
|
# Share to Mastodon
|
||||||
Browser extension for sharing links to a Mastodon server
|
|
||||||
|
Share to Mastodon is a browser extension for quickly sharing links and tabs to the [Mastodon social network](https://joinmastodon.org/). You can click the Mastodon button in the top bar (or the keyboard shortcut) to share the current tab, or right-click a link on any page. You can also select text and pick Mastodon in the context (right-click) menu to share a snippet.
|
||||||
|
|
||||||
|
The extension displays a popup window, where you can edit the pre-filled message, and then publish to your account. It works with any Mastodon server, and it uses the share dialog hosted by the selected server, so no API access is required.
|
||||||
|
|
||||||
|
**Download for Chrome (WIP)**
|
||||||
|
|
||||||
|
**Download for Microsoft Edge (WIP)**
|
||||||
|
|
||||||
|
(Firefox support is [blocked](https://github.com/corbindavenport/share-to-mastodon/issues/1) by limited Manifest V3 support)
|
||||||
|
|
||||||
|
![Screenshot of extension in Google Chrome](https://i.imgur.com/vKexj06.png)
|
|
@ -47,8 +47,8 @@ function createPopup(serverDomain, shareLink, shareText, tab) {
|
||||||
var popupPage = 'https://' + serverDomain + '/share?text=' + encodeURIComponent(shareText + '\n\n' + shareLink)
|
var popupPage = 'https://' + serverDomain + '/share?text=' + encodeURIComponent(shareText + '\n\n' + shareLink)
|
||||||
var popupWidth = 500
|
var popupWidth = 500
|
||||||
var popupHeight = 500
|
var popupHeight = 500
|
||||||
var y = Math.round(tab.height / 2 - (popupHeight / 2))
|
var y = Math.round((tab.height / 2) - (popupHeight / 2))
|
||||||
var x = Math.round(tab.width / 2 - (popupWidth / 2))
|
var x = Math.round((tab.width / 2) - (popupWidth / 2))
|
||||||
console.log(popupWidth, popupHeight, y, x)
|
console.log(popupWidth, popupHeight, y, x)
|
||||||
chrome.windows.create({
|
chrome.windows.create({
|
||||||
url: popupPage,
|
url: popupPage,
|
||||||
|
|
Loading…
Reference in New Issue