Added print action

This commit is contained in:
Alyssa X 2022-01-17 10:06:58 +00:00
parent 946e7a0f4e
commit d19c9275b7
3 changed files with 7 additions and 1 deletions

View file

@ -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},

View file

@ -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;
}
}

View file

@ -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": {