|
|
| Zeile 80: |
Zeile 80: |
| * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Tests +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | | * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Tests +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| **/ | | **/ |
| //Lade die verlinkten anderen TV-Planer auf der Hauptseite direkt anstatt des normal angezeigten, ohne die Seite verlassen zu müssen
| |
| if(mw.config.get('wgPageName')==="Hauptseite"){
| |
| var iconleft=$('#Diese_Woche_im_TV + div > div > table td:first-child img:first-child')[0].outerHTML;
| |
| var iconright=$('#Diese_Woche_im_TV + div > div > table td:nth-child(3) small + img')[0].outerHTML;
| |
| $('#TVPlaner + table td:nth-child(2)').prepend('<div id="TVPlaner-thisWeek" style="display:none;">'+iconright+'<small>'+$('#Diese_Woche_im_TV small a')[0].outerHTML.replace('Bearbeiten', 'diese Woche...')+'</small>'+iconleft+'</div>');
| |
| $('#TVPlaner + table td:first-child a, #TVPlaner-thisWeek a, #TVPlaner + table td:nth-child(3) a').each(function(){
| |
| $(this).click(function(e){
| |
| var url=$(this).attr('href');
| |
| e.preventDefault();
| |
| $('#TVPlaner').slideUp();
| |
| if($('#TVPlaner-thisWeek').is(':hidden')) $('#TVPlaner-thisWeek').show(); //beim ersten "Umschalten" muss der Link zur aktuellen Woche sichtbar gemacht werden
| |
| $('#TVPlaner').load(url+'#mw-content-text table', function(){
| |
| $('#TVPlaner').slideDown();
| |
| });
| |
| $('#Diese_Woche_im_TV small a').attr('href', url);
| |
| });
| |
| });
| |
| }
| |
|
| |
| //Fix für das inputbox-Problem: Ignoriere alle inputboxen innerhalb der vector-Vorschau
| |
| if(mw.config.get('wgAction')==="edit"){
| |
| window.onload = 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);
| |
| });
| |
| }
| |
| });
| |
| });
| |
| observer.observe(document.querySelector('.wikiEditor-preview-contents'),{childList: true});
| |
| };
| |
| }
| |