kav2k / fl_favourites

Playing Favourites for Fallen London
MIT License
8 stars 11 forks source link

Add support for card discarding #4

Closed kav2k closed 7 years ago

kav2k commented 8 years ago

Enable marking card discard as favourite / unwanted

kav2k commented 7 years ago

Initial work done with a12e9da916307afd3c511dddc55eeb53acfc7d09

Remaining: discard protection for cards marked as do-not-discard.

Zarremgregarrok commented 7 years ago

What kind of discard protection are you aiming for? Making the button non-clickable when Favorite is red?

kav2k commented 7 years ago

@Zarremgregarrok I'm aiming at the following:

If red, one click on the button replaces the text with "Sure?" If clicked again within, say, 3 seconds, action is taken as normal. If not, button goes to initial state.

The problem with all this is that due to content script context isolation, I can't easily cancel the default handler for the click. It will need pretty invasive injection into the page. Something I hoped to avoid, but I don't see another way out. Do note that I already inject code to deal with handlers - but only to read them, not override them.

kav2k commented 7 years ago

Closing this; protection will be tracked at #12