In case anyone else is looking for a selector to add because their breadcrumbs disappear in Vector (2022), I found this to work pretty well:
$wgJSBreadCrumbsCSSSelectorHorizontal = [ 'vector-2022' => '#mw-content-subtitle' ];
In case anyone else is looking for a selector to add because their breadcrumbs disappear in Vector (2022), I found this to work pretty well:
$wgJSBreadCrumbsCSSSelectorHorizontal = [ 'vector-2022' => '#mw-content-subtitle' ];
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
No, that is not currently a feature, although it could be implemented.
Okay, I will try to implement it, most likely as an option for LocalSettings or as something via CSS.
You should be able to follow the pattern of other preferences in the extension to add it as an option.
However, just in case that you find it easy for you, I would be prefer you code that, I help and document it.
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.
Yes. Edit the "MediaWiki:Jsbreadcrumbs-intro-horizontal" page to change this text.
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.
Do you have any plans to update this extension to work with Timeless skin?
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.
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.
@Isarra, is there a CSS selector that would be best to use to insert the breadcrumbs in Timeless? The default is "#top", but I don't know if this exists in Timeless. The selector can be changed with a configuration variable ($wgJSBreadCrumbsCSSSelectorHorizontal) for testing. Once we know what the correct value is for Timeless, I can also add it as a default in the code (https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/JSBreadCrumbs/+/master/resources/JSBreadCrumbs.js#101).
#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(
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(
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
Thank you for reporting this and providing a fix. I created https://phabricator.wikimedia.org/T300256 to track it.
Could you please provide an example of using $wgJSBreadCrumbsCSSSelectorHorizontal
?
Answering my own question: to place the breadcrumbs in the footer for the Vector skin:
$wgJSBreadCrumbsCSSSelectorHorizontal['vector'] = '#footer-info';
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!
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.
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?
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.
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...
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.
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