1
0
mirror of https://github.com/gamaio/lobli.git synced 2024-12-22 19:52:40 +00:00

Create the context menu when chrome starts.

This should fix a bug I've been experiencing where the context menu would not exist until I uninstall the extension and install it again from the chrome webstore
This commit is contained in:
David Todd 2014-12-09 14:38:55 -06:00
parent 26faf57b8b
commit 371b00f452
No known key found for this signature in database
GPG Key ID: 48E847F18074C953

View File

@ -13,3 +13,8 @@ chrome.runtime.onInstalled.addListener(function() {
chrome.contextMenus.create({"title": "Shorten link to this file with lob.li", "contexts": ["image", "video", "audio"], "id": "shortenFile"});
chrome.contextMenus.create({"title": "Shorten link with lob.li", "contexts": ["link"], "id": "shortenLink"});
});
chrome.runtime.onStartup.addListener(function(){
chrome.contextMenus.create({"title": "Shorten link to this file with lob.li", "contexts": ["image", "video", "audio"], "id": "shortenFile"});
chrome.contextMenus.create({"title": "Shorten link with lob.li", "contexts": ["link"], "id": "shortenLink"});
});