User:Daniel Quinlan/Scripts/Catatonic: Difference between revisions

From Wikipedia, the free encyclopedia

Content deleted Content added


 

Line 23: Line 23:

* Select the ”’enable activity tags”’ link next to the Page ID to enable activity tags for that category in Catatonic.

* Select the ”’enable activity tags”’ link next to the Page ID to enable activity tags for that category in Catatonic.

* Return to the category to see activity tags appended next to each page.

* Return to the category to see activity tags appended next to each page.

* To disable activity tags for a category, return to the page information page and click ”’disable activity tags”’.

* To disable activity tags for a category, return to the page information page and ”’disable activity tags”’.

=== Activity tags ===

=== Activity tags ===

Activity tags display the number of days since last page activity with colors indicating elapsed time:

Activity tags display the number of days since last page activity with colors indicating elapsed time:

* 0 to 6 days: <span style=”color: var(–color-success, #229679);”>green (fresh)</span>

* 0 to 6 days: <span style=”color: var(–color-success, #229679);”>green</span>

* 7 to 13 days: <span style=”color: var(–color-warning, #a97e2a);”>yellow (warning)</span>

* 7 to 13 days: <span style=”color: var(–color-warning, #a97e2a);”>yellow</span>

* 14 or more days: <span style=”color: var(–color-error, #de5a49);”>red (stale)</span>

* 14 or more days: <span style=”color: var(–color-error, #de5a49);”>red</span>

* unknown or error: <span style=”color: var(–color-base, #808080);”>gray (default)</span>

* unknown or error: <span style=”color: var(–color-base, #808080);”>gray</span>

== Configuration ==

== Configuration ==


Latest revision as of 01:50, 1 October 2025

Catatonic adds color-coded indicators showing the number of days since the last edit on user-configured categories.

  • User-configurable: Enable color-coded activity tags on any category.
  • Persistent storage: Categories are saved to your user preferences and work across devices.
  • Detailed data attributes: Inactivity is expressed using days, weeks, and months for custom styling with CSS.

Catatonic is useful for categories where displaying page activity can help with workflow management. Examples include:

  • From any category page, open Page information in the Tools menu.
  • Select the enable activity tags link next to the Page ID to enable activity tags for that category in Catatonic.
  • Return to the category to see activity tags appended next to each page.
  • To disable activity tags for a category, return to the page information page and select the disable activity tags link.

Activity tags display the number of days since last page activity with colors indicating elapsed time:

  • 0 to 6 days: green
  • 7 to 13 days: yellow
  • 14 or more days: red
  • unknown or error: gray

Managing configured pages

[edit]

After enabling or disabling a category, a notification will display your currently configured pages with links to their information pages.

Advanced users can customize the appearance of activity tags using CSS:

.catatonic-inactivity { color: var(--color-base, #808080); }
.catatonic-inactivity[data-weeks] { color: var(--color-error, #de5a49); }
.catatonic-inactivity[data-weeks="1"] { color: var(--color-warning, #a97e2a); }
.catatonic-inactivity[data-weeks="0"] { color: var(--color-success, #229679); }

Each activity tag has data attributes for more advanced styling:

  • data-days: Number of days since last activity
  • data-weeks: Number of weeks since last activity
  • data-months: Number of months since last activity (approximated as 30 days)

For example, to add “days” after the number of days:

.catatonic-inactivity::after {
	content: ' days';
}

To install the Catatonic script, follow these steps:

  1. In your preferences, go to Preferences → Gadgets. At the bottom of the “Advanced” section, click the “Install scripts without having to manually edit JavaScript files (documentation)” checkbox, then click the “Save” button.
  2. Return to this page and click the blue “Install” button.

Alternatively, you can manually install it by adding the following code to your common.js file:

{{subst:iusc|User:Daniel Quinlan/Scripts/Catatonic.js}}

Leave a Comment

Your email address will not be published. Required fields are marked *

Exit mobile version