Benutzer:WWWIG/monobook.js: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
WWWIG (Diskussion | Beiträge) (+ Edit Script Teil 1) |
WWWIG (Diskussion | Beiträge) (+ Edit Script Teil 1a) |
||
| Zeile 6: | Zeile 6: | ||
if ( wgAction=="edit" && | if ( wgAction=="edit" && | ||
| − | wgNamespaceNumber==0 | + | wgNamespaceNumber==0 ) |
| − | |||
addOnloadHook(function() { | addOnloadHook(function() { | ||
| Zeile 22: | Zeile 21: | ||
function do_new_action() { | function do_new_action() { | ||
| − | alert( 'Go' ); | + | if ( document.getElementById( 'wpTextbox1' ).value.indexOf('{{Andere Sprachen|') != -1 ) { |
| + | alert( 'Go' ); | ||
| + | } | ||
} | } | ||
Version vom 27. Juli 2011, 05:43 Uhr
/* -- */
// my_vkdebug = true;
importScript('MediaWiki:Gadget-CheckRCForm.js');
importScript('MediaWiki:Gadget-CatGenRepairForm.js');
if ( wgAction=="edit" &&
wgNamespaceNumber==0 )
addOnloadHook(function() {
if ( t_Position = document.getElementById( 'firstHeading' ) ) {
var t_NewElement = document.createElement('input');
t_NewElement.setAttribute( 'id', 'mw-new-element' );
t_NewElement.setAttribute( 'type', 'button' );
t_NewElement.setAttribute( 'onclick', 'do_new_action();' );
t_Position.appendChild( t_NewElement );
}
});
function do_new_action() {
if ( document.getElementById( 'wpTextbox1' ).value.indexOf('{{Andere Sprachen|') != -1 ) {
alert( 'Go' );
}
}