User talk:קיפודנחש/apiRollback.js

This script is only meant for users with "Rollback" permissions.

Using this script, i.e., adding the line

importScript('User:קיפודנחש/apiRollback.js');

to your Special:Mypage/common.js, will change the behavior of the "rollback" link in:

  • recent changes
  • watchlist
  • user contribution
  • history view
  • diff view
I do not know of any other place where "rollback" links exist, but if there is such a place, we prolly want to add it there, too.
the new behavior is so:
  1. When pressing "rollback", instead of being transferred to the diff page once the rollback is successful, you stay on the same page, and a little message appears telling you the rollback was successful, and the "rollback" link itself disappears.
  2. If you right click on the "rollback" link, you are prompted to provide a summary. if you press "cancel" or just leave the summary line empty, no rollback will occur. otherwise, the summary you entered will show on the rollback, and will be remembered by the tool for your next rollback.
  3. Up to 20 summaries are remembered on the local computer.
  4. The macros $1 and $2 can be used in the summary. $1 will be replaced with the page name, and $2 will be replaced by the name of the editor whose edit(s) you are rolling back.

User:קיפודנחש/apiRollback.js edit

Hi, the script User:קיפודנחש/apiRollback.js is not declaring it's dependency on the resource loader module mediawiki.util. This potentially creates incidental breakages of Javascript functionality of the users of this scripts. Can you please fix it ? —TheDJ (talkcontribs) 09:24, 31 July 2017 (UTC)Reply

  Done. peace - קיפודנחש (aka kipod) (talk) 19:32, 31 July 2017 (UTC)Reply

Move from jquery.jStorage to mediawiki.storage edit

Not a huge issue, קיפודנחש, but fwiw there's a console note that jquery.jStorage is deprecated and should be replaced with mediawiki.storage. ~ Amory (utc) 16:57, 16 April 2019 (UTC)Reply

User:Amorymeltzer, thanks. Mediawiki is deprecating stuff regularly. It would be nice to make rhe changes, and i will, eventually, but unfortunately, "they" sometimes deprecate stuff with no good substitute (eg tipsy). I dont think this is the case here, but it makes for a more blase attitude towards the depreciation notices in the console in general... Peace קיפודנחש (aka kipod) (talk) 17:08, 16 April 2019 (UTC)Reply

I hear ya – jquery.ui is the one that bugs me the most. Enough to drive ya crazy... ~ Amory (utc) 17:28, 16 April 2019 (UTC)Reply
Thanks! Looks like this edit introduced a few typos, namely three uses of mw.starage ~ Amory (utc) 09:45, 17 April 2019 (UTC)Reply
Amorymeltzer, I fixed that now. —TheDJ (talkcontribs) 10:56, 17 April 2019 (UTC)Reply