Jump to content

利用者:Jon Harald Søby/diffedit

From Meta, a Wikimedia project coordination wiki
This page is a translated version of the page User:Jon Harald Søby/diffedit and the translation is 86% complete.

diffedit

2021 Coolest Tool
Award Winner

in the category
Tiny

ユーザースクリプトの動作を紹介する動画

diffeditは、差分を表示して直接編集できるようにするユーザースクリプトです。最初は不要に思えるかもしれませんが("編集ボタンはすでにあります")、たとえば記事の見つけにくいところで小さな間違いがあった時、記事全体を編集してその小さな間違いを探したくないときなどに便利です。このスクリプトは、巡回を行われる方に向いています。ページの最新版との差分を表示している場合のみ編集できます。古い版の差分を表示している場合は編集できませんが、代わりに最新版と比較できます。

利用方法

以下のコードを global.js ファイルか common.js ファイルの末尾に追加します:

// [[m:User:Jon Harald Søby/diffedit.js]]
mw.loader.load( '//meta.wikimedia.org/w/index.php?title=User:Jon_Harald_Søby/diffedit.js&action=raw&ctype=text/javascript' );

特徴

  • (ウィキテキスト)diffビューからページを直接編集する
  • コンテンツ・モデル検知 - 対応できないコンテンツ・モデルではスクリプトが有効化されません
  • Accesskeys! (What key combination you need to use to use access keys varies by browser and OS. Here I use "Alt+<key>" to illustrate them, but they could be different for you.)
    • Alt+S もしくは Ctrl+ Enter: 変更を保存
    • Alt+B: サマリー編集へ行く
    • Alt+,: 最初の編集可能要素へ行く
    • Esc: 編集をキャンセル
  • Translations. The script uses existing MediaWiki messages where it can, but some messages are also handled in the script. You can translate them here.

注意点

スクリプトは、次の場合に編集を許可しません:

  • You're viewing an old diff (it will give a link comparing the diff you're on with the current diff, which you can edit)
  • ページのコンテンツ・モデルは、単にテキスト=ベースのそれではありません。
  • あなたはページ編集を許可されてません (例えば保護されている場合)
  • あなたは"ビジュアルdiff(差分)"機能を使います

加えてそれは、このスクリプトがある行を削除することが現在可能ではありません。