User:Writ Keeper/Scripts/inlineDiffDocs

This is a common documentation page for User:Writ Keeper/Scripts/commonHistory.js, User:Writ Keeper/Scripts/watchlistDiffs.js, User:Writ Keeper/Scripts/userHistory.js, User:Writ Keeper/Scripts/generalHistory.js, and User:Writ Keeper/Scripts/contribsHistory.js. I created userHistory.js first at Yunshui's request; it's a modified version of Ale jrb's user history script. This script fixes a few bugs with Ale jrb's original, and it adds a new feature: a button is added to each entry that displays the diff of that entry in-line, without leaving the page. This way, all the diffs of the listed edits can be displayed, hidden, and re-shown on the same page at once. The generalHistory script extends this functionality to the standard article history page, the contribsHistory script likewise extends it to a user's contribs page, and the watchlistDiffs script does the same for the watchlist (and RecentChanges). The commonHistory.js script is a consolidated version of these scripts, providing the in-place diff functionality of all these scripts, with the exception of the original UserHistory script. That is, it provides the in-place diff functionality to recentchanges, watchlist, contributions, and history screens, without adding the history filter from Ale jrb's original script. Use of the commonHistory.js script instead of the piecemeal scripts is recommended.

By default, the added buttons are a Twinkle-style link like: [inspect diff]. The text that appears can be altered by adding the variables inspectText, showText, and hideText to the same .js page where you installed the commonHistory.js script, right above its import line. For example: if you wanted to change the text into + or -, you would put:

inspectText = "+";
showText = "+";
hideText = "-";
importScript("User:Writ Keeper/Scripts/commonHistory.js");

...where before you might have had only:

importScript("User:Writ Keeper/Scripts/commonHistory.js");

Similarly, if you want viewing the diff to mark that page as viewed on the watchlist, put markAsViewed = true.

If you want to install it on other wikiprojects use the following line instead:

mw.loader.load("//en.wikipedia.org/w/index.php?title=User:Writ Keeper/Scripts/commonHistory.js&action=raw&ctype=text/javascript");

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.