-1

I'm developing a multi-browser extension using the Crossrider framework. Is there a solution to show an html horizontal menu on the top of each page ? The menu will embed a JS script which uses some external libraries.

Indeed, I can prepend my html content to the "body" tag but each time the user clicks on a link on the webpage, the whole page is reloaded which makes the horizontal bar disapear and then reappear on the next page when the loading is completed.

I thought of putting the website content into an iframe but some websites (ex: amazon) send a header with the "X-Frame-Options" set to "DENY" or "SAMEORIGIN". This is something which Crossrider cannot modify (at least I didn't find how to do that).

Is there an other way to show a PERMANENT menu on top of each page ?


EDIT :
My toolbar won't contain any link but it will record the mouse position. My problem is that each time the user will click on a website link (ex : to see a product on the amazon website), the toolbar will be reloaded and so the mouse position won't be recorded until the next page has finished its loading.

Thomas
  • 1
  • 1
  • In general, it is possible to inject an HTML toolbar into a page using Crossirder and it persists as long as the page is not reloaded (as you described and expect). However, It's not clear from your question whether what clicking on a toolbar link is meant to do; hence, please provide some code snippets showing what the click event handler is doing as there may be something in the code causing the reload behavior. – Shlomo Apr 21 '15 at 06:37
  • Thank you for your answer. I edited my post to provide some additional information. – Thomas Apr 21 '15 at 09:54

1 Answers1

1

Page reload is normal behavior when clicking on a link on Amazon sites and hence the toolbar redrawing when the page loads is normal and correct.

Based on the information provided and assuming I have understood what you are trying to acheive, it appears that you are going about this the wrong way. I would first think about why do you need a toolbar at all? For example, if you are only recording the mouse position when a link in the page is clicked, I think it makes more sense to register to mouse click events of the links you are interested in.

I suggest you rethink your approach and take in to consideration the issues you have to handle, such as the page reload and handling the click event before the page reloads.

[Disclosure: I am a Crossrider employee]

Shlomo
  • 3,763
  • 11
  • 16