View highligthed elements (or page) Picture-In-Picture

Latest Version

Version
0.2.5
Update
February 13, 2024
Size
17.39KiB
Developer
Category
Users
16
Rating
5 ★
Manifest Version
3
Web Store Status
Languages Support
English
See more
Permissions
ActiveTab
ContextMenus
See more

PIPElement Extension

View any element (or the whole page) Picture-In-Picture.
Not only videos or images, it works on any element.

Hold SHIFT to add the highligthed element to the PIP Window, or press ESC (or right-click) to quit the picker.
Use Q/A keys to expand/reduce the highligthed selection, then press SPACE to add it to the PIP Window.

You can also use Alt+P to activate the picker (or configure an alternate shortcut key in the extension settings).

TIP: Fine-tuning your selection using Q/A keys, and choosing a VIDEO element will ensure that the target video will be opened as PIP.

I'm using this all the time to isolate html elements (especially images ;), and to trigger Picture-In-Picture for videos on sites that don't expose the feature.

**NOTE**: Although the extension tries to keep the elements stylized as in the original page,
the underlying technology ([DocumentPictureInPicture](https://developer.chrome.com/docs/web-platform/document-picture-in-picture)) cannot ensure the same styles are applied consistently
(either because the DOM layout is different in the PIP Window vs the original page - so CSS doesn't work in the intended way - or JS is used to style the page).

Also note that DocumentPictureInPicture doesn't allow navigation, so clicking on links in the PIP Window will close it and restore elements to the original page.

For more info about the DocumentPictureInPicture API see also here: https://developer.mozilla.org/en-US/docs/Web/API/Document_Picture-in-Picture_API


REPO: https://github.com/azrafe7/PIPElement

Please report bugs/feature requests at https://github.com/azrafe7/PIPElement/issues

CHANGELOG: https://github.com/azrafe7/PIPElement/blob/main/CHANGELOG.md
Read more

Source Manifest.json

{"update_url": "https://clients2.google.com/service/update2/crx", "name": "PIPElement", "version": "0.2.5", "description": "View highligthed elements (or page) Picture-In-Picture", "manifest_version": 3, "minimum_chrome_version": "116", "permissions": ["activeTab", "contextMenus"], "background": { "service_worker": "background.js" }, "content_scripts": [ { "matches": [""], "js": ["ElementPicker.js", "contentScript.js"], "css": ["ElementPicker.css"], "all_frames": false } ], "web_accessible_resources": [ { "resources": ["PIPElement.css"], "matches": [""] } ], "icons": { "128": "assets/icon128.png" }, "action": { "default_icon": { "128": "assets/icon128.png" }, "default_title": "PIPElement" }, "commands": { "_execute_action": { "suggested_key": { "default": "Alt+P" } } }}
Read more