Topic on Extension talk:JSBreadCrumbs

Doesn't work in Timeless skin

6
Crismagnabosco (talkcontribs)

Do you have any plans to update this extension to work with Timeless skin?

Cindy.cicalese (talkcontribs)

Could you please describe what the issue is in Timeless? It may be an issue of setting the appropriate CSS selector in your configuration to insert the breadcrumbs at. It would be good to know if that is the issue or if it is something else. Please also include version information.

Crismagnabosco (talkcontribs)

I'm updating the Mediawiki 1.31 and trying to use the Timeless skin. If I use the Vector skin, the JSBreadCrumbs works fine, but if I change to Timeless, the bread crumbs isn't showned in the page.

Cindy.cicalese (talkcontribs)
92.72.242.79 (talkcontribs)

#firstHeading should be right. However, $wgJSBreadCrumbsCSSSelectorHorizontal doesn't work as advertised (and the whole logic of choosing the right selector programmatically seems to be somewhat flawed), so i ended up monkeypatching th whole thing to make it work:

# diff -ub resources/JSBreadCrumbs.js{.orig,}

--- resources/JSBreadCrumbs.js.orig     2021-04-14 12:07:31.194729971 +0200

+++ resources/JSBreadCrumbs.js  2021-04-14 12:09:01.268802485 +0200

@@ -103,7 +103,8 @@

                               } else if ( skin === 'foreground' ) {

                                       selector = '#mw-js-message';

                               } else {

-                                       selector = '#top';

+                                       // selector = '#top';

+                                       selector = '#firstHeading';

                               }

                               $( selector ).before(

49.159.22.68 (talkcontribs)

For me

I Change File in /resources/JSBreadCrumbs.js


                         if ( horizontal ) {

                                if ( skin in cssSelector ) {

                                        selector = cssSelector[ skin ];

                                } else if ( skin === 'foreground' ) {

                                        selector = '#mw-js-message';

+                               } else if ( skin === 'timeless'){

+                                       selector = '#firstHeading';

                                } else {

                                        selector = '#top';

                                }

                                $( selector ).before(

Reply to "Doesn't work in Timeless skin"