Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (24 sloc) 674 Bytes
<!DOCTYPE html>
<html>
<head>
<script src="options.js"></script>
<script type="text/javascript">
function onClickGDocs(data, tab) {
window.open("https://docs.google.com/viewer?url="+encodeURIComponent(data.linkUrl));
};
var docsUrlPatterns = [];
getTypesList().forEach(function (element, index, array) {
docsUrlPatterns.push("*://*/*."+element, "*://*/*."+element+"?*", "*://*/*."+element+"#*");
});
chrome.contextMenus.create({
"title" : "Google Docs it",
"type" : "normal",
"contexts" : ["link"],
"targetUrlPatterns" : docsUrlPatterns,
"onclick" : onClickGDocs
});
</script>
</head>
<body>
</body>
</html>