esteinmann / chatgpt-convdown

GNU General Public License v3.0
56 stars 7 forks source link

Button moving content after page loaded #19

Open nsde opened 1 year ago

nsde commented 1 year ago

When loading the page, the button isn't there yet, and takes a moment to load. When it's loaded, it moves the other sidebar buttons and makes the section taller, which I find a bit distracting. Please fix this.

I don't know a lot about extension development, but you could use asynchronous code (if not done already).

esteinmann commented 1 year ago

Thanks for your feedback! I understand why this is annoying but don't know how to fix this right now.

The 1 second delay is deliberate to handle a 'soft page load' (don't know if that is the right term). Those happen when you switch between the historic conversations on the navigation panel and the URL in the address bar is changed. When that happens it is caught by the background script and the content script is triggered again. Without the delay the button would initially show but then get wiped out as the page load proceeds and the DOM is generated again.