Code Monkey home page Code Monkey logo

mw-gadget-rtrc's Introduction

Real-Time Recent Changes

Development

Define the following gadget via your local MediaWiki:Gadgets-definition page, and copy the two source files to MediaWiki:Gadget-rtrc.css and MediaWiki:Gadget-rtrc.js. Commit changes back to Git when done.

rtrc[ResourceLoader]|rtrc.css|rtrc.js

Alternatively, run php -S localhost:9296 in this directory and place the following in your wiki's MediaWiki:Common.js or Special:Mypage/common.js. This way you can load it directly from the working directory.

mw.loader.load('http://localhost:9296/src/rtrc.js');
mw.loader.load('http://localhost:9296/src/rtrc.css', 'text/css');

Deployment

Publish source files to:

mw-gadget-rtrc's People

Contributors

eranroz avatar halfak avatar he7d3r avatar krinkle avatar ladsgroup avatar libkoi avatar ricordisamoa avatar sinonjzh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mw-gadget-rtrc's Issues

Send notification on new edits

When monitoring a wiki in the background, it would be useful to notify the user in some fashion if the tab is in the background.

For example, we can add a symbol or number to the window title.

We could additionally make use of the HTML5 Notifications API and send notifications to the browser itself which are then replaced with successive edits (never showing more than 1). This provides a richer user experience than page titles (more visible, especially if you have lots of tabs open, the tab label is essentially just an icon, windows on other monitors, overlapping windows, ..).


Imported from meta.wikimedia.org:

The RTRC tool is really a masterpiece of JavaScript here. I have a minor suggestion: I've mostly got the tool in a new tab in my browser. Would it be able to change the tab title to a sort of notification like: "(1 pending changes) RTRC: simplewiki" whenever an edit arrives? That would be very useful.

Fire mw.hook for diff load (once supported in mediawiki)

MediaWiki core already implements this for page conten with wikipage.content. I expect other hooks will follow soon for things like portlets, categories and diffs.

When it does, we can fire those hooks from RTRC so that other gadgets can universally add utility links (e.g. "rollback AGF", "rollback VANDAL" etc. like Twinkle does) regardless of whether the diffs are shown by MediaWiki or by RTRC.


Originally requested on meta.wikimedia.org by Matanya on 31 January 2011.

Don't show "my patrol log" for anonymous users

The "[my patrol log]" link has user=null if the user is not registered. The tool could get the IP from Geo.IP – Helder, 22:44, 3 October 2012 (UTC)

Thanks! I'll convert it into a different bug. Anonymous users don't have the patrol right, as such linking to their log is useless. That link shouldn't be shown unless there is a patrol token received. – Krinkle, 22:13, 4 October 2012 (UTC)

Indeed! That solution is also good. – Helder, 11:24, 5 October 2012 (UTC)


Originally requested on meta.wikimedia.org

Allow patrolling all edits to an specific page

This used to be possible via vPopSpeed [1](by Henna), and later SpeedPagePatrol [2](by me), but is no longer possible due to (very valid) security restrictions [3]. It wasn't supposed to be possible to have a Tool just open a page and automatically patrol a bunch of edits for you.

I later attempted to implement this inside RTRC (by adding a page-name filter, similar to the user-name filter), however this too had to disappear due to this feature no longer existing in the MediaWiki API backend [4] (the query is not optimised by SQL index, and thus caused Wikimedia production requests to time out).

The idea is to use the Query tool (Krinkle/mw-tool-query#1) to fetch the rcids of the specified page name, and feed those back to the MediaWiki API.

[Feature] WikiEditor and Semantic Forms

To use the costum script in combination with semantic form please
change

    // Only on editpage
    if ($.inArray(mw.config.get('wgAction'), ['edit', 'submit']) !== -1) {

into

    // Only on editpage
    if ($.inArray(mw.config.get('wgAction'), ['edit', 'submit', 'formedit']) !== -1) {

Thanks!

Use Intuition from Tool Labs

Switch I18N backend from the old I18N.php at Toolserver to the API of the Intuition instance at Tool Labs (Krinkle/TsIntuition#3).

Error "Cannot mark as patrolled" when last edit in recentchanges is hijacked by Translate

On wikis that have Translate installed, such as mediawiki.org, sometimes the review interface gets broken unrecoverably because RTRC was unable to retrieve a patrol token.

api.php?format=json&action=query&list=recentchanges&rctoken=patrol&rclimit=1&rctype=new

Though the patrol token is the same for every page, it is expose via ApiQuery on a per item base. And when that top item from rclimit=1 is a translateable page, Translate extension throws an exception and makes the query return { error: unknown .. tpt-target-page .. } instead.

Add a link to page history

Sometimes a user has made several consecutive edits in an article. At this situation it may be easier to check the whole diff of changes made by the user.

Currently if I want to do that, I will need to open the article (or a diff) and then click on page history and then select ...
If there was a link to the page history at RTRC's user interface it would have made my job one step easier.

(Although it would be much better if RTRC could directly show the whole changes made by a user in recent edits and mark them as patrolled at once. But I thought that it may be hard to implement, so for now just adding a link to page history would be nice.)

Add option to show changes by bots

I would like to be able to include the flood and bot flagged edits in the RTRC feed, obviously off by default. Thanks for this tool, by the way, it is very handy.

Replace "R" by a more descriptive label

I always forget what is the meaning of that "R" inside the .mw-rtrc-settings-refresh lavel.
Since there is plenty of space, this one letter label should be changed to something more descriptive.

Diff frame is jumpy

I was about patrolling AWB-edits in mass-patrol mode, filled-in the user, and attempted to scroll down to the list but it was not very pleasing because it often collapsed the diff-section completely before showing the new diff. Can this be enhanced e.g. not fading out until the new diff is not faded-in/ ready to fade-in?

Do not link IPs' user pages

Currently, RTRC links all users' pages, while the link does not work for anonymous ones. The link should be removed or directed to the user's contributions. mw.util.isIPv4Address and mw.util.isIPv6Address can be used to distinguish registered users and link to their user page.

I suppose this involves L264.

Originally reported here.

MassPatrol gets stuck on already-patrolled changes

Even when enabling the "Unpatrolled only" filter (which should be set by default when enabling MassPatrol) it's still possible to hit a patrolled change by accident if someone else patrols it between fetching the feed and the iteration over them.

In that case MassPatrol should ignore them and iterate over unpatrolled changes only. Basically we should make sure to filter client-side as well, not just in the query for the feed from the server.

Add link to RTRC on Special:RecentChanges

Consider adding a link to the default recent changes page of the wiki pointing to your customized version (i.e. your /RTRC subpage on that wiki), so users can find it more easily (just in case they are expecting the script to improve the existing special page, which is something I've seen...)


Originally requested on meta.wikimedia.org by @helder-git on 13:49, 15 January 2013 (UTC).

Cache cvn-api response data

To save having to query the same users and pages again. RTRC can be kept open for a long time (hours or even days). Make sure objects (and absence of objects) is not cached for more than a few minutes at most.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.