Misplaced Pages

User:Technical 13/Scripts/OneClickArchiver: Difference between revisions

Article snapshot taken from[REDACTED] with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
< User:Technical 13 | Scripts Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 21:50, 30 January 2015 editTechnical 13 (talk | contribs)37,142 edits couple little changes← Previous edit Latest revision as of 15:18, 17 June 2024 edit undoAaron Liu (talk | contribs)Extended confirmed users, Pending changes reviewers, Rollbackers14,937 edits added Category:Misplaced Pages manual archiving tools using HotCat 
(23 intermediate revisions by 18 users not shown)
Line 1: Line 1:
{{for|similar userscripts (including scripts with active maintainers)|Misplaced Pages:One click archiving}}
{{for|the original version|User:Equazcion/OneClickArchiver}}
{{caution|This version of OneClickArchiver is buggy and was blanked in 2023 to prevent disruption to Misplaced Pages.<br/>'''An updated version of this script, maintained by ], is available at ]'''.}}
{{Infobox user script {{Infobox user script
| name = OneClickArchiver | name = OneClickArchiver
Line 19: Line 22:
] and other high-traffic discussion pages, normally ] automatically by ], have gotten long and less manageable recently due to bot instability. OneClickArchiver was created to better enable experienced editors to clear out old discussions themselves, without having to rely on bots. Any discussion page can be set up to use OneClickArchiver. ] and other high-traffic discussion pages, normally ] automatically by ], have gotten long and less manageable recently due to bot instability. OneClickArchiver was created to better enable experienced editors to clear out old discussions themselves, without having to rely on bots. Any discussion page can be set up to use OneClickArchiver.


{| style="width: 60%; border: 1px black solid; background-color: orange; padding: 2px; text-align:center;" {| style="width: 60%; border: 1px black solid; background-color: orange; padding: 2px; text-align:left;"
| style="background: white; padding: 5px; " | ''']''' should only be archived by '''experienced editors''' who understand when ] '''is''' or '''is not''' appropriate. Respect a public page's posted archiving policy regarding how long its discussions must be inactive before they are archived.<br />'''If you do not know how to do this, do not attempt to archive the page.''' | style="background: white; padding: 5px; " | Use of this tool does not obviate your responsibility to understand when archiving a thread is appropriate. In particular:
*''']''' should only be archived by experienced editors. Respect a public page's posted archiving policy; if you are unsure, ask.
*It is rarely appropriate to archive threads in '''another user's talk page'''
|} |}


Line 30: Line 35:
{{Clear}} {{Clear}}
== Further technical notes == == Further technical notes ==
* {{New!|19:25, December 3, 2014}} Activates only on pages that are '''not''' in ] and... * {{#iferror:{{#ifexpr:{{#time:U}}<={{#time:U|19:25, December 3, 2014 +30 days}}|{{Big|1='''New!'''}}}}|'''New!'''}} Activates only on pages that are '''not''' in ] and...
** contain an "new section" tab <small>(you may be using the gadget: ]</small>) ** contain a "new section" tab <small>(you may be using the gadget: ]</small>)
** are in ]. {{New!|23:09, December 1, 2014}} ** are in ]. {{#iferror:{{#ifexpr:{{#time:U}}<={{#time:U|23:09, December 1, 2014 +30 days}}|{{Big|1='''New!'''}}}}|'''New!'''}}
* {{New!|20:35, December 9, 2014}} The script will prepend {{Tl|Clear}} to the top of each section on the archive page to prevent bleed from one section to another. * {{#iferror:{{#ifexpr:{{#time:U}}<={{#time:U|20:35, December 9, 2014 +30 days}}|{{Big|1='''New!'''}}}}|'''New!'''}} The script will prepend {{Tl|Clear}} to the top of each section on the archive page to prevent bleed from one section to another.
* {{New!|20:35, December 9, 2014}} The script now respects {{Tls|Do not archive until}} and will refuse to allow semi-automated archiving of those sections. * {{#iferror:{{#ifexpr:{{#time:U}}<={{#time:U|20:35, December 9, 2014 +30 days}}|{{Big|1='''New!'''}}}}|'''New!'''}} The script now respects {{Tls|Do not archive until}} and will refuse to allow semi-automated archiving of those sections.
** The script will remove the {{Abbr|HTML comment|Looks like: <nowiki><!-- ] </nowiki>{{#time:H:i d F Y}} (UTC) -->}} when archiving sections that are past the {{Abbr|DNAU|Do not archive until}} date. {{New!|20:35, December 9, 2014}} ** The script will remove the {{Abbr|HTML comment|Looks like: <nowiki><!-- ] </nowiki>{{#time:H:i d F Y}} (UTC) -->}} when archiving sections that are past the {{Abbr|DNAU|Do not archive until}} date. {{#iferror:{{#ifexpr:{{#time:U}}<={{#time:U|20:35, December 9, 2014 +30 days}}|{{Big|1='''New!'''}}}}|'''New!'''}}
* {{New!|23:09, December 1, 2014}} The script now will look for ]'s {{Para|headerlevel|}} and will add archive links on that page only for the headerlevel. * {{#iferror:{{#ifexpr:{{#time:U}}<={{#time:U|23:09, December 1, 2014 +30 days}}|{{Big|1='''New!'''}}}}|'''New!'''}} The script now will look for ]'s {{Para|headerlevel|}} and will add archive links on that page only for the headerlevel.
* {{New!|23:12, December 10, 2014}} The script now checks to make sure that the destination archive is a direct subpage. If it is not, it will tell you what it found and what it expected to find so that you can quickly edit the archiving template to correct the problem. * {{#iferror:{{#ifexpr:{{#time:U}}<={{#time:U|23:12, December 10, 2014 +30 days}}|{{Big|1='''New!'''}}}}|'''New!'''}} The script now checks to make sure that the destination archive is a direct subpage. If it is not, it will tell you what it found and what it expected to find so that you can quickly edit the archiving template to correct the problem.
* {{New!|13:10, December 28, 2014}} The script now has the ability to toggle the links off with a link in the toolbar or with the {{Keypress|Alt|Shift|O}} ]. * {{#iferror:{{#ifexpr:{{#time:U}}<={{#time:U|13:10, December 28, 2014 +30 days}}|{{Big|1='''New!'''}}}}|'''New!'''}} The script now has the ability to toggle the links off with a link in the toolbar or with the {{Keypress|Alt|Shift|O}} ].
** {{New!|19:07, December 28, 2014}} OneClickArchiver now uses user.options to remember if the links should be shown or not by default. ** {{#iferror:{{#ifexpr:{{#time:U}}<={{#time:U|19:07, December 28, 2014 +30 days}}|{{Big|1='''New!'''}}}}|'''New!'''}} OneClickArchiver now uses user.options to remember if the links should be shown or not by default.
* '''Only''' uses the bot configuration's page name and counter number. It will '''not''' respect the max archive size, for example, so it will continue archiving to the same page until the counter is changed manually or by an archiving bot.
* Its speed depends largely on the size of the archive and origin pages. Most pages archive quickly, but noticeboards that tend to get very long, like ], can show a significant delay (in the neighborhood of 10-30 seconds, depending on how fast the servers are responding that day). The script code itself executes instantly, but the ]'s response time for page edits can cause delays. * Its speed depends largely on the size of the archive and origin pages. Most pages archive quickly, but noticeboards that tend to get very long, like ], can show a significant delay (in the neighborhood of 10-30 seconds, depending on how fast the servers are responding that day). The script code itself executes instantly, but the ]'s response time for page edits can cause delays.


Line 50: Line 54:
{{User:Technical 13/Scripts/Nav}} {{User:Technical 13/Scripts/Nav}}
{{User:Equazcion/ScriptNav|state=collapsed}} {{User:Equazcion/ScriptNav|state=collapsed}}
] ]
]


] ]

Latest revision as of 15:18, 17 June 2024

For similar userscripts (including scripts with active maintainers), see Misplaced Pages:One click archiving. For the original version, see User:Equazcion/OneClickArchiver.
CautionThis version of OneClickArchiver is buggy and was blanked in 2023 to prevent disruption to Misplaced Pages.
An updated version of this script, maintained by Elli, is available at User:Elli/OneClickArchiver.
User script
OneClickArchiver
Archive progress screenshot (bottom, click to see full).
The "Archive" link (top) shows at the extreme
right side of the screen.
DescriptionAdds archive links to discussions, allowing one-click archiving of individual sections
Author(s)Equazcion (original)
Technical 13 (updates)
StatusStable
UpdatedJune 15, 2024
    (7 months ago)
BrowsersFirefox, Chrome, Opera
SkinsVector
Source
Beta
User:Technical_13/Scripts/OneClickArchiver.js
User:Technical_13/SandBox/OneClickArchiver.js
GitHub repositoryOneClickArchiver

OneClickArchiver allows you to instantly archive a single discussion with a click, via an "archive" link that displays for each section on discussion pages.

Noticeboards and other high-traffic discussion pages, normally archived automatically by bots, have gotten long and less manageable recently due to bot instability. OneClickArchiver was created to better enable experienced editors to clear out old discussions themselves, without having to rely on bots. Any discussion page can be set up to use OneClickArchiver.

Use of this tool does not obviate your responsibility to understand when archiving a thread is appropriate. In particular:
  • Public noticeboards should only be archived by experienced editors. Respect a public page's posted archiving policy; if you are unsure, ask.
  • It is rarely appropriate to archive threads in another user's talk page

To-do list for OneClickArchiver: edit·history·watch·refresh· Updated 2019-08-16


Here are some tasks awaiting attention:
  • Recently completed requests:
    • Add an optional confirmation step.
      • Added a user.option that allows the script to be toggled on or off instead. Achieves the same goal as the request in a better fashion.

Archive page

This script uses a page's MiszaBot configuration (see User:MiszaBot/config) to determine the archive page. You can enable OneClickArchiver support on a page without a MiszaBot configuration (such as your own user talk page) by using {{Archive basics}} and including its two required parameters. Clicking the archive link on pages without a MiszaBot configuration or {{Archive basics}} (with both required parameters) will not successfully perform an archive.

Further technical notes

  • Activates only on pages that are not in Category:Pages that should not be manually archived and...
  • The script will prepend {{Clear}} to the top of each section on the archive page to prevent bleed from one section to another.
  • The script now respects {{subst:Do not archive until}} and will refuse to allow semi-automated archiving of those sections.
    • The script will remove the HTML comment when archiving sections that are past the DNAU date.
  • The script now will look for ClueBot III's |headerlevel= and will add archive links on that page only for the headerlevel.
  • The script now checks to make sure that the destination archive is a direct subpage. If it is not, it will tell you what it found and what it expected to find so that you can quickly edit the archiving template to correct the problem.
  • The script now has the ability to toggle the links off with a link in the toolbar or with the Alt+⇧ Shift+O access key.
    • OneClickArchiver now uses user.options to remember if the links should be shown or not by default.
  • Its speed depends largely on the size of the archive and origin pages. Most pages archive quickly, but noticeboards that tend to get very long, like WP:ANI, can show a significant delay (in the neighborhood of 10-30 seconds, depending on how fast the servers are responding that day). The script code itself executes instantly, but the API's response time for page edits can cause delays.

Installation

To use this script: Copy the line below, then click here, paste the line, and hit Save page.

  • {{subst:Iusc|User:Technical_13/Scripts/OneClickArchiver.js|User:Technical_13/Scripts/OneClickArchiver}}
  • Report any issues on the talk page.
Technical 13's Misplaced Pages scripts
Note: Most scripts have only been tested extensively with the Vector skin.
CautionDue to Technical 13's permanent ban, these tools are currently unmaintained. Other users are encouraged to take on the task of developing and maintaining it.
General use
Beta scripts
Notice!
Alpha scripts
Warning!
Equazcion's Misplaced Pages scripts
Note: Most scripts have been tested extensively only with the Vector skin.
General use
Specialized stuff
Package deal
Categories:
User:Technical 13/Scripts/OneClickArchiver: Difference between revisions Add topic