blenderskool / untab

🔍 A productivity tool to boost your browser workflow!
https://getuntab.now.sh
MIT License
345 stars 27 forks source link

Iframe append error in tabs with file URLs #67

Closed blenderskool closed 2 years ago

blenderskool commented 3 years ago

Content script appends the UnTab iframe to the body of the page. For file URLs, the DOM is not present which causes the following error.

blenderskool commented 3 years ago

Adding more context, I encountered this error when I opened an SVG directly in the browser. This error was actually harmless as the search interface simply opened in a new tab when triggered from this tab.

We can simply prevent embedding iframe when the body element is not available in the current tab to fix this.