Benutzer:Col. o'neill/common.js: Unterschied zwischen den Versionen
aus Stargate Wiki, dem deutschsprachigen Stargate-Lexikon
Weitere Optionen
KKeine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 112: | Zeile 112: | ||
//Fix für das inputbox-Problem: Ignoriere alle inputboxen innerhalb der vector-Vorschau | //Fix für das inputbox-Problem: Ignoriere alle inputboxen innerhalb der vector-Vorschau | ||
if(mw.config.get('wgAction')==="edit"){ | if(mw.config.get('wgAction')==="edit"){ | ||
var observer=new MutationObserver(function(mutations){ | $(function() { | ||
var observer=new MutationObserver(function(mutations){ | |||
mutations.forEach(function(m){ | |||
if(m.addedNodes.length){ | |||
$('.wikiEditor-preview-contents').promise().done(function() { | |||
$('.wikiEditor-preview-contents input').prop('disabled', true); | |||
} | }); | ||
/*setTimeout(function(){ | |||
$('.wikiEditor-preview-contents input').prop('disabled', true); | |||
}, 1000);*/ | |||
} | |||
}); | |||
}); | }); | ||
observer.observe(document.querySelector('.wikiEditor-preview-contents'),{childList: true}); | |||
}); | }); | ||
} | } | ||