MediaWiki:Common.js: Unterschied zwischen den Versionen
Aus DIQA-Homepage
(Added to the wiki via WikiImport-Script.) |
(Added to the wiki via WikiImport-Script.) |
||
Zeile 18: | 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"); | ||
+ | } | ||
+ | }); | ||
Aktuelle Version vom 15. November 2018, 13: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() { };