joelshepherd / tabliss

A beautiful, customisable New Tab page for Firefox, Chrome, and Edge.
https://tabliss.io
GNU General Public License v3.0
2.24k stars 294 forks source link

Feature request: widget to insert HTML (safe) or JS (more scary) content form response on HTTP-call ? #476

Closed Madydri closed 2 years ago

Madydri commented 2 years ago

If this could be possible, it could open possibilities in pro application field Some indicators or content could be live called and inserted in the new tab page Do not know if an extension can get authorization to do this ? I suppose it is doable as there is already a "NBA Scores" widget : so the data must be get outside the browser and/or local host.

joelshepherd commented 2 years ago

Hi, the Chrome and Firefox extension policies prohibit loading arbitrary JS from outside the extension:

Add-ons must be self-contained and not load remote code for execution.

The NBA plugin works by only pulling in data with a HTTP call. The JS and HTML used to display the NBA widget is contained within the extension. This policy however, does not exist for the web version. If you use the web version, you can use the "Custom JS" widget to add your own JS to Tabliss already!

As for only pulling in HTML, I am not entirely sure if it is permitted or not. But considering the Firefox addon linter flags any function that adds HTML to the DOM directly, I am going guess its a no. Sorry, but this feature can only live in the web version.