diff --git a/js/background.js b/js/background.js index 88fd153..c3d86a9 100644 --- a/js/background.js +++ b/js/background.js @@ -4,43 +4,8 @@ const isFirefox = chrome.runtime.getURL('').startsWith('moz-extension://') chrome.runtime.onInstalled.addListener(function (details) { // Show welcome message if (details.reason === 'install' || details.reason === 'update') { - // Set message - const notification = { - type: 'basic', - iconUrl: chrome.runtime.getURL('img/icon_x128.png'), - title: 'Share to Mastodon ' + chrome.runtime.getManifest().version + ' installed!', - message: "Click here to see what's new in this version." - } - // Firefox doesn't support buttons in notifications - if (!isFirefox) { - notification.buttons = [ - { - title: 'Open Settings' - }, - { - title: 'Join Discord' - } - ] - } - // Send notification - chrome.notifications.create(notification, () => { - // Handle notification click - chrome.notifications.onClicked.addListener(function () { - chrome.tabs.create({ url: 'https://blog.corbin.io/post/710160748534530048/share-to-mastodon-20-is-now-available' }) - }) - // Handle notification button clicks - if (!isFirefox) { - chrome.notifications.onButtonClicked.addListener(function (_, buttonIndex) { - if (buttonIndex === 0) { - chrome.runtime.openOptionsPage() - } else if (buttonIndex === 1) { - // Open Discord - chrome.tabs.create({ url: 'https://discord.com/invite/59wfy5cNHw' }) - } - }) - } - }) - } + chrome.tabs.create({ 'url': chrome.runtime.getURL('welcome.html') }); + }; // Initialize context menu createContextMenu() // Migrate data if needed diff --git a/js/welcome.js b/js/welcome.js new file mode 100644 index 0000000..3dbaa71 --- /dev/null +++ b/js/welcome.js @@ -0,0 +1,2 @@ +// Add version number to welcome page +document.querySelector('.version').innerHTML = chrome.runtime.getManifest().version; \ No newline at end of file diff --git a/manifest-firefox.json b/manifest-firefox.json index 52204b0..7288ac3 100644 --- a/manifest-firefox.json +++ b/manifest-firefox.json @@ -28,7 +28,6 @@ "permissions": [ "contextMenus", "storage", - "notifications", "activeTab" ], "browser_specific_settings": { diff --git a/manifest.json b/manifest.json index 5329fa5..299a6c7 100644 --- a/manifest.json +++ b/manifest.json @@ -26,7 +26,6 @@ "permissions": [ "contextMenus", "storage", - "notifications", "activeTab" ], "minimum_chrome_version": "93", diff --git a/settings.html b/settings.html index f2b31a7..40db314 100644 --- a/settings.html +++ b/settings.html @@ -28,34 +28,34 @@
- -
- - -
-
This must be a server running Mastodon, Calckey, Misskey, or another compatible social media platform.
- -
- - -
- - -
- - -
-
- Open about:addons in a new tab, click the settings gear button, then select "Manage extension shortcuts." -
-
-
+ +
+ + +
+
This must be a server running Mastodon, Calckey, Misskey, or another compatible social media platform.
+ +
+ + +
+ + +
+ + +
+
+ Open about:addons in a new tab, click the settings gear button, then select "Manage extension shortcuts." +
+
+

Donate

If you find Share to Mastodon useful, please donate to support continued development. It would mean a lot!

- + diff --git a/welcome.html b/welcome.html new file mode 100644 index 0000000..b9dac69 --- /dev/null +++ b/welcome.html @@ -0,0 +1,63 @@ + + + + + + + + + Share to Mastodon Settings + + + + + +
+ +
+ +
+ +
+
+

How to use Share to Mastodon

+

You can click the Mastodon icon in your browser's toolbar to share the current tab in a Mastodon post. You can also right-click anywhere on the page to share a link to the current tab. If you right-click a link, Share to Mastodon will use that link instead of the current page. If you select some text, then right-click and share to a Mastodon server, the text snippet will be included with the link in the post.

+

Share to Mastodon can save multiple servers in the settings, and give you a list to choose from each time you want to share. The list of servers can be updated from the settings.

+

Share to Mastodon also works with servers running some social media platforms besides Mastodon, such as Calckey and Misskey. Try adding the server and see what happens! You can also add the Elk web client if you use that.

+
+
+

Donate

+

If you find Share to Mastodon useful, please donate to support continued development. It would mean a lot!

+ + + + + + + + + +

Share to Mastodon is developed by Corbin Davenport.

+

Need help?

+

If something isn't working, or if you just want to chat with other Share to Mastodon users, create an issue on GitHub or join the Discord server.

+
+
+ +
+
+ Share to Mastodon uses code from Bootstrap. You can find the source code on GitHub, under the GPL license.
+
+
+ + + + + + \ No newline at end of file