Remove sharing for images/videos
This commit is contained in:
parent
ee924b97b5
commit
915e0fe189
|
@ -4,7 +4,7 @@ chrome.runtime.onInstalled.addListener(function (details) {
|
||||||
chrome.contextMenus.create({
|
chrome.contextMenus.create({
|
||||||
id: "share-to-mastodon",
|
id: "share-to-mastodon",
|
||||||
title: 'Share to Mastodon',
|
title: 'Share to Mastodon',
|
||||||
contexts: ['selection', 'link', 'image', 'video', 'page']
|
contexts: ['selection', 'link', 'page']
|
||||||
})
|
})
|
||||||
// Show welcome message
|
// Show welcome message
|
||||||
if (details.reason === 'install' || details.reason === 'update') {
|
if (details.reason === 'install' || details.reason === 'update') {
|
||||||
|
@ -78,10 +78,7 @@ chrome.contextMenus.onClicked.addListener(async function (info, tab) {
|
||||||
// Set link and description
|
// Set link and description
|
||||||
var shareLink = ''
|
var shareLink = ''
|
||||||
var shareText = ''
|
var shareText = ''
|
||||||
if (info.mediaType) {
|
if (info.linkUrl) {
|
||||||
shareLink = info.srcUrl
|
|
||||||
shareText = tab.title
|
|
||||||
} else if (info.linkUrl) {
|
|
||||||
shareLink = info.linkUrl
|
shareLink = info.linkUrl
|
||||||
shareText = 'Type something here'
|
shareText = 'Type something here'
|
||||||
} else if (info.selectionText) {
|
} else if (info.selectionText) {
|
||||||
|
|
Loading…
Reference in New Issue