Analyze-It, Browser Extension, CEH, Google-Music-Search, Google-Open-Storage-Search, Google-Translate-It, Internet Explorer, Look-It-Up, Plurk-It, Share-It, Visual Basic, Wikipedia-Search, Windows

Internet Explorer 11 Context Menu Chooser Application Version 3

Internet Explorer 11 Context Menu Chooser Application Version 3

Internet Explorer 11 Context Menu Chooser Application Version 3

This is an application that allows you to pick and choose which of the many context menu add-ons you would like enabled in your browser. Internet Explorer does not support nested context menus so this I wrote this application to make it easy to enable and disable different menu items you may want to use (instead of separate scripts). The context menu items are broke up into 8 groups: Share-it, Analyze-it, Analyze-it-Scritch, Analyze-it-Viewdns, Plurk-it, Google-it, Look-it-up, and IE-Utility. The IE-Utility menu items are usually located in the Tools menu in the menubar on top which isn’t shown by default (just hit the Alt key and it will pop open temporarily).

There are also a couple of registry tweaks that I included in this application. One that adjusts the size of the thumbnails (on hover) of open applications on the taskbar. And another to give you more New Tab entries. There is also a reset button for the New Tab items you removed and want back. The New Tab functionality is generated automatically based on your browsing (you don’t get actual Speed Dial functionality – Internet Explorer chooses everything you see)

There are a few changes in this new version that should be mentioned. The user interface has changed, the code was ported to be compiled, and there is now a version check that will help keep the application current.

In this version the user interface has been changed to be more convenient. I traded the scripted multi-screen interface for a more basic checkbox based dialog written using WinForms. Its just easier to use having everything in front of you on one dialog while making choices.

The code was ported from jscript/hta to nice modern Visual Basic 14. This should improve application start up time as well as use less memory while running. This compiled version of the application will perform better overall.

The scripting run time has a large overhead and is not maintained by Microsoft as other technologies are. For instance, when scripting a hypertext application the jscript has to target Internet Explorer 4/5 by default. By changing properties on the hta you can target IE8. I would have considered keeping the application scripted if Microsoft ported the hypertext application system to use the Edge or Internet Explorer 11 runtime.

Internet Explorer 11 Context Menu Chooser Application Version Check

Internet Explorer 11 Context Menu Chooser Application Version Check

There is now a version check enabled in the application. This application uses many external tools and features that are completely out of my control. As such, I’ve founds the application needs to be updated more often than other projects I’ve coded. In an effort to keep the application current I enabled a version check that checks weekly in the background that will somewhat automate the process of upgrading. By pressing the “Install new version” button the application will download the updated application in the background (no browser needed) to the Temp folder and start the installer.

The installer has also been tweaked to automatically start the old version uninstaller application (if it detects one) instead of the “do or die” message box that used to pop up. As there is a dependency on .NET 4.5, the installer will detect and start the web installer for the .NET framework as needed (this should only happen in Windows 7 without .NET 4.5).

Why write and maintain this application if Edge is the newest thing? Because desktop users will still prefer Internet Explorer 11 over Edge. Because I can’t see Microsoft having the only browser not running plug-ins. Because its still included in the operating system.

Where is it? Microsoft Internet Explorer 11 is located inside the Windows Accessories folder on the Windows 10 Start Menu. Or you could just click on the symbol in the upper left corner of my application.

 

Download Internet Explorer 11 Context Menu Chooser Application Version 3

Advertisement
Standard
Analyze-It, Browser Extension, Internet Explorer, Javascript, Look-It-Up, Plurk-It, Share-It, Windows

Internet Explorer Context Menu Chooser Application Version 2

Analyze-it menu chooser

Analyze-it menu chooser

With this new version the Analyze-it context menus were updated to the most recent version. Analyze-it contained so many menu items that I had to add a counter to the interface to indicate when there are more than the twenty menu item visible limit. The menu counter is only active for page context (basic context menu the page provides – nothing selected in other words) menu items. I suppose when there are more than twenty selected text context menus I’ll have to add another one; this is good for now. The counter only indicates when you are over the visible limit, it doesn’t prevent you from going over, which helps you fine tune your choices.

Analyze-it context menus

Analyze-it context menus

I had to break out Analyze-it into three logical, domain based sections, making it easier to choose the menu items you would like to use.

Analyze-it-Scritch menu chooser

Analyze-it-Scritch menu chooser

 

Scritch menu items

Scritch menu items

Scritch.org has its own section in the application now, making it easier to discern their tools from the rest.

ViewDNS menu chooser

ViewDNS menu chooser

ViewDNS provides a group of helpful online tools on their site that I have included menu items for in this release. The application is now up to date with my other add-ons hosted in various places. Again, if you are running a tablet exclusively, this application isn’t for you. This application is used with Internet Explorer not Microsoft Edge (the tablet browser included with Windows 10) . If you are on a Surface device and if you use Internet Explorer with your keyboard and mouse – this will give you extra context menus.

ViewDNS menu items

ViewDNS menu items

There is a newer version available – see post here

Standard
Analyze-It, Browser Extension, Google-Music-Search, Google-Open-Storage-Search, Google-Translate-It, Internet Explorer, Javascript, Look-It-Up, Plurk-It, Share-It, Windows

IE11 Menu Addons – New Version – 1 – Happy New Year!

New Internet Explorer 11 Menus Version

 

This release basically fixes a few bugs and adds Google Music Search to the menu. I’ll be using whole numbers from now on on these installers (just makes things easier). I had to remove tumblr from the menu as their format changed (no more sharing with a GET request). Fixed the Fetch and Guess tools to be compliant with their new versions – so they should work properly. The spaces in query bug in Google Open Storage search was fixed – so multi word queries work properly.

Download and Install IE11 Menu Addons for Windows 7, 8, and 8.1

New Version Completed – Read and download from here.

If you’re paranoid about the download – the hash values for the file are listed on the Repo page.

Standard
Browser Extension, Firefox, Javascript, Share-It

Firefox Extension – Share-it 0.6 Context Menu

Share-it provides a context menu that allows the user to share the current page with a number of different websites that allow for link submissions. Share-it currently shares a web page on: facebook, twitter, google plus, linkedin, digg, stumbleupon, tumblr, friendfeed, fark, blinklist, and plurk. There is an options page that will allow the user to turn on or off the menu items they choose to use. Very simple and minimalistic design.

Share-it Context Menu Opened Up In Firefox

Share it Options Dialog Opened Up In Firefox

package.json

{
  "name": "share-it",
  "fullName": "Share-it",
  "id": "jid1-Kl2M45Ix2rhGtA",
  "description": "Adds context menu items to share the current page on a number of websites ",
  "author": "Timothy Tocci - timothytocci.com",
  "homepage": "https://timothytocci.com/",
  "license": "MPL 2.0",
  "version": "0.5"
}

main.js


var cm = require("sdk/context-menu");
var data = require("sdk/self").data;
var tabs = require("sdk/tabs");
var SS = require("simple-storage");

popupPanel = require("panel").Panel({
        height: 500,
        contentURL: data.url("options.html")
    });
popupPanel.port.on("optionsstarted", function () {
	console.log("optionsstarted received");
    popupPanel.port.emit("entrylist", entries);
});
popupPanel.port.on("setActive", function (menu) {
    setActive(menu);
});
popupPanel.port.on("setInactive", function (menu) {
    setInactive(menu);
});
var defaultentries = [
	{
	"menu":"facebook.com",
	"active":1,
	"ustr":"http://www.facebook.com/sharer.php?u={{URL}}&src={{TITLE}}"
	},{
	"menu":"twitter.com",
	"active":1,
	"ustr":"https://twitter.com/share?url={{URL}}&text={{TITLE}}"
	},{
	"menu":"plus.google.com",
	"active":1,
	"ustr":"https://plusone.google.com/_/+1/confirm?hl=en&url={{URL}}"
	},{
	"menu":"linkedin.com",
	"active":1,
	"ustr":"http://www.linkedin.com/cws/share?url={{URL}}"
	},{
	"menu":"digg.com",
	"active":1,
	"ustr":"http://digg.com/submit?url={{URL}}&title={{TITLE}}"
	},{
	"menu":"stumbleupon.com",
	"active":1,
	"ustr":"http://www.stumbleupon.com/submit?url={{URL}}"
	},{
	"menu":"tumblr.com",
	"active":1,
	"ustr":"http://www.tumblr.com/share?v=3&u={{URL}}&t={{TITLE}}"
	},{
	"menu":"friendfeed.com",
	"active":1,
	"ustr":"http://www.friendfeed.com/share?url={{URL}}&title={{TITLE}}"
	},{
	"menu":"fark.com",
	"active":1,
	"ustr":"http://cgi.fark.com/cgi/fark/farkit.pl?u={{URL}}&h={{TITLE}}"
	},{
	"menu":"blinklist.com",
	"active":1,
	"ustr":"http://www.blinklist.com/index.php?Action=Blink/Addblink.php&Url={{URL}}&Title={{TITLE}}"
	},{
	"menu":"plurk.com",
	"active":1,
	"ustr":"http://plurk.com/?qualifier=shares&status={{TITLE}}%20%2D%20{{URL}}"
	},
];
var entries = {};
if (!SS.storage["entries"]) {
	SS.storage["entries"] = JSON.stringify(defaultentries);
}
entries = JSON.parse(SS.storage["entries"]);
function setActive(menu){
	console.log("setActive");
	var elen = entries.length;
	console.log(menu);
	for(i=0;i<elen;i++){
		if(entries[i]["menu"] == menu){
			entries[i]["active"] = 1;
		}
	}
	SS.storage["entries"] = JSON.stringify(entries);
}
function setInactive(menu){
	console.log("setInactive");
	var elen = entries.length;
	console.log(menu);
	for(i=0;i<elen;i++){
		if(entries[i]["menu"] == menu){
			entries[i]["active"] = 0;
		}
	}
	SS.storage["entries"] = JSON.stringify(entries);
}
var mitems = [];
var entlen = entries.length;
for (i=0;i<entlen;i++){ 	if(entries[i]["active"] == 1){ 		mitems.push(cm.Item({ label: entries[i]["menu"], data: entries[i]["ustr"] })); 	} } mitems.push(cm.Separator()); mitems.push(cm.Item({ label: "Options", data: "{{OPTIONS}}" })); cm.Menu({   label: "Share-it",   contentScriptFile: data.url("menuscript.js"),   items: mitems,   onMessage: function(data) {sendit(data);} }); function sendit(data){ 	if(data.lastIndexOf("{{OPTIONS}}")!==-1){ 		popupPanel.show(); 	}else{ 		var url = data; 		url = url.replace("{{URL}}", encodeURI(tabs.activeTab.url)); 		if(data.lastIndexOf("{{TITLE}}")>0){
			url = url.replace("{{TITLE}}", encodeURIComponent(tabs.activeTab.title));
		}
		tabs.open({
			url: url,
			onReady: function onReady(tab) {
				console.log(tab.title);
			}
		});
	}
}

options.html


<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Share-it Options</title>
</head>
<style>
.green{color:green;}
.red{color:red;}
li{list-style-type: none;}
</style>
<body>
<h3>Share-it Context Menu Options</h3>
<ul id="menu">
</ul>
<div class="summary">Changes will take place the next time you start your browser. 
Or if you don't want to close the browser you could disable and reenable the Extension on the Plug-ins page.</div>
<p>Click anywhere outside this window to close it.</p>
</body>
<script type="text/javascript">
window.onload = function () {
	addon.port.emit("optionsstarted");
	var list = document.getElementById("menu");
	addon.port.on("entrylist", function (ckb) {
		for(i = 0; i < ckb.length; i++){
			if(ckb[i]["active"] == 1){
				var li = document.createElement("li");
				cbox = document.createElement("input");
				cbox.type = "checkbox";
				cbox.setAttribute("class","butt");
				cbox.checked = true;
				cbox.value = ckb[i]["menu"];
				var txtspan = document.createElement("span");
				txtspan.setAttribute("class","green");
				var mtxt = document.createTextNode(ckb[i]["menu"]);
				txtspan.appendChild(mtxt);
				li.appendChild(cbox);
				li.appendChild(txtspan);
				list.appendChild(li);
			}else{
				var li = document.createElement("li");
				cbox = document.createElement("input");
				cbox.type = "checkbox";
				cbox.setAttribute("class","butt");
				cbox.checked = false;
				cbox.value = ckb[i]["menu"];
				var txtspan = document.createElement("span");
				txtspan.setAttribute("class","red");
				var mtxt = document.createTextNode(ckb[i]["menu"]);
				txtspan.appendChild(mtxt);
				li.appendChild(cbox);
				li.appendChild(txtspan);
				list.appendChild(li);
			}
		}	
		as = document.getElementsByClassName("butt");
		for(i=0;i<as.length;i++){
			as[i].addEventListener("click",function(evt){
				if(evt.target.checked == true){
					addon.port.emit("setActive",evt.target.value);
				}else{
					addon.port.emit("setInactive",evt.target.value);
				}
			},false)
		}
	});
}
</script>
</html>

Click to Install Most Recent Version

Standard
Browser Extension, Google Chrome, Javascript, Opera, Share-It

Google Chrome Extension Share-it New Feature Update – An Options Page

The Google Chrome extension Share-it now has an Options page that enables you to choose which menu items are visible. Users simply can check which menu items to use and which to hide on the options page instead of navigating a menu of irrelevant menu items that they do not use. Preferences in an add-on are stored within the localstorage object in the browser in order to persist across start ups and closings. Developing an options page for your add-on isn’t a very difficult task, however, there are a couple of coding issues  to be aware of.

Share-it context menu running in Google Chrome

Share-it Context Menu

Share-it context menu options page running in Google Chrome

Share-it Options Page

Opera Next Is In The Loop

Something else to note is that I now also test Share-it on Opera Next where it runs superbly. I plan on eventually submitting this to the Opera store for consumption . For now, however, there is a link to download the .nex file at the bottom of this post if you want to use in now. Opera Next is based on the open source Chromium browser which Google Chrome is also based on. The context menu API is basically the same throughout as it allows for a shared code-base for context menu add-on development.

Share-it Context Menu running on Opera Next

Share-it Context Menu running on Opera Next

Caveats Developing an Options page or Popup page

There are a couple of tricky issues you should keep in mind if you are developing an options page for your add-on. First relates to scripting in pages inside of your add-on. There can be no inline script in your pages. Just keep your JavaScript in a separate file and make sure you are careful with your scripting not to create any inline script. Usually this means listening for click events and handling them using the event itself (similar to the way you would do it with Actionscript and Flex if you’ve ever done any Flash coding). The second issue relates to message and object passing. The JavaScript executing in your page isn’t in global scope for security reasons. There’s a special function to call, chrome.extension.getBackgroundPage(), that you have to call in order to gain access to the background page (app.js in this add-on). If you run into problems developing your page you should inspect the running page itself. The generated background page inspector will not show errors for secondary parts of the add-on (remember, not in global scope). Check out the source code below if you’re curious.

Source Code:

manifest.json

{
  "name": "Share-it",
  "description": "Adds context menu items to share the current page on a number of websites",
  "version": "0.4",
  "permissions": ["contextMenus"],
  "background": {
    "scripts": ["app.js"]
  },
  "options_page": "options.html",
  "icons" : {
		"16" : "favicon.ico",
		"32" : "peopleicon32.png",
		"48" : "peopleicon48.png",
		"128" : "peopleicon128.png"
	},
  "manifest_version": 2
}

app.js

/** app.js */
var defaultentries = [
	{
	"menu":"facebook.com",
	"active":1
	},{
	"menu":"twitter.com",
	"active":1
	},{
	"menu":"plus.google.com",
	"active":1
	},{
	"menu":"linkedin.com",
	"active":1
	},{
	"menu":"digg.com",
	"active":1
	},{
	"menu":"stumbleupon.com",
	"active":1
	},{
	"menu":"tumblr.com",
	"active":1
	},{
	"menu":"friendfeed.com",
	"active":1
	},{
	"menu":"fark.com",
	"active":1
	},{
	"menu":"blinklist.com",
	"active":1
	},{
	"menu":"plurk.com",
	"active":1
	},
];
var entries = {};
if (!localStorage.getItem("entries")) {
	localStorage.setItem("entries", JSON.stringify(defaultentries));
}
entries = JSON.parse(localStorage.getItem("entries"));
function isActive(menu){
	console.log("isActive");
	var elen = entries.length;
	console.assert(!elen == 0);
	for(i=0;i<elen;i++){
		if(entries[i]["menu"] == menu){
			console.log(entries[i]["menu"]);
			if(entries[i]["active"] == 1){
				return true;
			}else{
				return false;
			}
		}
	}
}
function setActive(menu){
	console.log("setActive");
	var elen = entries.length;
	console.log(menu);
	console.assert(!elen == 0);
	for(i=0;i<elen;i++){
		if(entries[i]["menu"] == menu){
			entries[i]["active"] = 1;
		}
	}
	localStorage.setItem("entries", JSON.stringify(entries));
}
function setInactive(menu){
	console.log("setInactive");
	var elen = entries.length;
	console.log(menu);
	console.assert(!elen == 0);
	for(i=0;i<elen;i++){
		if(entries[i]["menu"] == menu){
			entries[i]["active"] = 0;
		}
	}
	localStorage.setItem("entries", JSON.stringify(entries));
}
/* Create the context menu */
var hp = chrome.contextMenus.create({"title": "Share-it"});

if(isActive("facebook.com")){
	chrome.contextMenus.create({"title": "facebook.com", "contexts":["page"], "parentId": hp, "onclick": facebookIt});
}
function facebookIt(i, t){
	var createProperties = {url: "http://www.facebook.com/sharer.php?u="+ encodeURI(t.url) + "&src=" + encodeURIComponent("Share-it")};
	chrome.tabs.create(createProperties);
}

if(isActive("twitter.com")){
	chrome.contextMenus.create({"title": "twitter.com", "contexts":["page"], "parentId": hp, "onclick": twitterIt});
}
function twitterIt(i, t){
	var createProperties = {url: "https://twitter.com/share?url="+ encodeURI(t.url) + "&text=" + encodeURIComponent(t.title)};
	chrome.tabs.create(createProperties);
}

if(isActive("plus.google.com")){
	chrome.contextMenus.create({"title": "plus.google.com", "contexts":["page"], "parentId": hp, "onclick": googleplusIt});
}
function googleplusIt(i, t){
	var createProperties = {url: "https://plusone.google.com/_/+1/confirm?hl=en&url="+ encodeURI(t.url)};
	chrome.tabs.create(createProperties);
}

if(isActive("linkedin.com")){
	chrome.contextMenus.create({"title": "linkedin.com", "contexts":["page"], "parentId": hp, "onclick": linkedinIt});
}
function linkedinIt(i, t){
	var createProperties = {url: "http://www.linkedin.com/cws/share?url="+ encodeURI(t.url)};
	chrome.tabs.create(createProperties);
}

if(isActive("digg.com")){
	chrome.contextMenus.create({"title": "digg.com", "contexts":["page"], "parentId": hp, "onclick": diggIt});
}
function diggIt(i, t){
	var createProperties = {url: "http://digg.com/submit?url="+ encodeURI(t.url) + "&title=" + encodeURIComponent(t.title)};
	chrome.tabs.create(createProperties);
}

if(isActive("stumbleupon.com")){
	chrome.contextMenus.create({"title": "stumbleupon.com", "contexts":["page"], "parentId": hp, "onclick": stumbleuponIt});
}
function stumbleuponIt(i, t){
	var createProperties = {url: "http://www.stumbleupon.com/submit?url="+ encodeURI(t.url)};
	chrome.tabs.create(createProperties);
}

if(isActive("tumblr.com")){
	chrome.contextMenus.create({"title": "tumblr.com", "contexts":["page"], "parentId": hp, "onclick": tumblrIt});
}
function tumblrIt(i, t){
	var createProperties = {url: "http://www.tumblr.com/share?v=3&u="+ encodeURI(t.url) + "&t=" + encodeURIComponent(t.title)};
	chrome.tabs.create(createProperties);
}

if(isActive("friendfeed.com")){
	chrome.contextMenus.create({"title": "friendfeed.com", "contexts":["page"], "parentId": hp, "onclick": friendfeedIt});
}
function friendfeedIt(i, t){
	var createProperties = {url: "http://www.friendfeed.com/share?url="+ encodeURI(t.url) + "&title=" + encodeURIComponent(t.title)};
	chrome.tabs.create(createProperties);
}

if(isActive("fark.com")){
	chrome.contextMenus.create({"title": "fark.com", "contexts":["page"], "parentId": hp, "onclick": farkIt});
}
function farkIt(i, t){
	var createProperties = {url: "http://cgi.fark.com/cgi/fark/farkit.pl?u="+ encodeURI(t.url) + "&h=" + encodeURIComponent(t.title)};
	chrome.tabs.create(createProperties);
}

if(isActive("blinklist.com")){
	chrome.contextMenus.create({"title": "blinklist.com", "contexts":["page"], "parentId": hp, "onclick": blinklistIt});
}
function blinklistIt(i, t){
	var createProperties = {url: "http://www.blinklist.com/index.php?Action=Blink/Addblink.php&Url="+ encodeURI(t.url) + "&Title=" + encodeURIComponent(t.title)};
	chrome.tabs.create(createProperties);
}

if(isActive("plurk.com")){
	chrome.contextMenus.create({"title": "plurk.com", "contexts":["page"], "parentId": hp, "onclick": plurkIt});
}
function plurkIt(i, t){
	var createProperties = {url: "http://plurk.com/?qualifier=shares&status=" + encodeURIComponent(t.title) + "%20%2D%20" + encodeURI(t.url)};
	chrome.tabs.create(createProperties);
}

options.html


<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Share-it Options</title>
	<script type="text/javascript" src="options.js"></script>
</head>
<body>
<ul id="menu"></ul>
<div class="summary">Changes will take place the next time you start your browser.
Or if you don't want to close the browser you could uncheck and recheck the enabled box next to this extension on the Extensions tab page.</div>
</body>
</html>

options.js


window.onload = function () {
	ckb = chrome.extension.getBackgroundPage().entries;
	var list = document.getElementById("menu");
	for(i = 0; i < ckb.length; i++){
		console.log(ckb[i]["active"]);
		if(ckb[i]["active"] == 1){
			var li = document.createElement("li");
			var temp = "<input class="\&quot;butt\&quot;" type="\&quot;checkbox\&quot;" checked="checked" value="\&quot;&quot;" />" + ckb[i]["menu"] + "";

			li.innerHTML = temp;
			list.appendChild(li);
		}else{
			var li = document.createElement("li");
			var tempp = "<input class="\&quot;butt\&quot;" type="\&quot;checkbox\&quot;" value="\&quot;&quot;" />" + ckb[i]["menu"] + "";
			li.innerHTML = tempp;
			list.appendChild(li);

		}
	}
	as = document.getElementsByClassName("butt");
	for(i=0;i<as.length;i++){
		as[i].addEventListener("click",function(evt){
			if(evt.target.checked == true){

				chrome.extension.getBackgroundPage().setActive(evt.target.value);
			}else{
				chrome.extension.getBackgroundPage().setInactive(evt.target.value);
			}
		},false)
	}
}

Version 0.5 update – fixed the graphics display in newest Chrome browser

If you downloaded an extension from somewhere other than the Google Store (or the Opera Store), Chrome will not let you install it on the fly (Opera will install it, however, you’ll have to go to the extensions page to enable it). You have to go to the browser menu and choose Tools->Extensions to open up the Extensions tab. Then drag the extension from wherever it is on the file-system to the open Extensions page. This should start the install process. If you ever feel funny about a packed extension that was downloaded you can unzip them to inspect the code (if you don’t have 7zip you’ll have to change the file extension to .zip – do it on a copy).

Related:

Chrome Browser:

Opera Next Extension Development:

References From Google Developer:

Standard
Browser Extension, Google Chrome, Javascript, Share-It

Share-it A Google Chrome Extension for Sharing a Page on Multiple Websites

manifest.json

{
  "name": "Share-it",
  "description": "Adds context menu items to share the current page on a number of websites",
  "version": "0.2",
  "permissions": ["contextMenus"],
  "background": {
    "scripts": ["app.js"]
  },
  "icons" : {
		"16" : "favicon.ico",
		"32" : "peopleicon32.png",
		"48" : "peopleicon48.png",
		"128" : "peopleicon128.png"
	},
  "manifest_version": 2
}

app.js

var hp = chrome.contextMenus.create({"title": "Share-it"});
chrome.contextMenus.create({"title": "facebook.com", "contexts":["page"], "parentId": hp, "onclick": facebookIt});
function facebookIt(i, t){
	var createProperties = {url: "http://www.facebook.com/sharer.php?u="+ encodeURI(t.url) + "&src=" + encodeURIComponent("Share-it")};
	chrome.tabs.create(createProperties);
}
chrome.contextMenus.create({"title": "twitter.com", "contexts":["page"], "parentId": hp, "onclick": twitterIt});
function twitterIt(i, t){
	var createProperties = {url: "https://twitter.com/share?url="+ encodeURI(t.url) + "&text=" + encodeURIComponent(t.title)};
	chrome.tabs.create(createProperties);
}
chrome.contextMenus.create({"title": "plus.google.com", "contexts":["page"], "parentId": hp, "onclick": googleplusIt});
function googleplusIt(i, t){
	// var createProperties = {url: "https://plusone.google.com/_/+1/confirm?hl=en&url="+ encodeURI(t.url)};
	var createProperties = {url: "https://plusone.google.com/share?url="+ encodeURI(t.url)};
	chrome.tabs.create(createProperties);
}
chrome.contextMenus.create({"title": "linkedin.com", "contexts":["page"], "parentId": hp, "onclick": linkedinIt});
function linkedinIt(i, t){
	var createProperties = {url: "http://www.linkedin.com/cws/share?url="+ encodeURI(t.url)};
	chrome.tabs.create(createProperties);
}
chrome.contextMenus.create({"title": "digg.com", "contexts":["page"], "parentId": hp, "onclick": diggIt});
function diggIt(i, t){
	var createProperties = {url: "http://digg.com/submit?url="+ encodeURI(t.url) + "&title=" + encodeURIComponent(t.title)};
	chrome.tabs.create(createProperties);
}
chrome.contextMenus.create({"title": "myspace.com", "contexts":["page"], "parentId": hp, "onclick": myspaceIt});
function myspaceIt(i, t){
	var createProperties = {url: "http://www.myspace.com/Modules/PostTo/Pages/?u="+ encodeURI(t.url)};
	chrome.tabs.create(createProperties);
}
chrome.contextMenus.create({"title": "stumbleupon.com", "contexts":["page"], "parentId": hp, "onclick": stumbleuponIt});
function stumbleuponIt(i, t){
	var createProperties = {url: "http://www.stumbleupon.com/submit?url="+ encodeURI(t.url)};
	chrome.tabs.create(createProperties);
}
chrome.contextMenus.create({"title": "tumblr.com", "contexts":["page"], "parentId": hp, "onclick": tumblrIt});
function tumblrIt(i, t){
	var createProperties = {url: "http://www.tumblr.com/share?v=3&u="+ encodeURI(t.url) + "&t=" + encodeURIComponent(t.title)};
	chrome.tabs.create(createProperties);
}
chrome.contextMenus.create({"title": "friendfeed.com", "contexts":["page"], "parentId": hp, "onclick": friendfeedIt});
function friendfeedIt(i, t){
	var createProperties = {url: "http://www.friendfeed.com/share?url="+ encodeURI(t.url) + "&title=" + encodeURIComponent(t.title)};
	chrome.tabs.create(createProperties);
}
chrome.contextMenus.create({"title": "fark.com", "contexts":["page"], "parentId": hp, "onclick": farkIt});
function farkIt(i, t){
	var createProperties = {url: "http://cgi.fark.com/cgi/fark/farkit.pl?u="+ encodeURI(t.url) + "&h=" + encodeURIComponent(t.title)};
	chrome.tabs.create(createProperties);
}
chrome.contextMenus.create({"title": "blinklist.com", "contexts":["page"], "parentId": hp, "onclick": blinklistIt});
function blinklistIt(i, t){
	var createProperties = {url: "http://www.blinklist.com/index.php?Action=Blink/Addblink.php&Url="+ encodeURI(t.url) + "&Title=" + encodeURIComponent(t.title)};
	chrome.tabs.create(createProperties);
}
chrome.contextMenus.create({"title": "plurk.com", "contexts":["page"], "parentId": hp, "onclick": plurkIt});
function plurkIt(i, t){
	var createProperties = {url: "http://plurk.com/?qualifier=shares&status=" + encodeURIComponent(t.title) + "%20%2D%20" + encodeURI(t.url)};
	chrome.tabs.create(createProperties);
}

This one is a little more full featured as far as sharing is concerned. I may just give this one out so I added my site graphics so it looks a bit more professional. Demonstrates using a parent ‘folder’ for (sub) context menu items. Its pretty basic: create a handle (var hp) and a parent (which is nothing more than a context menu item with just a title) and use it in each child’s creation function inside the “parentId” property. I would have liked to put the proper site icons next to each menu item, but it does not work like that in Chrome. You can, however, use check boxes and radio buttons in the menu items. Maybe that will be included in the next version of Chrome (hopefully).

If you plan to use a library when creating your extension, be sure to use one that doesn’t use dynamic loading (unbuild dojo apps will not run in other words). In my opinion you should use straight javascript targeted at Chrome. This extension assumes its user is smart enough not to share a page that’s on the hard drive without hosting it on the Internet first (otherwise you’ll be sharing a file path). I could have used a Match Pattern in the “documentUrlPatterns” property in the creation function for each menu item that could check the scheme, but I didn’t bother. Its something you could use at your own discretion in your add-on.

Standard