wikimedia-gadgets / twinkle Goto Github PK
View Code? Open in Web Editor NEWThe English Wikipedia twinkle javascript helper
Home Page: http://en.wikipedia.org/wiki/Wikipedia:Twinkle
License: Other
The English Wikipedia twinkle javascript helper
Home Page: http://en.wikipedia.org/wiki/Wikipedia:Twinkle
License: Other
I keep getting error 231 at a rate of about 50% of the pages I protect when it's trying to change the page. (Sorry if I am duplicating a request already, but the search function seems to be down)
Firefox 3 has issues creating the dialogs for XfD, ARV, and probably others. The 'Work area' is not properly prefilled, user can workaround it by manually triggering a change event in the select dropdown.
http://en.wikipedia.org/w/index.php?title=Wikipedia_talk:Twinkle&oldid=431651910#Dialogs_in_Firefox_3
http://en.wikipedia.org/w/index.php?title=Wikipedia_talk:Twinkle&oldid=431651910#Warning_dropdown_missing
When I try to use Twinkle to leave a talkback tag on someone's page, it does not go through. I am using Internet Explorer 9 and Windows 7.
If a page is nominated at XFD and Twinkle fails to add an entry to the XFD log page (presumably because the log page is malformed), the rationale which the user has previously typed in is lost. Twinkle should present this text to the user somehow, so they don't have to re-type it when they add the entry manually.
Any possibility of adding a "Warn" link or tab to the native rollback results page?
I find that I prefer to use native rollback with Lupin's AVT for speed reasons, but I still warn the vandal with Twinkle because it offers the full range of uw-* templates. However, to do so, I have to copy the article name, manually navigate to the user's talk page, and paste the article name in the TW warning box.
A link to warn directly from the native rollback results page, or at least to pass the article information to the user's talk page to warn from there, would be appreciated.
I brought this up on WT:TW (see http://en.wikipedia.org/wiki/Wikipedia_talk:Twinkle#Warn_link_from_native_rollback.3F), and it seemed to be received positively, so I figured I'd file it in the tracker so it's not forgotten.
Currently, the values of variable Namespace are defined directly on source code:
https://github.com/azatoth/twinkle/blob/2d5caddb7f70054457538fece23fcd9bb3aacdd7/morebits.js#L982
I think it would be helpfull to reuse the values which MediaWiki provides through mw.config.get( 'wgNamespaceIds' ), for better compatibility with other wikis. For English Wikipedia, the current value of mw.config.get( 'wgNamespaceIds' ) is:
{
'': 0,
book: 108,
book_talk: 109,
category: 14,
category_talk: 15,
file: 6,
file_talk: 7,
help: 12,
help_talk: 13,
image: 6,
image_talk: 7,
media: -2,
mediawiki: 8,
mediawiki_talk: 9,
portal: 100,
portal_talk: 101,
project: 4,
project_talk: 5,
special: -1,
talk: 1,
template: 10,
template_talk: 11,
user: 2,
user_talk: 3,
wikipedia: 4,
wikipedia_talk: 5,
wp: 4,
wt: 5
}
so, it is likely that Twinkle could use the default MW variable instead of creating its own copy.
Per TW-B-394:
If twinklewarn finds an existing warning section for the current month on the user's talk page, it will simply append the warning to the page and thus the last section. It does not take into account that the last section may be about something unrelated.
I recently made improvements to the G6 {{db-xfd}} functionality, such as asking for parameters, but, after the parameters are entered, Twinkle gets stuck with the error message "Tagging page: Checking for tags on the page..."
noticed that the submit button for deletable image doesn't work
[[WT:TW#Traverse not working]]
::Okay, it deleted the first image in the category when I clicked delete (as it should) but then it didn't go on to the next (it used to pop up with the next image immediately). It gives an error message of "Grabbing image links: The title parameter must be set" on the line after "Deleting image: done". If you click the "Skip" button after getting that error, though, it goes on to the next one. Also, unrelated, but Traverse has never seemed to unlink images even if the "Remove image instances to the image" box is checked.
::Sorry I'm not posing this on github; I don't have an account there and it just seems like it would be a pain to set one up just for a single error report. Also, if it matters, I'm running Firefox 4.something on Ubuntu Linux 11.04. –[[User:Drilnoth|Drilnoth]]([[User talk:Drilnoth|T]] • [[Special:Contributions/Drilnoth|C]] • [[Special:Log/Drilnoth|L]]) 16:26, 8 June 2011 (UTC)
From WT:TW:
http://en.wikipedia.org/w/index.php?title=Wikipedia:Sockpuppet_investigations/Ceredigion&oldid=442160192
Twinkle does not add on to the original Sock report, even if it's on the same day. --Σ 06:13, 30 July 2011 (UTC)
I marked a lot of stuff in morebits.js as REMOVEME. Most of it is unused, and I think it can be removed.
On
https://github.com/azatoth/twinkle/blob/2d5caddb7f70054457538fece23fcd9bb3aacdd7/morebits.js#L72
there is
cookie += "; path=" + path || "/";
I think this should be
cookie += "; path=" + (path || "/");
or else the result will be "path=undefined" instead of "path=/".
Per TW-B-450:
Twinkle-Revert from a user's contributions don't work anymore.
Considering that IE<9 doesn't have an .indexOf() function for Array, could you replace all its uses by $.inArray?
On "morebits.js" there are two functions using indexOf on arrays. The code
result.indexOf( current ) === -1
from Array.prototype.uniq could be changed to
$.inArray( current, result ) === -1
Analogously, the code
uniques.indexOf( current ) === -1
from Array.prototype.dups could be changed to
$.inArray( current, uniques ) === -1
For more info, see:
User warnings no longer work. An error message appears for a second then a redirect to the main WIkipedia page. This is happening with both Safari (5.0.5) and Camino (2.1a2). I've cleared out the cache in both
We should use these functions to reduce total bytes on wire. Would be much better not to grab page text
just for adding something after it.
For some G6 and G8 CSD templates (and probably others), there is no corresponding notice, but a user can still turn on notification for, say, G6 and G8 in their preferences, and Twinkle still attempts to do a notice, resulting in just code, such as {{subst:db-talk-notice}}.
I was talking to AzaToth on IRC about this, and there will be some issues with cleaning this up. Some G6 criteria, for example, have notices, and some don't, so the G6 option in preferences can't be eliminated. Thus, there will need to be specification for each type of G6 in twinklespeedy.js for whether or not there is an associated notification (and for the other criteria as well).
Hello, folks! Since the Twinkle community is patrolling edits continuously, I believe that the tool could be modified to spread WikiLove (http://www.mediawiki.org/wiki/WikiLove) as well as enforcing policies.
What I mean is: Twinkle users that find good edits -especially by users with few edits- should be abled to send them congratulations and encouraging messages.
Since I don't use Twinkle, I can't explain how this new feature could work. But I'm sure you can find great ideas. Good luck!
On
https://github.com/azatoth/twinkle/blob/2d5caddb7f70054457538fece23fcd9bb3aacdd7/morebits.js#L93
there is the following:
var re = new RegExp( ";\s*" + name + "=" );
This regex doesn't match a cookie whose name is in the beginning of the string, because the ";" is only used after the first pair of key/value. A possible fix would be to change that line to
var re = new RegExp( "(?:^|;)\s*" + name + "=" );
Compare:
http://www.rubular.com/r/UYVs9PzKBo
http://www.rubular.com/r/EhBQiu0fdh
Per TW-B-361:
When adding issue tags to an article, existing tags should be grouped into the same {{multiple issues}} tag.
From WT:TW:
Using Twinkle PROD on a REDIR page PRODs the target page instead. [[User:Bazj|Bazj]]([[User talk:Bazj|talk]]) 15:24, 12 July 2011 (UTC)
: Thanks for the note. Actually, since redirects can't be PRODded, solution will simply be to inform the tagger to use RfD instead. ~~~~
http://en.wikipedia.org/w/index.php?diff=443203951
The new section header says "August 2010" when it should have said "August 2011". Please fix this. ;-)
This does not only happen to real bot users (which may be not using twinkle...) but happen to users with flood flag.
There are hardcoded direct links like "/wiki/Wikipedia:Twinkle/Preferences", that will break on the secure server.
Should use mw.util.wikiGetlink( "Wikipedia:Twinkle/Preferences" )
Also things like:
rppLink.setAttribute('href', mw.config.get('wgArticlePath').replace('$1', rppPage.getPageName()));
should probably be:
rppLink.setAttribute('href', mw.util.wikiGetlink( rppPage.getPageName() ) );
When tagging a page for speedy deletion when there is already a tag on the page, Twinkle says "Tagging page: {{db-(whatever)}} is already placed on the page, which is the expected functionality.
However, when there is a speedy template on the page that has parameters, such as {{db-copypaste|Logan}}, it says: "Tagging page: {{db-copypaste| is already placed on the page," where there should be two curly braces instead of the parameter pipe at the end. It's a minor cosmetic issue, but it should be fixed.
Original title: The Welc-Anon template puts the signature in the wrong place
Rather than putting the signature inside the border, it puts it below it. See this link for an example: http://en.wikipedia.org/w/index.php?title=User_talk:178.192.110.55&oldid=462556544
When performing a speedy deletion, if the deletion rationale selected is one for which the user talk page is to be opened, the talk page is always opened in a new window, regardless of the "When opening a user talk page, open it" setting. This is occurring for me on Google Chrome 13.0.782.32 on Mac OS X 10.6.8.
When I try to use Twinkle to perform a BLP PROD request, when I click the "propose deletion" button, nothing happens.
From TW-B-414:
;Rtrim issue on Google Chrom
Alright, I'm using both Firefox and Chrome for Ubuntu, and I'm running into an interesting issue on a script which relies on Twinkle. I don't know if it's your fault or AWeenieMan's fault, but Chrome is getting stuck on something that FF isn't.
The code is the following (line 377), [[User:AWeenieMan/furme.js]]:
:editSummary += 'adding ' + imageTags.replace('\n', ', ').rtrim(', ');
Firefox will jump into line 1120, [[User:AzaToth/morebits.js]], into the following function:
:String.prototype.rtrim = function stringPrototypeRtrim( chars )
Google Chrome, however, errors out with this message:
:Uncaught TypeError: Object {{tl|Copy to Wikimedia Commons}}, has no method 'rtrim' {{right|1=/w/index.php?title=User:AWeenieMan/furme.js&action=raw&ctype=text/javascript:377}}
:furmeEditText {{right|1=/w/index.php?title=User:AWeenieMan/furme.js&action=raw&ctype=text/javascript:377}}
:furme {{right|1=/w/index.php?title=User:AWeenieMan/furme.js&action=raw&ctype=text/javascript:132}}
:addOnloadHook {{right|1=bits.wikimedia.org/skins-1.5/common/wikibits.js?283-5:52}}
:(anonymous function) {{right|1=/w/index.php?title=User:AWeenieMan/furme.js&action=raw&ctype=text/javascript:52}}
[[User:Magog the Ogre|Magog the Ogre]]([[User talk:Magog the Ogre|talk]]) 22:49, 29 October 2010 (UTC)
PS. I've tried it on Windows and it fails there too. It can be reproduced by installing FURME, going to [[:File:Harry Bemis.jpg]] and clicking tag -> and choosing any of the options below (i.e., the ones not in the dropdown), and clicking submit. [[User:Magog the Ogre|Magog the Ogre]]([[User talk:Magog the Ogre|talk]]) 23:01, 29 October 2010 (UTC)
Per TW-B-261:
Triggering an action by selecting a radio-button is non-standard, and will catch Twinkle-Newbies off guard when they first experience it with Twinklespeedy and probably others.
We won't want to sacrifice the ease of use, but maybe we could replace the radio buttons with small standard buttons?
Currently,
https://github.com/azatoth/twinkle/blob/2d5caddb7f70054457538fece23fcd9bb3aacdd7/morebits.js#L684
the function RegExp.escape doesn't escape the following character: "-".
This may cause problems in some cases, so I think it is good idea to replace the current regular expression
/(/|.||+|?|||(|)|[|]|{|}||$|^)/g
by
/([{}()|.?+-^$[]])/g
which is the same used on $.escapeRE() which comes with MediaWiki.
See also:
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/resources/jquery/jquery.mwExtension.js?view=markup#l17
https://bugzilla.wikimedia.org/show_bug.cgi?id=27848
https://bugzilla.wikimedia.org/show_bug.cgi?id=27960
When Twinkle tags an article with {{db-multiple}} (that is, speedy deletion for multiple criteria), it only leaves the CSD message on the author's userpage. Unlike other speedy deletion tags, it does not also leave a welcome message, like {{firstarticle}}. Can that be fixed? Singularity42 (talk) 16:34, 24 June 2011 (UTC)
A newbie who has experimented is a great target for a friendly welcome template. Since Twinkle doesn't offer one I have to hack up one of the existing ones. It would be great if I could just enter the page they tested on and go.
When I go to request a page protection, it gives me an error: twinkleprotect: unknown kind of action
It's been on several pages, and so far I've been unable to successfull request a page protection
Font size in modern too small.
I made the following change on-wiki, which appears to work well with the skin css in Vector, Monobook, and Modern:
http://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-morebits.css&diff=prev&oldid=431794243
Anyone else having this issue? Has Twinkle been disabled? My interface (the tabs) have returned to normal and when viewing prior edits I no longer have the option to perform any rollbacks, its basically as Wikipedia normally is when Twinkle is disabled except I checked, disabled and reenabled it and it isn't coming back
friendlytag adds the {{null}} template. Reported at
http://en.wikipedia.org/w/index.php?title=Wikipedia_talk:Twinkle&oldid=431651910#Null_tags
Examples:
http://en.wikipedia.org/w/index.php?title=Gone_%28Buffy_the_Vampire_Slayer%29&diff=prev&oldid=431636330
http://en.wikipedia.org/w/index.php?title=Fallen_Idols&diff=prev&oldid=431635536
This comment I made today (http://en.wikipedia.org/w/index.php?title=Wikipedia:Templates_for_discussion/Log/2011_August_19&diff=445647972&oldid=445647459) was moved down to other nominations everytime someone else nominated a template with Twinkle (http://en.wikipedia.org/w/index.php?title=Wikipedia:Templates_for_discussion/Log/2011_August_19&diff=next&oldid=445648187, http://en.wikipedia.org/w/index.php?title=Wikipedia:Templates_for_discussion/Log/2011_August_19&diff=next&oldid=445649072, http://en.wikipedia.org/w/index.php?title=Wikipedia:Templates_for_discussion/Log/2011_August_19&diff=next&oldid=445654055, http://en.wikipedia.org/w/index.php?title=Wikipedia:Templates_for_discussion/Log/2011_August_19&diff=next&oldid=445675118).
Per TW-B-254:
If a user tags a page (with issue tag or deletion tag) and the page has changed between the user loading it and editing it via Twinkle, the user should be informed of the change since the issue may be moot.
This may also be relevant for other Twinkle actions (not sure if Twinkle's "Revert to Revision" already performs that check, for example)
When ever I go to an article page or any page on the English WikiPedia. I get this error; Could not parse twinkleoptions.js so, I checked what should be a MediaWiki: Page of that and nothing exists there at MediaWiki:twinkleoptions.js so I don't know if thats where it is talking about or where but I can't use Twinkle because of the parsing problem.
Twinkle uses the client clock for numerous tasks: section headers in user warnings and list pages for various XfD tasks come to mind.
Since client clocks are often a bit off (this comes up regularly), it would be beneficial to ask the server for the time, and use that one.
Can confirm that the config page doesn't work under chrome. wasn't able to deduce what exactly went wrong (saw some api.php undefined (undefined) for a second). Instead of ajaxing, it seems to try to make an GET request with the form to the current page.
From
UAA & AIV reports sometimes can't be saved due to an alleged edit conflict. It tries to save two or three times, and then gives up.
I could reproduce it once, but the problem dissolved while I was trying to debug it. It re-manifests from time to time though.
I'm currently going though the backlog of files that can be moved to Commons however when tagging CSD F8, it would be nice if TW could also remove the {{Move to Commons}} (and related ({{mtc}} etc) tags).
Thanks
Can we get templates like {{schoolblock}} added to the warn-->block list?
Per TW-B-263:
Twinkle-DI and possibly ARV are supposed to (re)load the relevant page after processing, but apparently didn't with Old Twinkle.
Not sure whether this is still the case.
For example when users want to speedy-delete redirects -- these can be technically identified by whether the user is directly viewing the redirect (ie. with &redirect=no).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.