Would #mw-category-media .thumb { display: none; } in monobook.css do the trick?
Bryan
On 11/19/06, Brianna Laugher brianna.laugher@gmail.com wrote:
On 19/11/06, Alphax (Wikipedia email) alphasigmax@gmail.com wrote:
Brianna Laugher wrote:
On 19/11/06, Alphax (Wikipedia email) alphasigmax@gmail.com wrote:
Brianna Laugher wrote:
Hello,
I was wondering if anyone could either write user Javascript to do this, or tell me if it's possible.
Have it so that every Category: page inserts __NOGALLERY__ for that user, ie. they see text links instead of images, when they look at categories.
It would probably be a lot more useful if there was a way to turn it off again at specific times for specific categories, eg. if there was a link somewhere like 'view this category' (what everyone else is doing by default)
Any thoughts?
__NOGALLERY__ is server-side. File a bug.
File a bug?? How is it a MediaWiki bug? I'm pretty sure the reply will come back 'just set your browser preference to stop loading images'.
It's an RFE... ideally, you want the images in the gallery to not be loaded. If you don't care about actually loading the images (you just want them to disappear):
addOnloadHook( function () { if(wgCanonicalNamespace == "Category") // or wgNamespaceNumber == 14 { for(var id in document.getElementsByTagName("div")) { if(document.getElementsByTagName("div")[id].className == "thumb") { document.getElementsByTagName("div")[id].style.display = "none"; } } // refresh the footer document.getElementById("footer").style.display = "none"; document.getElementById("footer").style.display = ""; } }
Tested via a javascript console in Firefox 2.0, using Monobook. Should work if you put it in monobook.js but I haven't actually tested it.
Needs another closing ")" .
It stops the images in categories from loading, but it doesn't actually display them as if you had put __NOGALLERY__ there. The difference being that with NOGALLERY you can see the full filename. Here they are still truncated: "20030702 2 July 2003..."
But anyway, nice. I put it here: http://commons.wikimedia.org/wiki/MediaWiki:Nocategoryimages.js
I also created a category:User scripts. If anyone else has some nifty Javscript for Commons feel free to add it to this category.
I must say I really like the method of creating extra MediaWiki pages and then getting users to 'include' them in their own Javascript files. It is possibly not the best-scaling solution ever, but it is so much neater than copying a trillion different versions of code around.
Brianna _______________________________________________ Commons-l mailing list Commons-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/commons-l