MediaWiki:Common.js: Unterschied zwischen den Versionen

Aus DIQA-Homepage
Wechseln zu:Navigation, Suche
(Added to the wiki via WikiImport-Script.)
 
(Added to the wiki via WikiImport-Script.)
 
(Eine dazwischenliegende Version von einem anderen Benutzer wird nicht angezeigt)
Zeile 1: Zeile 1:
  
  
 
+
/*
 
function showMailPopup() {
 
function showMailPopup() {
 
         if ( mw.config.get( 'wgPageName' ) !== 'Hauptseite' ) {
 
         if ( mw.config.get( 'wgPageName' ) !== 'Hauptseite' ) {
Zeile 11: Zeile 11:
 
         }
 
         }
 
}
 
}
 +
*/
  
 
function resizeImages() {
 
function resizeImages() {
Zeile 17: Zeile 18:
 
}
 
}
  
 +
$("form").submit(function(event) {
 +
  var response = $("#g-recaptcha-response", event.target);
 +
  if (response.length == 0) {
 +
      return;
 +
  }
 +
  var recaptcha = response .val();
 +
  if (recaptcha === "") {
 +
      event.preventDefault();
 +
      alert("Please prove that you are no bot and check the recaptcha");
 +
  }
 +
});
  
  
Zeile 26: Zeile 38:
 
    
 
    
 
  resizeImages();
 
  resizeImages();
$('#form_date').datepicker();
+
/* $('#form_date').datepicker();*/
 
  removeLinkTargetsInMenu();
 
  removeLinkTargetsInMenu();
  showMailPopup();
+
  /*showMailPopup();*/
  
 
});
 
});

Aktuelle Version vom 15. November 2018, 14:35 Uhr



/*
function showMailPopup() {
        if ( mw.config.get( 'wgPageName' ) !== 'Hauptseite' ) {
                var url = new URL(window.location.href);
                var showpopup = url.searchParams.get("showpopup");
                if (showpopup) {
                                alert(url.searchParams.get("popuptext"));
                }
        }
}
*/

function resizeImages() {
  $('.imageExpand img').attr("width","100%");
  $('.imageExpand img').attr("height","100%");
}

$("form").submit(function(event) {
   var response = $("#g-recaptcha-response", event.target);
   if (response.length == 0) {
      return;
   }
   var recaptcha = response .val();
   if (recaptcha === "") {
      event.preventDefault();
      alert("Please prove that you are no bot and check the recaptcha");
   }
});


function removeLinkTargetsInMenu() {
        $('div#mw-navigation-collapse').find('a[target="_blank"]').removeAttr('target');
};

$(document).ready(function() {
  
 resizeImages();
/* $('#form_date').datepicker();*/
 removeLinkTargetsInMenu();
 /*showMailPopup();*/

});


window.onbeforeprint = function() {
};