6/18/2023 0 Comments Autodesk pixlr context menuAfter the initial load for an image by this add-on, Firefox does appear to start using the cached version - not sure why it can't do that right away.įirefox has hefty restrictions on file:// URLs, including forbidding setting the current page or opening new pages with such URLs using the standard API. I'm not sure how Firefox chooses to use cached images vs fetching them, but I don't see a good way to force to use cached image when viewing the image, instead it always appears to refetch the image. What the add-on does is before calling the aforementioned methods is bind a listener on web requests (blocking, request header, filtered to the destination URL) that alters the request header by adding a Referer entry based on the domain extracted from the context menu event page URL. To support setting the Referer header, host access to all domains, along with blocking webrequest permissions is required. None of those methods require special permission, but there is no way to set the Referer directly in those calls. windows.create() - open image/video in new window tabs.create() - open image/video in new tab (background/foreground) tabs.update() - open image/video in same tab Hotkey is baked into the message text and changes based on browser language ('i' in English)įor the actions of opening the image/video this extension relies on using: Uses i18n message translation to get menu text. The menu item implementation is mundane: a listener is bound to the click event handling the menu click and a listener is bound to the on-show event to show or hide the menu items based on options and if the image/video is already opened in the tab. The context menu items are bound to image and video contexts, and use the menus permission. Items are rendered in ascending order, though this does not change their actual order in the html, so arrow key navigation through the menu becomes wierd. The order is set to -20 to menu items to that should appear before the View Image menu item, order for the View Image menu item is set to -10, and every other menu item is left at order 0. Note: The way the CSS works is by setting the visual "order" of the menu items in the context menu which is a using display: flex, flex-direction: column. Quick step-by-step explanation of how to apply userChrome.css here: * uncomment this if you want to hide a bunch of other somewhat useless menu items If you are somehow using pre-Proton context menus you will also need to alter how to pad the menu item if hiding the icon. The CSS below should hopefully cover both kinds of context menu. Previously "-moz-box-ordinal-group" could be used, now it appears to use flex layout and "order" should be used instead. Note: Firefox 113 (i think) changed how the context menu is rendered. If you want to hide the default "Open Image in New Tab" context menu item and move this add-on's context menu items to a more logical places, the following addition to userChrome.css should do the trick. userChrome allows a lot of customization of the UI, but is subject to unannounced changes by Mozilla over the course of Firefox releases. Middle click opens selected image in a new background tab. Ctrl+shift left click opens selected image in new background tab. Ctrl left click opens selected image in new foreground tab. Shift left click opens selected image in a new window. Left click opens selected image in the same tab. Also adds "View Video" and "View Audio", functioning in a similar fashion.Īdd-on contains an Options page allowing for configuration of what the various user actions can do. Screenshot -fullpage fullpage_screenshot.!! In an attempt to be compatible with image sites that block hot-linking, this add-on requires additional permissions to be able to intercept image requests and set the Referer header.Īdds "View Image" context menu item for images, restoring old functionality replaced by the "Open Image in New Tab" official context menu item. Read this answer in context □ 2 All Replies (12) Screenshot -fullpage fullpage_screenshot.png You will have to type options yourself because clicking an entry in the pop-up that appears after the first "-" doesn't work (to see available options, use: screenshot -). The default file name is "Screen Shot yyyy-mm-dd at HH.MM.SS.png" in the download directory. You can use this if you only need a screenshot occasionally because you need to use a command line and can't click a button or use the context menu.Ī quick way to save a screenshot is to press the "s", then the F1 key will bring up a help pop-up where you can click the "screenshot" entry' or use cursor Up/Down and press the Enter key. Note that current Firefox versions have a built-in feature to take a screenshot as part of the Web Developer Toolbar.
0 Comments
Leave a Reply. |