Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // from select and translate chrome extension
- chrome.contextMenus.create({title: "Add or Remove languages", contexts:["selection"], onclick: options});
- function options(info)
- {
- var options = null;
- if (!info.linkUrl || info.linkUrl.lenght == 0) {
- options = info.selectionText; ///// <<<<<<------- there's the selection magic
- }
- chrome.tabs.create({url: "options.html" });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement