Extension talk:JSBreadCrumbs

About this board

does this extensions work with the Citizen theme?

1
Jakeriper1 (talkcontribs)

hiya

i've uploaded the extension and loaded it through LocalSettings.php, but nothing appears anywhere. The extension is correctly installed, as the version page shows the extension.

is this extension supported on the Citizen theme?

I'm using MediaWiki 1.39.6

Reply to "does this extensions work with the Citizen theme?"

Is there a way to suppress the namespace?

6
Wikinaut (talkcontribs)

Is there a way to suppress the namespace in the list of visited pages?

Cindy.cicalese (talkcontribs)

No, that is not currently a feature, although it could be implemented.

Wikinaut (talkcontribs)

Okay, I will try to implement it, most likely as an option for LocalSettings or as something via CSS.

Cindy.cicalese (talkcontribs)

You should be able to follow the pattern of other preferences in the extension to add it as an option.

Wikinaut (talkcontribs)

Yes, of course.

Wikinaut (talkcontribs)

However, just in case that you find it easy for you, I would be prefer you code that, I help and document it.

Reply to "Is there a way to suppress the namespace?"

Remove or edit the "Last 5 Pages Viewed: " text

3
Pitchke (talkcontribs)

I would like to remove the text "Last x Pages Viewed: " automatically added at the beginning of the line, to improve GUI and simplicity. But this text seems not to be a DOM element on which we can act.

<span id="mwext-bc" class="noprint plainlinks jsbc-breadcrumbs">Last 5 Pages Viewed: <a> ... </a>  →  <a> ... </a></span>

Is there a solution to change this content ? Could you provide this as a new configuration flag or preference ?

Thanks a lot for this development and your support. Pierre.

Kghbln (talkcontribs)

Yes. Edit the "MediaWiki:Jsbreadcrumbs-intro-horizontal" page to change this text.

Pitchke (talkcontribs)

Great, indeed it works fine.

This is not explicitely documented for the extension but I now learned that various System Messages can be edited as shown in a wiki at Special:AllMessages page.

Just sharing here for other people interrested.

Thanks Karsten.

Reply to "Remove or edit the "Last 5 Pages Viewed: " text"

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"

vertical option is not formatted correctly with MW 1.37.1 and a quick fix

2
Amm1234 (talkcontribs)

for default vertical option it is not formatted correctly with the wiki css and this to fix it.

sed -i 's/body/vector-menu-content/' extensions/JSBreadCrumbs/resources/JSBreadCrumbs.js

sed -i 's/portal/mw-portlet mw-portlet-navigation vector-menu vector-menu-portal portal/' extensions/JSBreadCrumbs/resources/JSBreadCrumbs.js

Cindy.cicalese (talkcontribs)
Reply to "vertical option is not formatted correctly with MW 1.37.1 and a quick fix"

Example for $wgJSBreadCrumbsCSSSelectorHorizontal?

2
108.26.187.20 (talkcontribs)

Could you please provide an example of using $wgJSBreadCrumbsCSSSelectorHorizontal?

108.26.187.20 (talkcontribs)

Answering my own question: to place the breadcrumbs in the footer for the Vector skin:


$wgJSBreadCrumbsCSSSelectorHorizontal['vector'] = '#footer-info';

Reply to "Example for $wgJSBreadCrumbsCSSSelectorHorizontal?"

git clone doesn't put extension into the needed directory name

5
Tenbergen (talkcontribs)

Cool extension, thank you for putting it together! I installed this via git clone from https://gerrit.wikimedia.org/g/mediawiki/extensions/JSBreadCrumbs because that's the easiest way to record it in my install script. The directory it pulls into is not named as it should be for the extension name. It's a small problem, I know how to rename it, but it took me a few minutes to figure out why it wasn't working. So, if it would be easy to change, that would be an improvement. Thanks!

Cindy.cicalese (talkcontribs)

Hi :-) What is the name of the directory that it pulls into? What is the exact git clone command you used? It works as expected for me.

Tenbergen (talkcontribs)

Hi Cindy! Sorry, I should have been more specific. I was cloning from Github. If I run

git clone https://github.com/wikimedia/mediawiki-extensions-JSBreadCrumbs

it clones into

mediawiki-extensions-JSBreadCrumbs

I was cloning from Github because cloning from gerrit as per the instructions on the top of the page didn't work for me. There it says

git clone ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/JSBreadCrumbs

and if I try that I get an error

Cloning into 'JSBreadCrumbs'...
XXXXX@gerrit.wikimedia.org: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

I have looked back at how I get other extensions, and I can get them from gerrit, but I need to use

git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/JSBreadCrumbs

and if I use that it clones to the correct directory. Would it make sense to change the instructions at the top of the repo page so they use that?

Cindy.cicalese (talkcontribs)

If you want to clone into a directory with a different name from the last segment of the path, you just add another parameter with the name of the directory:


git clone https://github.com/wikimedia/mediawiki-extensions-JSBreadCrumbs JSBreadCrumbs


Unfortunately, those instructions on gerrit are not editable by me. Perhaps Template:ExtensionInstall on mediawiki.org could be expanded to add instructions for downloading from git.

Tenbergen (talkcontribs)

Good idea. Will have posted a comment at Template talk:ExtensionInstall#Installing / downloading. And since I was there I added another issue I recently encountered right below that one. Thanks for sending me in the right direction.

Too bad you can't edit the instructions on gerrit. If you don't know how (and whether at all) that would get changed it's probably unchangable. And who knows, maybe those who actually develop this need the syntax to be that way for other reasons...

Reply to "git clone doesn't put extension into the needed directory name"

Issue: Warning in Browser

1
2405:201:13:BAD5:0:0:C0A8:2 (talkcontribs)

I use Moxilla firefox v90.0 in my Ubuntu Desktop.

On loading the extension, I get the following error:

Cookie “mwext-jsbreadcrumbs” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute.

Please fix this.

Reply to "Issue: Warning in Browser"

Issue and Suggestion

1
2003:E7:5705:2600:A0B5:4117:F1A8:14F6 (talkcontribs)

I have several duplicated entries in the breadcrumb. My assumption for the reason is that the following two cases are not distinguished in the duplicate checking logic:

/index.php/Main_Page

/index.php?title=Main_Page&action=view

Reply to "Issue and Suggestion"

Latest version for MW 1.35

2
S0ring (talkcontribs)
Cindy.cicalese (talkcontribs)

JSBreadcrumbs uses the 'master' compatibility policy (see Compatibility#MediaWiki extensions). To get the most recent code, you need to select the master branch in Extension Distributor or use git to pull the tag you want.

Reply to "Latest version for MW 1.35"
Return to "JSBreadCrumbs" page.