Wikipedia talk:Scripts

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
WikiProject IRC (Rated Project-class)
WikiProject iconThis page is within the scope of WikiProject IRC, a collaborative effort to improve the coverage of Internet Relay Chat on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 Project  This page does not require a rating on the project's quality scale.
 

Untitled[edit]

So, scripting requests got moved here, where they're even more obscure. Not that anyone was hopping to do them before, but is there any way to make these more obvious or more likely to get done? More rewarding to the runner? I'm trying cash elsewhere, we'll see how that goes. --Ben Brockert 03:25, May 21, 2004 (UTC)

The SQL needed to run them would help. Perhaps instructions on exactly how to get the database and what to do with it for people that have absolutely no idea where to start might encourage others to do this rather than relying on the few people that already have it set up. Angela. 05:46, May 21, 2004 (UTC)
I agree, i have currently no idea how to run an SQL query to get that data, but if people would post the query needed to run it maybe more people would do it. --Ævar Arnfjörð Bjarmason 08:34, 2004 May 21 (UTC)

mIRC script[edit]

For the mIRC script that allows you to click on Wikilinks, is there any way to make the links open in an already open tab of an already open window? Right now it opens a completely new window; I know it is possible because before I foolishly "upgraded" the script to this new version, there was a version that worked the way I want...I just don't know how to do it now. Adam Bishop 23:23, 19 Jul 2004 (UTC)

Wikipedia:Tools[edit]

I am currently, together with User:Sj, establishing the page Wikipedia:Tools. The goal is to given an overview of tools for browsing and editing the wikipedia. I would like to suggest to interlinkt Wikipedia:Scripts more closely with the new page, and hope that we manage to coordinate the contents of the two pages in a sensible way. greets, -- 217.82.181.205 23:37, 24 Aug 2004 (UTC) (that is de:Benutzer:Duesentrieb)

Original mIRC Script Not Efficient[edit]

Quoting the mIRC Scripting documentation: Note: The script for hotlink events should be as small and as fast as possible since the event triggers each time the mouse is moved over a word.

In the original script, the hotlinker code actually evaluates 6 wildcard comparisons on every mousemove. Mine evaluates nothing. These are very resource intensive. Alot of the code is reductant, as my script will also accept multilingual and meta requests. Thank's to CXI for pointing this out.

Masterhomer

Wikilinks - supersedes older scripts[edit]

This script provides, to my knowledge, greater functionality with less processing than the long, inefficient script currently in place. In accordance, I have moved Wikilinks to the top of the mIRC link scripts section and refactored the description text appropriately.

If there are any problems with this, please let me know. CXI 01:51, 14 Nov 2004 (UTC)

Looks like this does not work if the linked text has a , after it such as [[ARTICLE]], Dalf | Talk 10:14, 14 August 2005 (UTC)
Also does not seem to work in query windows. Dalf | Talk 07:26, 18 August 2005 (UTC)

Unicode numeric converter scripts - Javascript[edit]

I use Help:Special_characters#ISO-8859-1_Characters for converter script upgrade. You can try it here. New code (use wikitext to copy):

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head><title>Unicode conversion utility</title></head>

  <body>
   <form name="charform">
     <p>Type here, and all Wikipedia unsafe characters will be converted to &#1234; codes.</p>
     <p>Input:</p>
     <textarea name="input" cols="80" rows="25" onkeyup="revtxt()">       Sorry, this page is useless with Javascript disabled.
     </textarea>
     <p>Output (don't type here):</p>
     <textarea name="output" cols="80" rows="25">       Sorry, this page is useless with JavaScript disabled.
     </textarea>
    </form>
    <script language="Javascript">
      document.charform.input.value="";
      document.charform.output.value="Don't type here.";
      function revtxt() {
        var s=document.charform.input.value;
        o="";
        for( m=0;s.charAt(m);++m )
          if (
          	( (c=s.charCodeAt(m))<128 && c!=38 ) ||
          	(c>=160 && c<=255 &&
          	 c!=166 &&
		 c!=173 && c!=178 && c!=179 &&
		 c!=185 && c!=188 && c!=189 &&
		 c!=190 &&
		 c!=208 &&
		 c!=215 &&
		 c!=221 && c!=222 &&
		 c!=240 &&
		 c!=253 && c!=254
		)
          ) o+=s.charAt(m);
          else if (c==38) o+="&";
          else o+="&#"+c+";";
          document.charform.output.value=o;
      }
    </script>
    See <a href="http://en.wikipedia.org/wiki/Wikipedia:Scripts">Wikipedia:Scripts</a>.
</body></html>

Wikilinks doesn't work with 2 byte character titles on ja.wikipedia.org. --Ypacaraí 07:23, 2005 Feb 19 (UTC)

wmlinksubber.py[edit]

This script seems to be very buggy. When trying to load it into Silverex X-Chat 2 on Windows XP, it crashes as soon as it encounters a WikiLink. Can someone else check it? Cctoide 21:17, 27 July 2005 (UTC)

I second this. I'm using version 0.0.8c of the script and I'm having the same problems. Landus Mikain 23:32, 13 December 2006 (UTC)

UPDATE: Try removing the C:\Documents and Settings\$user$\Application Data\X-Chat 2\.ircwikimapping.txt file if one exists.

Did that and everything fixed itself.

the Talk. Like. This. script....[edit]

I have one suggested (optional) variant. Urls often get ruined if they are the last item in a line of text. A simple isin can prevent this (for the rare times when someone includes a url). Changes in red:

on *:INPUT:#: { 
  if (/* iswm $1) || (http:// isin $1-) { $input }
  elseif (($asc($right($1-,1)) > 96) && ($asc($right($1-,1)) < 123)) || (($asc($right($1-,1)) > 64) && ($asc($right($1-,1)) < 91))  || ($right($1-,1) isnum) {
    msg $active $+($upper($left($1-,1)),$right($1-,-1),.) 
    halt
  }
}

Now, someone could of course do a search for the last space, and see if "http" proceeded it, or other more complex methods, but this is quick and easy and mostly effective. Additional parameters to seek "ftp://", "gopher://", "www.", and "ftp." (the supported mirc prefixes for auto-url clicking) could be added as well, but are less used. Thoughts? Splarka (rant) 02:21, 30 September 2005 (UTC)

I've updated the page to include this modification since it makes it a lot more useful. Angela. 03:10, 20 December 2005 (UTC)
Nice. -- 🐺Ghost.NET🐺 TALK 03:42, 8 September 2018 (UTC)

kvirc[edit]

I'd love to see one of the wikilinks scripts translated to KVirc, if possible ;] --негіднийлють (Reply|Spam Me!*) 10:17, 26 November 2005 (UTC)

Compare categroy to list, show differences[edit]

Do we have a script/tool that could do this? I would like to see which entries at Category:Polish nobility are not linked from List of Polish nobility, so I can make sure the list is complete (at least in the regards to category).--Piotr Konieczny aka Prokonsul Piotrus Talk 17:15, 13 January 2006 (UTC)

IRC Recent Changes Script[edit]

Does anybody know the script that puts live Recent Changes on #en.wikipedia (irc.wikimedia.net)? I'm interested in making something similar for another wiki. - Super Sam 14:16, 1 May 2006 (UTC)

How about this: m:Simple_IRC_RC_Bot (see also: m:IRC_channels) Splarka (rant) 07:28, 2 May 2006 (UTC)
Or, if you mean, the bots that parse and display these changes on the freenode channels, see: WP:CVU#Detection_and_reversion Splarka (rant) 07:34, 2 May 2006 (UTC)
The first link you gave me looks pretty much like what I'm looking for, except it doesn't show where to put most of the code, and it looks pretty confusing. It's close, though. - Super Sam 12:21, 3 May 2006 (UTC)
You just put it into LocalSettings.php and UDPserver.pl (you need access to these files to do this) Splarka (rant) 07:39, 4 May 2006 (UTC)

ENABLE[edit]

My school has everything blocked. Don't respond on my talk page, they'll find out. HOw the HELL do I enable JavaScript so I can use this damn proxy?

Central repository of scripts[edit]

For those developers who would rather put their scripts in a central repository, I have created User:Userscripts. (It seems that scripts can't be hosted anywhere outside of the User namespace.) Instructions for setting up a script there can be found on the userpage. Just FYI. Ingoolemo talk 23:10, 1 August 2006 (UTC)

Read an HTML content[edit]

I would know if it is able to know the content of a page. For example, if I want to know the content of the page User:Pasqual (ca)/Status, and then order to show an icon related to the content how I can do it? Pasqual (ca) · CUT 22:26, 7 October 2006 (UTC)

http://javascript.internet.com/page-details/load-html.html
But I dont load the content, only I want to know the content and it returns its value...
For example:
     wpCurrentStatus = http://en.wikipedia.org/wiki/User:Pasqual_%28ca%29/Status
     if (wpCurrentStatus =="offline") {
       wpStatusIcon = "red"; //it would be more extended
     } else if (wpCurrentStatus == 'busy') {
       wpStatusIcon= "yellow"; //it would be more extended
     } else if (wpCurrentStatus = 'online') {
       wpStatusIcon  = "green"; //it would be more extended
     } else {
       wpStatusIcon = "grey"; //case of somebody has vandalized the page, or content is unusual.
Pasqual (ca) · CUT 14:56, 8 October 2006 (UTC)
Please, a channel on ChatZilla to contact with somebody. Pasqual (ca) · CUT 15:09, 8 October 2006 (UTC)

Errata[edit]

Met's script[edit]

There's no need to chmod the script +x. Irssi will not execute the scripts the way you'd normally execute a Perl script. Sjktje (talk) 14:32, 29 November 2007 (UTC)

Not working[edit]

The scripts aren't working. Dont know why. --Efe (talk) 13:05, 17 October 2008 (UTC)

what does this page do here anyway?[edit]

Wiki guidelines[edit]

Technically, this falls under the HOWTO charter and as such does not belong on wikipedia, even if it is of use to the wikipedia crowd of regulars. 213.46.8.238 (talk) 11:28, 9 March 2009 (UTC)

WP:NOTHOWTO only applies to articles. This is in the "Wikipedia" namespace. Radiant chains (talk) 07:15, 30 April 2009 (UTC)


Transcription of Mongolian Cyrillic[edit]

A far-reaching change of the transciption conventions for Cyrillic Mongolian has been suggested at Wikipedia talk:Naming conventions (Mongolian). The suggestion is kh > h, ö > o', ü > u' which might be unfortunate in view of both searchability and workload. In any case, you might want to join the discussion. G Purevdorj (talk) 06:43, 3 September 2011 (UTC)

Protection and management of scripts?[edit]

See discussion at Village Pump (policy)#Protection and management of scripts?. Relevant to Lua, userscripts, and user scripting generally. Comments appreciated.

FT2 (Talk | email) 02:07, 20 March 2013 (UTC)

Unicode scripts[edit]

The unicode scripts at Wikipedia:Unicode_numeric_converter_script#Unicode_numeric_converter_scripts were added when Unicode was inserted into Wikipedia using HTML entities. That is no longer necessary, nor is it likely as we have charmaps, visual editor, etc, etc. I suggest we move them from this page back to whence they came for historical purposes (Wikipedia:Unicode numeric converter script), carefully attributing the authorship of changes/additions. John Vandenberg (chat) 08:33, 26 December 2013 (UTC)

Scripts are not working for me... at all[edit]

1
2

The Wikitext/source editor appears to have changed a bit recently (see 1). Instead of being contained in a box, the wikitext fills up the whole page, and also there is no box at the bottom for the edit summary. When I try to run a script on a page (such as User:GregU/dashes.js), the source editor simply loads (as seen in 2) without implementing the changes. Another script I use is User:Ohconfucius/script/MOSNUM dates.js, and occasionally (as seen in 1) the buttons do not load up (in 2 the buttons are seen in the bottom left hand corner, under “Wikidata item”, but they are missing in 1), and when they do load up, they do not work. I believe this may have something to do with the new source editor, because I had no problem using scripts on the old one. Furthermore, if you look at my non-automated contributions to the article namespace in the past couple of weeks, virtually all of them are tagged with “2017 source edit”. I’ve checked my preferences and it doesn’t seem there is anything in them that has switched my account to edit using this editor, and I don’t know how to switch back to the old one. Is anyone else having this problem? Is there anything I can do so that it will let me use scripts again? LinguistunEinsuno 05:30, 7 November 2017 (UTC)

Pinging Ohconfucius, perhaps they might be able to help. LinguistunEinsuno 08:24, 8 November 2017 (UTC)
I think it is most likely due to the wikitext source editor. AFAIK, the MOSNUM script is functioning properly and hasn't been changed since 6 August 2017‎. The dashes script has been unchanged since 2014 (other than a minor change in May). Another user of my script has noted a failure with WSE. Try disabling it and see if the script becomes normal once again. -- Ohc ¡digame! 20:44, 9 November 2017 (UTC)
As it's a beta, the developer will be aware there could be issues with the feature. You should alert them to this incompatibility so that they can fix it, or if they identify a glitch within my script, they can suggest how to eliminate the source of the problem. -- Ohc ¡digame! 20:52, 9 November 2017 (UTC)
I found out how to disable it and now the scripts work again, thanks! LinguistunEinsuno 21:22, 9 November 2017 (UTC)

Importation of scripts cross-wiki[edit]

An editor in another wiki wants to use one of my scripts that are housed here on en.wp. How can the user import the script into their own vector.js file (without copying/pasting the extire script, with all the intendent risks of obsolescence) for use there? What's the correct syntax to include? -- Ohc ¡digame! 14:03, 3 December 2017 (UTC)

Loading problem[edit]

Hello everyone, a few scripts in my commons.js including pageswap.js, MoveToDraft.js, AfDclosing.js and more suddenly stopped loading after Google Chrome's latest update so is there only me or anyone else facing the same issue. GSS (talk|c|em) 08:32, 21 September 2018 (UTC)