Jump to content

Wikipedia talk:User scripts/Archive 1

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Pppery (talk | contribs) at 22:17, 24 October 2019 (Recreating 2005 archive deleted, presumably in error, in 2019 from history). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Uh oh, too late.  :-) I just finished using the winc function to include them all. I'm still learning this stuff. I put the individual functions as subpages of my monobook.js, and now it has a monobook.js link at the top of each one, which is convenient and logical. See User:Omegatron/monobook.js/mathcharacterfixer.js, for example. — Omegatron 06:22, 12 January 2006 (UTC)
It sort of works, but not perfectly. It tries to parse math tags and template markup inside the scripts, for instance (like a script that puts a template into an article.) I'm not sure what to do with it. — Omegatron 19:44, 18 January 2006 (UTC)
Yes, you'd have to split up those things in scripts that you want to include with this technique - something like mathStart='<math'+'>', function template(x){return '{'+'{'+x+'}'+'}';} etc etc etc. Lupin|talk|popups 01:02, 19 January 2006 (UTC)

Fixed sidebar

A while ago, I figured out some kludgy css to make the sidebar stay in the same position while you scroll, so it's always accessible. This is what mine looks like right now: — Omegatron 07:56, 12 January 2006 (UTC)

I figured it out now that I know some css.  :-) I'll post here after I've tested it for a few days. — Omegatron 03:13, 4 February 2006 (UTC)
See meta:Help:User style/floating quickbarOmegatron 21:27, 4 February 2006 (UTC)

Non-intrusive notification

Is there non-intrusive alternative to the alert() box? Something non-modal? They really annoy me. I guess the background color could be changed or something to at least indicate an error... — Omegatron 07:30, 14 January 2006 (UTC)

In a tab-based script, I used this to change the background color of the tab when clicked, to indicate without interrupting that there is no action to perform:
document.getElementById('ca-unverified').firstChild.style.backgroundColor = "#ff4444";
document.getElementById('ca-unverified').style.backgroundColor = "#ff4444";
(Both statements were needed for me to look right with rounded-corner tabs.) See User:Omegatron/monobook.js/unverified.jsOmegatron 08:51, 14 January 2006 (UTC)
This is a cute way of "fixing" alert in whatever way you desire. http://slayeroffice.com/code/custom_alert/ Lupin|talk|popups 12:32, 14 January 2006 (UTC)

Testing scripts?

Hi all. I'm about to start writing a script that makes image tagging easier, and I was looking for some advice on how to test it. I think testing tips would be a valuable addition to the techniques page. ~MDD4696 03:39, 23 January 2006 (UTC)

New template for tool installation

I've generalised {{navpop}} to give a new template, {{js}} for easy installation of scripts. Lupin|talk|popups 23:48, 25 January 2006 (UTC)

Ease of use, part II

Following up on #Ease of use, and especially on Lupin's comments (though I still need to study his code to see where mine can be improved), I made another version on Wikipedia. If you want to have a look (and please do), this is what you need to do:

  • Add the following fragment to your monobook.js (if something like this is eventually adopted, this can be put in Mediawiki:monobook.js):

if (location.href == "http://en.wikipedia.org/wiki/User:Jitse_Niesen/Client-side_preferences") {

  {{subst:js|User:Jitse_Niesen/Client-side_preferences/Main.js}}

}

Three warnings: It works in my configuration but it might not work in orther ones, your old user script is overwritten, and the script for the "since" tab does not work for me.

I'm curious what you think of it. -- Jitse Niesen (talk) 02:06, 28 January 2006 (UTC)

Tracking abuse in recent changes

I have recently written a Python script that reads the atom feed of the recent changes and reports whether there were edits containing suspicious words such as '!!!' or 'rulez!'. I have asked Brion about whether this feature is going to be introduced anytime to the recent changes page, and he told me it is on the feature list but not for the near future.
The question is whether there is such a program already in existance, that tries to identify abuse on pages, and I am wasting my time? If there are such scripts or programs, I would appreciate a link to them.
My little script can be found here: http://he.wikipedia.org/wiki/%D7%9E%D7%A9%D7%AA%D7%9E%D7%A9:Gloomy/WikiPolice
Omer Enbar 23:37, 30 January 2006 (UTC)

Perhaps User:CryptoDerk/CDVF or User:Lupin/Anti-vandal tool? -- Jitse Niesen (talk) 23:43, 30 January 2006 (UTC)

Some help

I tried adding test-n.js into my monobook but it won't work on IE or firefox. Some help? Thanks.--Urthogie 10:50, 1 February 2006 (UTC)

A curly brace was missing; see this diff. Can you fix it yourself in your monobook or do you want me to fix it for you? -- Jitse Niesen (talk) 12:56, 1 February 2006 (UTC)
I got it, thanks!--Urthogie 14:17, 1 February 2006 (UTC)