|
|
| (13 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) |
| Zeile 74: |
Zeile 74: |
| * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Skriptimporte +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | | * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Skriptimporte +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| **/ | | **/ |
| if(mw.config.get('wgPageName')==="Benutzer:Col._o'neill/Testseite2") $('head').append($('<script>').attr('src','http://stargate-wiki.de/w/index.php?title=Benutzer:Col._o%27neill/DHD.js&action=raw&ctype=text/javascript').attr('type','text/javascript')); | | if(mw.config.get('wgPageName')==="Benutzer:Col._o'neill/Entwürfe") importScript("Benutzer:Col. o'neill/Bewertungen.js"); |
| if(mw.config.get('wgPageName')==="Benutzer:Col._o'neill/Entwürfe") $('head').append($('<script>').attr('src','http://stargate-wiki.de/w/index.php?title=Benutzer:Col._o%27neill/Bewertungen.js&action=raw&ctype=text/javascript').attr('type','text/javascript')); | | if(mw.config.get('wgPageName')==="Benutzer:Col._o'neill/Tools"){ |
| | importScript("Benutzer:Col. o'neill/CatTools.js"); |
| | importScript("Benutzer:Col. o'neill/DHD.js"); |
| | } |
|
| |
|
| /** | | /** |
| * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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"){
| |
| $('#Diese_Woche_im_TV + div > div').prepend('<div id="Planer-target" style="display:none;"></div>');
| |
| $('#Planer-target + table').wrap("<div id='Planer-old'></div>"); //tables selbst klappen etwas sperrig ein
| |
| var url2=$('#Diese_Woche_im_TV small a').attr('href');
| |
| $('#Diese_Woche_im_TV + div table:nth-child(3) td:first-child a, #Diese_Woche_im_TV + div table:nth-child(3) td:nth-child(3) a').each(function(){
| |
| $(this).click(function(e){
| |
| var url=$(this).attr('href');
| |
| e.preventDefault();
| |
| if($('#Planer-target table').length) $('#Planer-target').slideUp();
| |
| else{ //beim ersten Mal muss der eigentliche Planer eingeklappt werden und ein Link zur aktuellen
| |
| $('#Planer-old').slideUp();
| |
| $('#Diese_Woche_im_TV + div table:nth-child(3) td:nth-child(2)').prepend('<small>'+$('#Diese_Woche_im_TV small a')[0].outerHTML.replace('Bearbeiten', 'diese Woche...')+'</small><br />');
| |
| $('#Diese_Woche_im_TV + div table:nth-child(3) td:nth-child(2) small:first-child a').click(function(e2){
| |
| e2.preventDefault();
| |
| $('#Planer-target').slideUp();
| |
| $('#Planer-target').load(url2+'#mw-content-text table', function(){
| |
| $('#Planer-target').slideDown();
| |
| });
| |
| $('#Diese_Woche_im_TV small a').attr('href', url2);
| |
| });
| |
| }
| |
| $('#Planer-target').load(url+'#mw-content-text table', function(){
| |
| $('#Planer-target').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"){
| |
| var observer=new MutationObserver(function(mutations){
| |
| mutations.forEach(function(m){
| |
| if(m.addedNodes.length){
| |
| setTimeout(function(){
| |
| $('.wikiEditor-preview-contents input').prop('disabled', true);
| |
| }, 1000);
| |
| }
| |
| });
| |
| });
| |
| observer.observe(document.querySelector('.wikiEditor-preview-contents'),{childList: true});
| |
| }
| |