Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing the star problem button #1

Open
cs-mshah opened this issue Aug 4, 2021 · 2 comments
Open

Implementing the star problem button #1

cs-mshah opened this issue Aug 4, 2021 · 2 comments
Assignees
Labels
good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed

Comments

@cs-mshah
Copy link
Owner

cs-mshah commented Aug 4, 2021

I thought of having a separate star for starring the problem under the star which appears on any problem page. Clicking this adds the contest to favourites and not the problem. To add a problem to favourite, we need to go to the contest page and star it there.

But implementing this doesn't seem easy to me. To trigger a click, We need to go to a that page and trigger the click. Simply using load() as I have done (in the problemset.js file) only takes that element and inserts it at the required tag.
But because the chrome API doesn't allow the access to the javascript of a page, the click events from the load() do not get triggered.
Copying the javascript code that you see in the inspect element of that page to the content script and running it also does not work, as the request is forbidden (403 error).

So the only option which is left is to create an <iframe> in the current tab with src=contest page and then triggering the click.
But this method seems too complicated so I wanted to know if there is any other way of doing it. If no, then how should this be implemented efficiently?

@cs-mshah cs-mshah added the help wanted Extra attention is needed label Aug 4, 2021
@shikhar13012001
Copy link

I would like to work on this issue @cs-mshah Can you please assign this to me?

@cs-mshah
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants