利用者:Tietew/submitblock.js
お知らせ: 保存した後、ブラウザのキャッシュをクリアしてページを再読み込みする必要があります。
多くの Windows や Linux のブラウザ
- Ctrl を押しながら F5 を押す。
Mac における Safari
Mac における Chrome や Firefox
- ⌘ Cmd と ⇧ Shift を押しながら R を押す。
詳細についてはWikipedia:キャッシュを消すをご覧ください。
// This script is under public domain, and comes with ABSOLUTELY NO WARRANTY.
// You can use/modify/redistribute without any permission.
mw.loader.getScript('https://linky.wikipedia.jp/javascripts/prototype.js').then(function(){
if(!Function.bindAsEventListener) {return;}
var enterp = false;
if($('editform')) {
Event.observe('wpSummary', 'keydown', function(e) {
if(e.keyCode == 13) enterp = true;
}.bindAsEventListener(this));
Event.observe('editform', 'submit', function(e) {
if(enterp) {
enterp = false;
if(!confirm("Are you sure you want to submit your changes?")) Event.stop(e);
}
}.bindAsEventListener(this));
}
});