--=REKLAMA=--
Uwaga: aby zobaczyć zmiany po zapisaniu, może zajść potrzeba wyczyszczenia pamięci podręcznej przeglądarki.
/* == Informacja o niewpisaniu opisu zmian == ; Autorzy (Authors): [[:pl:User:Adziura|Adam Dziura]], [[:pl:User:Nux|Maciej Jaros]] ; Wyłączenie (disable): window.NoSummaryWarningDone = true; <pre> */ window.oSummaryWarning = new Object(); oSummaryWarning.version = 1; oSummaryWarning.init = function () { var that = this; if (window.NoSummaryWarningDone) { return; } // Ignore user's own pages if ( mw.config.get('wgCanonicalNamespace') == "User" ) { var m = mw.config.get('wgPageName').match(/^[^:]+:([^\/]+)(?:$|\/)/); if (m && m[1] == mw.config.get('wgUserName')) { return; } } jQuery('#wpSave').click(function(event) { if (!that.validateForm()) { event.preventDefault(); } }); } oSummaryWarning.validateForm = function() { var input_el = document.getElementById('wpSummary'); if (!input_el) { return true; } var summary = input_el.value; // user has been warned if (input_el.warningSet) { return true; } // empty or nothing but section comment if (summary == '' || summary.substring(summary.indexOf('*/'))=='*/ ') { // ignore redirects - there is autosummary var wpTextbox1 = document.getElementById('wpTextbox1'); if (wpTextbox1.value.match(/^#(?:REDIRECT|PRZEKIERUJ|TAM|PATRZ)/i)) { return true; } // do not check titles of sections on non-talk pages if (mw.config.get('wgNamespaceNumber') % 2 == 0 && input_el.form.wpSection.value == 'new') { return true; } // set warning, do not submit form input_el.warningSet = true; input_el.className = 'summaryWarning'; document.getElementById('wpSummaryLabel').className = 'summaryWarning'; return false; } return true; } jQuery(document).ready(function() { oSummaryWarning.init() });