 Matthew Cline Posts: 64
11/4/2016
|
Please add some more class and/or id attributes to the HTML in the "Myself" tab, for use by end-user in the "Stylish" browser extension/add-on which lets users .
Examples:
- For each <li> containing an item, set the id to the plain English name of the item (e.g., id="Bundle_of_Fourth_City_Rags")
- For each <ul> containing a category of items, set the id to the plain English name of the category (e.g., id="Wild_Words")
- For inventory items which are usable, put the "usableitem" class into the <li> tag as well as the <a> tag
-- My game profile is at http://fallenlondon.storynexus.com/Profile/Matthew~Cline
|
|
|
+1
link
|
 genesis Posts: 924
11/4/2016
|
That sounds like a vast amount of work... edited by genesis on 11/4/2016
-- http://fallenlondon.com/Profile/mikey_thinkin
Keeping track of incomplete content and loose ends in Fallen London
|
|
|
0
link
|
 Optimatum Posts: 3666
11/4/2016
|
I doubt the first point would be much work if FBG decided to implement it, as it would only involve telling the server to output the item name in a second place. The other two would likely be much more complicated.
The only issue I can see with this is concerns over making automation easier.
-- Optimatum, a ruthless and merciful gentleman. No plant battles, Affluent Photographer requests, or healing offers; all other social actions welcome.
Want a sip of Cider? Just say hi!
PM me for information enigmatic or Fated. Though the forum please, not FL itself.
|
|
|
0
link
|
 Skinnyman Posts: 2133
11/4/2016
|
In database implementation (and relational modeling) that unique key (tag, superkey, primary, id, etc) gives the information, not the other way around. If you're looking to style or manipulate DOM you just need to reference to those keys. Even if we had classes, ids or attributes, you would still to verify if you got it right. Out of curiosity, what exactly do you wish to accomplish? I need to put more ideas on the paper in case I'll have some free time! 
Cheers!
-- ESs items and quality requirements sheet. Please check if there are errors or if something is missing Achievement list if you're feeling bored! I am accepting Plant battles, Neath's Mysteries card, Starveling Cats and boxed cats. No suppers, no second chances gain and no need to cure my menaces!
|
|
|
0
link
|
 Matthew Cline Posts: 64
11/4/2016
|
Skinnyman wrote:
Out of curiosity, what exactly do you wish to accomplish? I've written a Stylish style which makes blank non-usable (non-clickable) inventory items, but I want to improve it so that:
1) It only applies to items in the "Curiosities" category. 2) The blanked-out items don't take up any horizontal space (I can't do that now since I can't selected the <li> for those items, but only the content inside each <li> edited by Matthew Cline on 11/4/2016
-- My game profile is at http://fallenlondon.storynexus.com/Profile/Matthew~Cline
|
|
|
0
link
|
 Skinnyman Posts: 2133
11/5/2016
|
Matthew Cline wrote:
Skinnyman wrote:
Out of curiosity, what exactly do you wish to accomplish? I've written a Stylish style which makes blank non-usable (non-clickable) inventory items, but I want to improve it so that:
1) It only applies to items in the "Curiosities" category. 2) The blanked-out items don't take up any horizontal space (I can't do that now since I can't selected the <li> for those items, but only the content inside each <li> edited by Matthew Cline on 11/4/2016 Bit early for me and coffee's en route, but can you send/post a picture with this? I'm having small issues understanding exactly what you wish to achieve.
Cheers and a lovely weekend!
-- ESs items and quality requirements sheet. Please check if there are errors or if something is missing Achievement list if you're feeling bored! I am accepting Plant battles, Neath's Mysteries card, Starveling Cats and boxed cats. No suppers, no second chances gain and no need to cure my menaces!
|
|
|
0
link
|
 Matthew Cline Posts: 64
11/6/2016
|
Here's what it looks like:
-- My game profile is at http://fallenlondon.storynexus.com/Profile/Matthew~Cline
|
|
|
0
link
|
 Saklad Posts: 528
11/7/2016
|
Having better HTML attributes may also help people with disabilities.
-- Saklad5, a man of many talents
|
|
|
+1
link
|
 Skinnyman Posts: 2133
11/8/2016
|
I see what you mean and sorry for the late reply, but I was very busy1 What you wish to obtain can't be done in a clean way in CSS and it's bound to fail at a certain point. But some JS love does the job!
if($('h3:contains("Curiosity")').next().length > 0) { var curiosityList = $('h3:contains("Curiosity")').next(); curiosityList.find('li').each(function () { if($(this).find('a.usableitem').length == 0 && !$(this).hasClass('.empty-icon')) { $(this).hide(); } if($(this).hasClass('.empty-icon')) { $(this).remove(); } }); if(curiosityList.find('a.usableitem').length % 6 != 0) { for(var i = 0; i < curiosityList.find('li').length % 6; i++) { curiosityList.append('<li class="empty-icon"></li>'); } } } edited by Skinnyman on 11/8/2016
-- ESs items and quality requirements sheet. Please check if there are errors or if something is missing Achievement list if you're feeling bored! I am accepting Plant battles, Neath's Mysteries card, Starveling Cats and boxed cats. No suppers, no second chances gain and no need to cure my menaces!
|
|
|
+1
link
|