Benutzer:J*/vector.js: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
J* (Diskussion | Beiträge) (jedes mal vergess ichs) |
J* (Diskussion | Beiträge) (und das noch) |
||
Zeile 31: | Zeile 31: | ||
if (! jQuery("#wpSummary").val().replace(/^\s+/,"").replace(/\s+$/,"") && summaryWarnState == -1) | if (! jQuery("#wpSummary").val().replace(/^\s+/,"").replace(/\s+$/,"") && summaryWarnState == -1) | ||
{ | { | ||
+ | jQuery("#wpSummary").focus(); | ||
summaryWarnInterval = window.setInterval(summaryWarn,70); | summaryWarnInterval = window.setInterval(summaryWarn,70); | ||
return false; | return false; | ||
Zeile 46: | Zeile 47: | ||
summaryWarnState ++; | summaryWarnState ++; | ||
if (summaryWarnState % 2 == 0) | if (summaryWarnState % 2 == 0) | ||
− | jQuery("#wpSummary").css("background-color","# | + | jQuery("#wpSummary").css("background-color","#ffff99"); |
else | else | ||
jQuery("#wpSummary").css("background-color","#ffffff"); | jQuery("#wpSummary").css("background-color","#ffffff"); |
Version vom 7. Dezember 2010, 14:35 Uhr
/* für's Bürokratenspiel */
function bksp ()
{
if (wgPageName.indexOf("Projekt:Bürokratenspiel") != -1 )
{
var t = wgTitle.split("/");
var e = (wgAction = "edit") ? "$ " : "";
document.title = t[t.length-1];
}
}
addOnloadHook(bksp);
/* Zusammenfassungs-Warnung */
addOnloadHook( function () {
jQuery("#wpSummary, #wpTextbox1").bind("keypress", function() {
jQuery("#wpSummary").css("background-color","#ffffff");
try {
clearInterval(summaryWarnInterval);
summaryWarnInterval = null;
}
catch (e) {}
summaryWarnState = -1;
});
jQuery("#editform").bind("submit", function (e) {
if ( e.originalEvent.explicitOriginalTarget != jQuery("#wpSave")[0] )
return true;
if (! jQuery("#wpSummary").val().replace(/^\s+/,"").replace(/\s+$/,"") && summaryWarnState == -1)
{
jQuery("#wpSummary").focus();
summaryWarnInterval = window.setInterval(summaryWarn,70);
return false;
}
return true;
});
});
summaryWarnState = -1;
summaryWarnInterval = null;
function summaryWarn()
{
summaryWarnState ++;
if (summaryWarnState % 2 == 0)
jQuery("#wpSummary").css("background-color","#ffff99");
else
jQuery("#wpSummary").css("background-color","#ffffff");
if (summaryWarnState > 11)
clearInterval(summaryWarnInterval);
}