Closed HNOONa-0 closed 3 weeks ago
This code might indeed be necessary if we use it in a different context than the one shown in your example.
What I mean is the following case: We have a different way of accessing the ephemeral component, which is by visiting the URL: http://localhost:8001/grader/ephemeral.
If you add a hash to this URL, you will now be accessing the code you intend to remove, since in this case, it is not being embedded in an iframe
, but rather you are directly displaying the component.
So, for now, you can leave this code as it is.
That makes sense. Alright then, closing this.
We have the following piece of code for
hashchange
event: https://github.com/omegaup/omegaup/blob/5513fb1f507c5f6f3b0eb432d6ad19e06c5c0590/frontend/www/js/omegaup/grader/ephemeral.js#L985-L1053This code never actually execute beyond the first
if
statement. This is becausewindow.location.hash
references link to embed IDEiframe
, which is always empty (not actual link of the page that is the parent window). Here is a picture of what I mean.It's probably safe to remove.