User talk:PleaseStand/References segregator

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Empty named refs[edit]

Why not check through the other occurrences of a named ref if the first one found is empty, to find the citation text? Equazcion (talk) 04:03, 14 Mar 2010 (UTC)

PS. This is an interesting script that addresses a prominent annoyance, so thanks for writing it. I'll try to test it "in the field" and provide feedback. This could easily be a gadget if it works consistently enough. Equazcion (talk) 04:06, 14 Mar 2010 (UTC)

Here's the reason why. I could easily do so (just change a setting within the script that I added to allow for conversion to LDR), but my concern is that this would cause refs to automatically move to the first locations they are used (for example, into infoboxes). A worst-case scenario because of this would be an edit war between those using the tool and those who are not. I'll go add a config setting for that right now so you can try that out and possibly suggest improvements. PleaseStand (talk) 04:45, 14 March 2010 (UTC)[reply]
Added experimental setting. To use the setting make a new bookmark in your web browser (for example, right-click the Bookmarks Toolbar and select New Bookmark). For the Location or URL put in the code: javascript:void(SegregateRefsJsCompleteSearch=true) and save the bookmark. Now you can try the setting by clicking on the bookmark before you click the green button that activates the script. Oh, and if you can't get that to work, bypass or clear your cache (in Firefox, hold the Shift key while clicking the Reload button) and try again. PleaseStand (talk) 04:58, 14 March 2010 (UTC)[reply]
I tried placing SegregateRefsJsCompleteSearch=true; in my monobook.js in the line before importScript, and that seems to trip the experimental setting too. Looks like it works, too. I understand why you didn't make this the default behavior, but I don't anticipate any edit-war scenarios where this will turn into a problem for me (if there are I likely won't be using this script in those situations anyway). Some scripts document optional config settings by setting variables directly in [theme].js like I did with this (most notably Twinkle), so you could let people know of this option and its caveats. Equazcion (talk) 05:28, 14 Mar 2010 (UTC)
I added code to avoid the unnecessary shifting of refs that marks the "preferred location" by temporarily capitalizing "ref" to "REF" (implemented as "caseCues"). I believe this to be less problematic than refs shifting into infoboxes. Now the "complete search" option is the default. Let me know what you think, trying it out on articles such as GRB 970508. You should find that the script makes no change if you made no change (except if the article already has capitalized ref tags in it). I was considering writing a script, integrated with this one, to split the edit box into text sections (so that we don't have to wait for the Usability Initiative's section jump links to work properly), but is this script now gadget-quality, more or less, as it is? PleaseStand (talk) 21:15, 29 March 2010 (UTC)[reply]
Sorry I seem to have missed this reply. That's a clever solution you came up with, with the capitalization. I'm sure you've been testing this already for a while, but I'll try it out on a few articles and see. Of course I don't make the decisions as far as gadgets go, I can just offer my opinion. Equazcion (talk) 13:06, 30 Apr 2010 (UTC)
Well, can you bypass your cache now? I have now updated the script to improve its handling of such issues as clicking the back button while editing (it used to lose the ref contents, now it performs the integration early). Of course that will make it even harder to change to get working on IE (which has its merits). PleaseStand (talk) 02:53, 5 May 2010 (UTC)[reply]
Apparently it only helps in Firefox. Opera and Safari do no better. (Have not tried Chrome, I believe Google is evil.) PleaseStand (talk) 03:02, 5 May 2010 (UTC)[reply]
Am I incorrect about the Safari part? I just tested it again and it seems to work as intended. PleaseStand (talk) 00:44, 6 May 2010 (UTC)[reply]

Undo issue[edit]

I found an issue in which browser undo causes problems. Go to any article, click the green button, and then select the browser's Undo function. At least on Firefox 3.6.2, this causes the ref contents to reappear. Is there any way to prevent the undo function from acting in this case (i.e. clear the undo history)? PleaseStand (talk) 06:04, 30 March 2010 (UTC)[reply]

Never mind, I fixed it already. I added a new function, clearUndoHistory, that removes the textbox from and then re-inserts it back into the DOM. No undo problems on Firefox, Safari, or Opera. PleaseStand (talk) 02:27, 7 April 2010 (UTC)[reply]

References segregator in finnish wikipedia[edit]

Hi, i am just noting that we just added References segregator to finnish wikipedia's pienoisohjelmat ( eg "my preferences / gadgets" in english) because it is quite handy tool. Thanks :) --Zache (talk) 03:30, 13 April 2010 (UTC)[reply]

You might want to localize the script though: it sometimes shows English-language messages. See the message in User:PleaseStand/segregate-refs.js ("Translate the right-hand side of these if necessary...") for instructions on how to do this. The "separate file" that it refers to is fi:Järjestelmäviesti:Gadget-segregate-refs.js. If you can't figure it out, the localization part does not work well with Finnish, or if localization does not work at all, just ask, and I will help you solve the problem. PleaseStand (talk) 11:29, 13 April 2010 (UTC)[reply]
I have posted the code you need to use at User:PleaseStand/References segregator/Localization. Only change what is within the quotes (the \n is a line break). The code to load the script is at the bottom. PleaseStand (talk) 22:14, 13 April 2010 (UTC)[reply]
Hi, thanks for notifying! :) I will localize it to finnish in couple of days when i have little bit more time. (It has been littlebit hurry last ten days, but after tomorrow i think i have time) --Zache (talk) 17:09, 19 April 2010 (UTC)[reply]

screenshot?[edit]

When I take a five-second-look at this page to determine whether to add it to my .JS, what would be really helpful is a screenshot. Thanks and good work.

User:Agradman editing for the moment as IP 160.39.220.88 (talk) 03:56, 30 April 2010 (UTC)[reply]

I think screenshots would be a good idea. I added a couple. Equazcion (talk) 12:31, 30 Apr 2010 (UTC)

Google Chrome[edit]

Seems to work fine under Chrome. You might want to update the documentation.

The only problem I have had is that this utility works only when editing the entire article, not when editing a section. ~Amatulić (talk) 21:16, 13 September 2010 (UTC)[reply]

Merge back button[edit]

Segregate button

Once seggregate button is clicked the button disappears and panes appear. Instead a similar button can be placed to merge back, before previewing or saving. The button can have caption "Merge back segregated refs" with same css of existing button. Anyway i guess code is there to merge back as on submit the text is merged back, so it is matter of adding just one button. I came to know about this from discussion here. Cheers! Ideas river (talk) 06:39, 18 December 2012 (UTC)[reply]

Box for inline footnotes has shrunk[edit]

Hello PleaseStand, I am having a problem with the tool: the box containing the inline footnotes is suddenly only one line tall. If you have time to investigate that would be great. Thanks, — Diannaa (talk) 22:43, 13 January 2023 (UTC) I am using Chtrome on a Chromebook. — Diannaa (talk) 22:45, 13 January 2023 (UTC)[reply]

Thank you for the report.
The bug should be fixed now. It was an incompatibility with the Realtime Preview feature of the WikiEditor extension (also known as the "editing toolbar" or the "2010 wikitext editor").
References Segregator used to set the number of rows for the ref textbox to half the number of rows used for the main textbox (normally 25). You used to be able to change that in Preferences, until the preference was removed in 2017. So for now, I changed the code to use 12 rows, which is what would have been used before, up until Realtime Preview was enabled last year. PleaseStand (talk) 11:09, 24 January 2023 (UTC)[reply]
Everything is working great again. Thanks for the fixes! — Diannaa (talk) 15:30, 24 January 2023 (UTC)[reply]