Pixiv Fanbox includes a JavaScript(?) string in v31 after post titles.

For support with specific websites

Moderator: trava90

Forum rules
Please always mention the name/domain of the website in question in your topic title.
Please one website per topic thread (to help keep things organized). While behavior on different sites might at first glance seem similar, they are not necessarily caused by the same.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:
  1. Clear any current output
  2. Navigate or refresh the page in question
  3. Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.
User avatar
Mæstro
Lunatic
Lunatic
Posts: 459
Joined: 2019-08-13, 00:30
Location: Casumia

Pixiv Fanbox includes a JavaScript(?) string in v31 after post titles.

Unread post by Mæstro » 2022-05-13, 17:49

This error occurs for any Fanbox post and does not change on logging in: one example is here, and can be seen in the screenshot. It occurs in a fresh v31 profile without any extensions: the only change from default settings is that WebComponents is enabled in about:config. (Fanbox otherwise will load a blank screen.) Below the title (black and in Japanese), the following English text appears in grey:
:host { display: inline-flex; --size: 24px; } svg { width: var(--size); height: var(--size); }
The grey string had not appeared in v29·4·6; this is new to v31’s WebComponents implementation. As far as I can tell, the site otherwise works normally. This is a purely cosmetic glitch, and a minor one at that, but I still see fit to report it. Only the grey lock itself, meant to indicate that a post’s contents are open only to paid supporters, should be visible.
Error console logs:

Code: Select all

Timestamp: 13.05.2022 13:48:08
Warning: Content Security Policy: Ignoring ‘x-frame-options’ because of ‘frame-ancestors’ directive.
Timestamp: 13.05.2022 13:48:13
Warning: Content Security Policy: Ignoring ‘x-frame-options’ because of ‘frame-ancestors’ directive.
Timestamp: 13.05.2022 13:48:14
Warning: Content Security Policy: Ignoring ‘x-frame-options’ because of ‘frame-ancestors’ directive.
Attachments
Bildschirmfoto vom 2022-05-13 13-39-40.png
Browser: Pale Moon (Pusser’s repository for Debian)
Operating System: Linux Mint Debian Edition 4 (amd64)
※Receiving Debian 10 LTS security upgrades
Hardware: HP Pavilion DV6-7010 (1400 MHz, 6 GB)
Formerly user TheRealMaestro: æsc is the best letter.

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1481
Joined: 2018-10-28, 19:56
Location: Georgia

Re: Pixiv Fanbox includes a JavaScript(?) string in v31 after post titles.

Unread post by athenian200 » 2022-05-13, 18:01

Well, that's not good. It appears that whatever I implemented for the :host selector is worse than useless in real world contexts, even if it passes tests. I guess that's not a good metric of whether something really works or not...
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Pixiv Fanbox includes a JavaScript(?) string in v31 after post titles.

Unread post by Moonchild » 2022-05-13, 19:27

I don't think it's necessarily due to the implementation of :host itself, but rather it treats in-line <style> blocks as content tags instead of CSS tags, so maybe just a tag type confusion, flagging the DOM node wrongly?

And honestly I don't even know why they would use :host there to begin with to set a size of the single element inside of it... SVG elements DO understand size (width/height) attributes directly, which they are also using. The whole <style> block in their code is unnecessary and totally redundant.

Code: Select all

<pixiv-icon class="sc-1tcz4lc-1 hFYAMD" name="24/LockLock">
<style>
          :host {
            display: inline-flex;
            --size: 24px;
          }

          svg {
            width: var(--size);
            height: var(--size);
          }
</style>
<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M18 11a2 2 0 012 2v6a2 2 0 01-2 2H6a2 2 0 01-2-2v-6a2 2 0 012-2V9a6 6 0 1112 0v2zm-9 0h6V9a3 3 0 10-6 0v2z" fill="currentColor"></path></svg>
</pixiv-icon>
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

jdpls
Apollo supporter
Apollo supporter
Posts: 32
Joined: 2014-10-13, 13:23
Location: USA

Re: Pixiv Fanbox includes a JavaScript(?) string in v31 after post titles.

Unread post by jdpls » 2022-05-15, 02:46

i can't even get regular pixiv to load.

User avatar
RealityRipple
Astronaut
Astronaut
Posts: 644
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California
Contact:

Re: Pixiv Fanbox includes a JavaScript(?) string in v31 after post titles.

Unread post by RealityRipple » 2022-05-15, 05:57

Off-topic:
Style tag inside an element? As much as I wanna say "eeeeeewwwwwww", why isn't that how Shadow DOM was done? That could have actually worked out pretty well; style and script tags inside elements that only apply to them. Paradigm-precedented scoping.

Daikun
Lunatic
Lunatic
Posts: 442
Joined: 2013-12-13, 20:54
Location: California

Re: Pixiv Fanbox includes a JavaScript(?) string in v31 after post titles.

Unread post by Daikun » 2022-05-15, 06:42

jdpls wrote:
2022-05-15, 02:46
i can't even get regular pixiv to load.
Do you have WebComponents enabled? You need that on in order to view Pixiv.

User tellu-white made a handy button that lets you turn it on and off with a single click.
Get it here: viewtopic.php?f=70&t=28163&start=21

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Pixiv Fanbox includes a JavaScript(?) string in v31 after post titles.

Unread post by Moonchild » 2022-05-15, 08:06

Off-topic:
RealityRipple wrote:
2022-05-15, 05:57
Off-topic:
Style tag inside an element? As much as I wanna say "eeeeeewwwwwww", why isn't that how Shadow DOM was done? That could have actually worked out pretty well; style and script tags inside elements that only apply to them. Paradigm-precedented scoping.
We support this, and Firefox used to, by using <style scoped> -- it was part of the standard but Google scrapped it and then pushed it out.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Mæstro
Lunatic
Lunatic
Posts: 459
Joined: 2019-08-13, 00:30
Location: Casumia

Pixiv's style tags appear as plaintext in more places.

Unread post by Mæstro » 2022-06-08, 16:23

A kindred glitch was reported for v31·0 for Fanbox here, and that error still appears in v31·1. Moreover, as of yesterday, in both v31·0 and v31·1, a new rendering mistake like this, likely due to changes in Pixiv’s design, has appeared. A test link is here. Rendering is proper if one is not logged in, but if one is logged in, the page renders as in the first uploaded screenshot. The login page itself is also aberrant, as shown in the other screenshot. (Note that one must enable WebComponents for Pixiv to work at all.) While these defects are cosmetic and, as mentioned there, due to Pixiv’s bad design, I see fit to report it here. Today’s poor practise is tomorrow’s draft specification.
Attachments
Bildschirmfoto vom 2022-06-08 12-19-44.png
Bildschirmfoto vom 2022-06-08 12-16-05.png
Browser: Pale Moon (Pusser’s repository for Debian)
Operating System: Linux Mint Debian Edition 4 (amd64)
※Receiving Debian 10 LTS security upgrades
Hardware: HP Pavilion DV6-7010 (1400 MHz, 6 GB)
Formerly user TheRealMaestro: æsc is the best letter.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Pixiv's style tags appear as plaintext in more places.

Unread post by Moonchild » 2022-06-08, 18:39

1. wrong board (moved)
2. don't make a new thread for a continuation (merged)
3. our webcomponents support is incomplete and experimental Using it is under a severe case of YMMV.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Mæstro
Lunatic
Lunatic
Posts: 459
Joined: 2019-08-13, 00:30
Location: Casumia

Re: Pixiv Fanbox includes a JavaScript(?) string in v31 after post titles.

Unread post by Mæstro » 2022-06-11, 19:45

1 — Thank you, I had posted in the other one by mistake.
2 — This is good to know: I had assumed wrongly that new threads were preferred to bumping.
3 — No worries, this is more to report the glitch for any future development than anything else. As the site still works, I can tolerate it.
Browser: Pale Moon (Pusser’s repository for Debian)
Operating System: Linux Mint Debian Edition 4 (amd64)
※Receiving Debian 10 LTS security upgrades
Hardware: HP Pavilion DV6-7010 (1400 MHz, 6 GB)
Formerly user TheRealMaestro: æsc is the best letter.

Locked