Chrome extension: Playing Favourites

Delicious friends!

I have noticed that I made a typo in the fix for not loading after a login. It is now fixed-for-real-this-time and 0.3.1 is being deployed to CWS.

There are no other changes in this version.
edited by Alistair Cray on 11/2/2016

So something odd is happening.
I have it so that favourited storylets float to the top (because who wants to have to hunt for casing), and I’ve just noticed that when I draw a card, the favourited &quotEmbark on a Heist&quot storylet moves to the top, but if I discard a card, then &quotThe portly assassin&quot moves to the top.
Although if I draw a card (so that Embark on a Heist is at the top), and do the card, Embark on a Heist stays at the top.

I’m not kidding.

Before drawing a card:

After drawing a card:

While not particularly an issue, since the storylets are still all up the top, this is pretty darn weird. Anyone else noticed this?

Edit: So I just checked on my alt, and it’s not account dependent (idk why it would be, but figured I should check). However, I drew some cards in Spite (where I have Unfinished Business and whichever Box Grind storylet I’m up to favourited), and nothing shuffled when drawing/discarding cards. So I have no idea.

Edit2: Ah okay, so it only shuffles the favourited storylets if there’s more than two favourited. I have Temple Club, Nadir, Seeking Curious, and Expeditions favourited in the Forgotten Quarter. In that order. Upon drawing a card in the FQ, it arranges them Seeking Curious, Expeditions, Temple Club, Nadir. So just puts the top two favourited storylets at the bottom (while still keeping their order). Not sure what happens with more and odd numbers of storylets. That would require cards to draw.
edited by fallingkitten on 11/22/2016

Aaah okay new post because this is unrelated to the shuffly thing.

I can’t make any of the ribbons green/red. If I hold my cursor over a ribbon, the cursor turns into the hand, and the hover text shows up - as per normal. But if I click, nothing happens, except a small blue box appears around the ribbon.

If I then reload the page, then the ribbon I clicked turns green/red/whatever, so that’s good.

[quote=fallingkitten]So something odd is happening.
I have it so that favourited storylets float to the top (because who wants to have to hunt for casing), and I’ve just noticed that when I draw a card, the favourited &quotEmbark on a Heist&quot storylet moves to the top, but if I discard a card, then &quotThe portly assassin&quot moves to the top.
Although if I draw a card (so that Embark on a Heist is at the top), and do the card, Embark on a Heist stays at the top.[/quote]
I see this as well. Any action on the page (even clicking the card deck when my hand is full (so no card is actually drawn), reshuffles the order of the favourited storylets.

I get the reshuffling effect as well. It’s odd, but not really anything major.

I’ll investigate the reshuffling. This certainly is solvable, question is &quothow to solve it with minimal effort&quot.

[quote=fallingkitten]Aaah okay new post because this is unrelated to the shuffly thing.

I can’t make any of the ribbons green/red. If I hold my cursor over a ribbon, the cursor turns into the hand, and the hover text shows up - as per normal. But if I click, nothing happens, except a small blue box appears around the ribbon.

If I then reload the page, then the ribbon I clicked turns green/red/whatever, so that’s good.[/quote]

Can you see if there are any errors in the console when you click on the ribbon? Anyway, I’ll track it here.
edited by Alistair Cray on 11/23/2016

So it appears to have sorted itself out. I can make the ribbons red/green just by clicking them again. Odd, but yay!

Since the green/red toggling is great for remembering which cards are good/bad, would it be possible to make it so we can favourite/unfavourite non-discardable cards? Obviously we’re not at risk of discarding them or anything, but it’d be awesome if while in the Nadir it was easy to tell which cards are good and which to not bother with. Same with menace states.

For the last month, I’ve been using a version of this most excellent mod which I converted for my own use to Firefox.

I don’t want to post it, since, not being the author of the mod, I don’t want to be rude. But the good news is that Mozilla is working on creating a crossplatform extension framework. The conversion tools are literally point & click. It will walk you through installing the tool and setting it up your necessary permissions. Then you simply save the Chrome extension from its .crx to the .xpi Mozilla extension file type.

I’m going to post these instructions which I posted at a different site first. Hopefully some of my new Delicious Friends will find them useful.

  1. First you need to make Firefox account, which is the account that you sign into for syncing Firefox bookmarks, if you’re already doing that (I am; that works great, too.)

  2. Then here’s the tool - Firefox is working to make crossplatform extensions a thing and this tool is part of that crusade.

https://addons.mozilla.org/en-US/firefox/addon/chrome-store-foxified/

How To

Go to the Google Chrome Webstore. You do not need to login with a Google account.
Go to the &quotExtensions&quot section
Find any extension you like, and you will see a button &quotAdd to Firefox&quot. Click it.
If you want to &quotpermanently install&quot it, then you must login to addons.mozilla.org and have cookies enabled. If cookies are disabled then the addon cannot see that you are logged in. Please see support topic - https://github.com/Noitidart/Chrome-Store-Foxified/issues/49#issuecomment-259261125

  1. Once you install the above extension, you go to the Chrome store from within Firefox and click on the link to install the Chrome extension -

https://chrome.google.com/webstore/detail/playing-favourites-for-fa/mcaahfdpnojmloiekappdkeafmhdmfhd

  1. The extension will walk you though getting an API from Mozilla (it’s simple, point & click). Mozilla wants everyone to have an API so that they can keep track of who’s uploading what to their own store. You need the API, although I’m not uploading this file since it’s not really my mod. I’m just going through this for my private use.

  2. Once you’re set up, you’ll get a pop that looks like this when you click on the Add to Firefox button on the addon page:

Click on the Save Addon To File option - this converts the Chrome .crx extension into the Firefox .xpi format.

  1. Doubleclick on your new .xpi file (if Windows asks what program to open the file with, select Firefox)

After that, you should now have the Favorites installed just like any other Firefox extension

Yours,
Perdita Radcliffe
edited by Merneith on 2/8/2017

To explain the situation with Firefox port, my roadmap is:

  1. Fix the above-mentioned reordering bug.
  2. Finish the implementation of discard protection (I have a working draft, but it’s not yet 100% robust).
  3. Implement configuration export/import (to counter the fact that Firefox doesn’t offer sync storage).
  4. Test against FF & publish.

Sadly, I don’t have much time right now to work on this roadmap. If someone wants to help, they are welcome to.

I would be happy to test out any FF version of this mod. I don’t have the expertise to be of any other service, I’m afraid.

Using the tool mentioned above, I haven’t noticed any real problem. The stuff I’ve favorited is up-top and the stuff I’ve disliked is down below. I haven’t really paid attention to specific order within the up/down categories.

To my admittedly inexpert eye, it seems to work just fine. I’m not trying to sync settings with it, however.

Does anyone know if this extension, or something similar, would be possible on the new site?

I can’t speak for Playing Favourites, but in general the hooks that extensions rely on are still available: just under different names and in different places.

(FWIW, I’m going to hold off on publishing updates to my own extensions until the redesign is completely finished/stable, just to make sure that FBG don’t get any bug reports on my account, but my in-development versions are mostly working fine on the new site.)

[quote=Gallmarch]I can’t speak for Playing Favourites, but in general the hooks that extensions rely on are still available: just under different names and in different places.

(FWIW, I’m going to hold off on publishing updates to my own extensions until the redesign is completely finished/stable, just to make sure that FBG don’t get any bug reports on my account, but my in-development versions are mostly working fine on the new site.)[/quote]Nice. I’m looking forward to your extensions just as much as I’m looking forward to a working new site.

And I know this is a kind of ridiculous request, but would you (or anyone else) be able to put together a line of CSS or whatnot that does something about the absolutely HUGE banner images on the new site? I’d attempt myself, but I know nothing of coding, etc. Maybe something that instead of seeing this:

Imgur

it would scroll down or hide/shrink the image, so that it shows up like this:

Imgur

I love the new artwork, but to me it’s excessively large. Once I’ve seen it once, appreciated it, etc., I’m ready to just get to business and play. And I love the candles, but I don’t need to see them either, since the Actions left are still viewable. I know this is cutting out some of the atmosphere, but I’m just not a fan of half of the page being taken up by a banner.

I was just playing around with updating this extension, and unfortunately I found that this is false. Namely, it’s impossible to identify opportunity cards because they’re coded in React and the rendered HTML doesn’t have any identifying ID anywhere the way the old cards did.
edited by omnilynx on 8/21/2018

I was just playing around with updating this extension, and unfortunately I found that this is false. Namely, it’s impossible to identify opportunity cards because they’re coded in React and the rendered HTML doesn’t have any identifying ID anywhere the way the old cards did.
[/quote]
Isn’t react mainly client-side? If so, it should be possible to hook into the JS instead. Much more annoying to do, definitely, but not yet impossible.
edited by Dudebro Pyro on 8/22/2018

I was just playing around with updating this extension, and unfortunately I found that this is false. Namely, it’s impossible to identify opportunity cards because they’re coded in React and the rendered HTML doesn’t have any identifying ID anywhere the way the old cards did.
[/quote]
Isn’t react mainly client-side? If so, it should be possible to hook into the JS instead. Much more annoying to do, definitely, but not yet impossible.
edited by Dudebro Pyro on 8/22/2018[/quote]

Playing Favourites already has to peek into the page’s JS context, see https://github.com/kav2k/fl_favourites/blob/72ae22d0fb3a5830e48adc388670dfb6504b8f70/src/js/content.js#L59-L86 - to extract page-level onclick attributes as annotations. I expect this can be done likewise to extract React properties.

I was just playing around with updating this extension, and unfortunately I found that this is false. Namely, it’s impossible to identify opportunity cards because they’re coded in React and the rendered HTML doesn’t have any identifying ID anywhere the way the old cards did.
edited by omnilynx on 8/21/2018[/quote]

That is strange, I see div with class hand__card-container and data-event-id=&quot20230&quot on the new redesigned UI in https://www.fallenlondon.com/
Is it not possible to hook onto that?
edited by Zarremgregarrok on 10/1/2018
edited by Zarremgregarrok on 10/1/2018

I’m really gutted there has been no apparent response from the author here. This was by far my most favourite extension for FL.

Yeah, marking some options and cards as important for me was a huge feature.

I messaged the author via PM, we shall see if they appear.