Jump to content

Wikipedia talk:User scripts/Guide

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Adithyak1997 (talk | contribs) at 16:09, 27 June 2020 (Editing and testing an existing gadget: new section). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Futher development

I'm thinking about moving this page to Meta, which seems like a better place. Any thoughts? Also, dividing the content into some subpages seems like a good idea at the moment, this should allow adding more information on some specific issues. —AlexSm 18:34, 22 September 2008 (UTC)[reply]

You mean as a "Help:" page? Yeah, that might be an idea. Although that is somewhat messy since then you have to separate out all the (English) Wikipedia specific things and keep the text site-neutral. Which makes the text harder to use for Wikipedia editors. If you do the move then first check that they don't already have a similar page on Meta. Remember to add the proper templates at the top and bottom so we can import it back as a "Help:" page here at Wikipedia with a "Wikipedia specific" section.
I suggest you keep this page here while you build the other page at Meta and let the Meta page mature a little before you perhaps make this page into a (soft) redirect to the local copy of the Meta page. (So we see the "Wikipedia specific" section.)
What things are you thinking of splitting out to separate subpages? I see it covers some different subjects. I would like to change the order of the sections, for instance move the "Editing and loading the user script" and "CSS files" sections above the "DHTML methods".
--David Göthberg (talk) 18:38, 23 September 2008 (UTC)[reply]
Okay, I'll probably do just that: start with a copy on Meta. Subpages will alow me to explain some things in greater details without making the whole page look intimidating.
The "DHTML methods" section is exactly what I wanted to get rid of, by moving most of its content to a subpage, cause it just looks like a bad attempt to teach some JavaScript and is not really related to the guide. So you can move it down or simply delete the irrelevant parts.
AlexSm 19:00, 23 September 2008 (UTC)[reply]
Ah, I see. Yeah, the DHTML section is somewhat confusing. But some of the text in there is useful for beginners and I am anyway not knowledgeable enough in JavaScript to tinker with that section. So I'll just move it to the end of the page for now.
--David Göthberg (talk) 22:22, 23 September 2008 (UTC)[reply]

Moving elements

Today User:Zvn edited section "Removing elements". He changed this:

To move an element simply attach it in another place with appendChild() or insertBefore().

to this:

To move an element simply attach it in another place with appendChild() or insertBefore() and remove the original element with removeChild().

I am just a beginner javacoder, but I think that is wrong. There is no need to remove the item from the old position manually, that happens automatically when one has inserted it in a new position.

--David Göthberg (talk) 10:32, 8 December 2009 (UTC)[reply]

My bad; should have checked it first. Thanks for keeping an eye—I've undone this change.--Zvn (talk) 13:20, 8 December 2009 (UTC)[reply]

Technical Advice IRC meeting

We'd like to invite you to the weekly Technical Advice IRC meeting. The next one is tomorrow, Wednesday 3-4 pm UTC on #wikimedia-tech.

The Technical Advice IRC meeting is open for all volunteer developers, topics and questions. This can be anything from "how to get started" over "who would be the best contact for X" to specific questions on your project.

If you know already what you would like to discuss or ask, please add your topic to the page. -- Michael Schönitzer (WMDE) (talk) 12:34, 19 September 2017 (UTC)[reply]

"Edit a page and other common actions" out of date

Hi, the mentioned section is out of date, seems like

mw.user.tokens.get('editToken')

is depreciated: https://phabricator.wikimedia.org/T234576

I would appreciate an update to this page, it’s a very short/simple guide to getting started on using the API.–CennoxX (talk @ dewiki) 09:51, 8 November 2019 (UTC)[reply]

Loading stylesheet

In the section "Working with CSS", it says:

An alternative way is to put this line anywhere in your css instead:

mw.loader.load( 'http://localhost/wikipediatest.css', 'text/css' );

I assume this should actually be placed in a Javascript file that is being loaded and executed? isaacl (talk) 19:06, 5 May 2020 (UTC)[reply]

Editing and testing an existing gadget

There are many issues related to the gadget Twinkle in mlwiki and mlwikisource. What method can be adopted to edit and test this code without having an Interface admin and without affecting other users? I tried to edit with browser JS running option on Windows, but it didn't work as it showed mw.loader not found. So, are there any alternatives to edit and test the code? Adithyak1997 (talk) 16:09, 27 June 2020 (UTC)[reply]