diff --git a/src/background.js b/src/background.js index eed4a35..ef21369 100644 --- a/src/background.js +++ b/src/background.js @@ -22,6 +22,7 @@ const clearActions = () => { {title:"Reload", desc:"Reload the page", type:"action", action:"reload", emoji:true, emojiChar:"♻️", keycheck:true, keys:['⌘','⇧', 'R']}, {title:"Help", desc:"Get help with Omni on GitHub", type:"action", action:"url", url:"https://github.com/alyssaxuu/omni", emoji:true, emojiChar:"🤔", keycheck:false}, {title:"Compose email", desc:"Compose a new email", type:"action", action:"email", emoji:true, emojiChar:"✉️", keycheck:true, keys:['⌥','⇧', 'C']}, + {title:"Print page", desc:"Print the current page", type:"action", action:"print", emoji:true, emojiChar:"🖨️", keycheck:true, keys:['⌘', 'P']}, {title:"New Notion page", desc:"Create a new Notion page", type:"action", action:"url", url:"https://notion.new", emoji:false, favIconUrl:chrome.runtime.getURL("assets/logo-notion.png"), keycheck:false}, {title:"New Sheets spreadsheet", desc:"Create a new Google Sheets spreadsheet", type:"action", action:"url", url:"https://sheets.new", emoji:false, favIconUrl:chrome.runtime.getURL("assets/logo-sheets.png"), keycheck:false}, {title:"New Docs document", desc:"Create a new Google Docs document", type:"action", action:"url", emoji:false, url:"https://docs.new", favIconUrl:chrome.runtime.getURL("assets/logo-docs.png"), keycheck:false}, diff --git a/src/content.js b/src/content.js index f5e9436..ccc96c9 100644 --- a/src/content.js +++ b/src/content.js @@ -1,9 +1,11 @@ +// Workaround to capture Esc key on certain sites var isOpen = false; document.onkeyup = (e) => { if (e.key == "Escape" && isOpen) { chrome.runtime.sendMessage({request:"close-omni"}) } } + $(document).ready(function(){ var actions = []; var isFiltered = false; @@ -293,6 +295,9 @@ $(document).ready(function(){ window.open(addhttp($(".omni-extension input").val()), "_self"); } break; + case "print": + window.print(); + break; } } diff --git a/src/manifest.json b/src/manifest.json index 5bea459..1e81427 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,7 +2,7 @@ "name": "Omni", "description": "Supercharge Chrome with commands, shortcuts, and more", "offline_enabled": true, - "version": "1.3.7", + "version": "1.3.8", "manifest_version": 3, "action": { "icons": {