returns old Wikipedia layout. (layout before 2023 redesign of the website)
< Feedback on Vector Layout for Wikipedia (Fast)
here is a patch to fix that. also works for clean url mode:
--- "Vector Layout for Wikipedia (Fast).user.js" 2026-01-16 09:02:00.723631895 +0100
+++ "Vector Layout for Wikipedia (Fast)-anchor_fix.user.js" 2026-01-16 09:04:28.138609049 +0100
@@ -46,13 +46,13 @@
redirect(href, false, () => {
if(MAKE_CLEAN_URL) {
const url = new URL(href);
- const { searchParams, pathname } = url;
+ const { searchParams, pathname, hash } = url;
if(searchParams.get('useskin') === 'vector') {
searchParams.delete('useskin');
const newSearchParams = searchParams.toString();
- const newPath = pathname + (newSearchParams ? '?' + newSearchParams : newSearchParams);
+ const newPath = pathname + (newSearchParams ? '?' + newSearchParams + hash : newSearchParams + hash);
history.replaceState({}, '', newPath);
}
@@ -70,13 +70,13 @@
throw new Error('"' + inputUrl + '" is not valid URL!');
}
- const { searchParams, pathname, origin } = url;
+ const { searchParams, pathname, origin, hash } = url;
const cleanURL = origin + pathname;
if(searchParams.get('useskin') !== 'vector' && url.pathname !== '/') {
searchParams.set('useskin', 'vector');
- const params = '?' + searchParams.toString();
+ const params = '?' + searchParams.toString() + hash;
const resultURL = cleanURL + params;
const newPath = pathname + params;
Added hash addition to the url. Update review rating to "Good"
thank you.
godsend but removes # from url which breaks navigation. (ex https://en.wikipedia.org/wiki/Euclidean_vector#Representations) doesn’t land you on the Representation section. and if you click to it from the toc it does work but if you then reload it gets removed again