Jump to content

MediaWiki:Centralnotice-template-B15WMDE 33 151215 ctrl

From Meta, a Wikimedia project coordination wiki

<style type="text/css">

  1. centralNotice.collapsed #WMDE_Banner {
   display: none;

}

  1. WMDE_Banner {
   font-family: Arial, Helvetica, Verdana, sans-serif;
   font-size:13px;
   text-align: left;
   background: transparent;
   display: none;
   position: fixed;
   left: 0;
   top: 0;
   width: 100%;
   z-index: 9999;

}

  1. WMDE_Banner input, select, button{
   font-family: Arial, Helvetica, Verdana, sans-serif;
   font-size: 13px;

}

  1. WMDE_Banner input {
   background: none repeat scroll 0 0 white;
   border: 1px solid #a9a9a9;
   border-radius: 4px;
   padding: 0 2px;

}

  1. WMDE_Banner input[type=radio] {
   padding: 0;
   border: none;

}

  1. WMDE_Banner input.focused {
   border-color: #545454;

}

  1. WMDE_Banner input.invalid {
   border-color: #C25959;

}

  1. WMDE_Banner hr {
   background-color: #a9a9a9;

}

  1. WMDE_Banner div {
   box-sizing: content-box;

}

  1. WMDE_Banner table {
   border: none;
   border-collapse: collapse!important;
   width: 100%;

}

  1. WMDE_Banner td {
   vertical-align: top;

}

  1. WMDE_BannerForm-wrapper {
   width: 254px;
   height: 158px;
   background: #eef0fc;
   border-left: 1px solid #c2cedb;
   border-right: 1px solid #c2cedb;

}

  1. WMDE_BannerForm {
   height: 100%;

}

  1. WMDE_BannerForm td {
   font-weight: bold;
   min-width: 55px;
   white-space: nowrap;
   margin: 0;
   vertical-align: middle;
   padding: 2px;

}

  1. WMDE_BannerForm span label {
   margin-left: 2px;

}

  1. WMDE_BannerForm .amount-options {
   height: 20%;

}

  1. WMDE_BannerForm-payment td {
   font-weight: bold;
   padding: 4px 8px 0 8px;

}

  1. WMDE_BannerForm-payment td:last-child {
   padding: 4px 8px 0 2px;

}

  1. WMDE_BannerForm-payment .amount-options td {
   padding: 2px 0 2px 2px;

}

  1. WMDE_BannerForm-payment .amount-options td:last-child {
   padding: 2px;

}

  1. WMDE_BannerForm-payment .amount-label {
   width: 36px;
   line-height: 22px;

}

  1. WMDE_BannerForm-payment .amount-radio {
   margin: 3px 0 0 3px;

}

  1. WMDE_BannerForm-payment #amount-other-input {
   width: 27px;

}

  1. WMDE_BannerForm-payment button {
   cursor: pointer;
   display: inline-block;
   font-weight: bold;
   width: 110px;
   border: 3px double #ddd;
   border-radius: 8px;
   background: #ffffff; /* Old browsers */
   background: -moz-linear-gradient(top, #ffffff 0%, #e5e5e5 100%); /* FF3.6+ */
   background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #e5e5e5)); /* Chrome,Safari4+ */
   background: -webkit-linear-gradient(top, #ffffff 0%, #e5e5e5 100%); /* Chrome10+,Safari5.1+ */
   background: -o-linear-gradient(top, #ffffff 0%, #e5e5e5 100%); /* Opera 11.10+ */
   background: -ms-linear-gradient(top, #ffffff 0%, #e5e5e5 100%); /* IE10+ */
   background: linear-gradient(to bottom, #ffffff 0%, #e5e5e5 100%); /* W3C */
   filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e5e5e5', GradientType=0); /* IE6-9 */
   margin: 0 1px;

}

  1. WMDE_BannerForm-payment button.active {
   color: #FF6C00;
   background: #e5e5e5; /* Old browsers */
   background: -moz-linear-gradient(top, #e5e5e5 0%, #ffffff 100%); /* FF3.6+ */
   background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #e5e5e5), color-stop(100%, #ffffff)); /* Chrome,Safari4+ */
   background: -webkit-linear-gradient(top, #e5e5e5 0%, #ffffff 100%); /* Chrome10+,Safari5.1+ */
   background: -o-linear-gradient(top, #e5e5e5 0%, #ffffff 100%); /* Opera 11.10+ */
   background: -ms-linear-gradient(top, #e5e5e5 0%, #ffffff 100%); /* IE10+ */
   background: linear-gradient(to bottom, #e5e5e5 0%, #ffffff 100%); /* W3C */
   filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e5e5e5', endColorstr='#ffffff', GradientType=0); /* IE6-9 */

}

  1. WMDE_BannerForm-payment button:hover {
   color: #0645ad;

}

  1. WMDE_BannerForm-payment button.active:hover {
   color: #FF6C00;

}

  1. WMDE_BannerForm button:hover {
   color: #0645ad;

}

  1. WMDE_Banner-facts {
   background: #CEDFF1 url(https://upload.wikimedia.org/wikipedia/donate/3/37/Information-icon-yellow.png) no-repeat 10px 8px;
   background-position: left 10px bottom 4px;
   height: 100%;
   min-height: 65px;
   padding: 0;
   position: relative;
   width: 100%;
   border: none;
   border-collapse: collapse;

}

  1. WMDE_Banner-text {
   color: #000;
   font-size: 17px;
   font-weight: bold;
   line-height: 1.2em;
   margin: 4px 10px 4px 35px;
   text-align: justify;
   padding-bottom: 2px;

}

  1. WMDE_Banner-legal {
   position: relative;
   margin: 0;
   padding: 10px 40px 10px 40px;
   line-height: 16px;
   z-index: -10;
   background: #CEDFF1;
   top: -100px;
   text-align: center;

}

  1. WMDE_Banner-close-wrapper {
   padding: 0;
   width: 20px;

}

  1. WMDE_Banner-close {
   background: url(https://upload.wikimedia.org/wikipedia/donate/2/27/Small-white-close.png) no-repeat center center;
   background-color: black;
   cursor: pointer;
   display: block;
   height: 20px;
   width: 20px;
   position: absolute;
   top: 0;

}

  1. WMDE_Banner-facts p b {
   background: yellow;
   color: black;
   padding: 1px 0.5em;

}

  1. WMDE_Banner .interval-hidden {
   display: none;

}

  1. WMDE_Banner_info {
   margin: 0 10px 2px 35px;
   line-height: 16px;
   position: relative;
   border-top: 1px solid #988A00;
   padding-top: 2px;
   color: #000000;

}

  1. WMDE_Banner_text {
   display: inline-block;

}

  1. WMDE_Banner_info span {
   margin-right: 10px;

}

  1. WMDE_Banner_info span.binfo-ucase {
   text-transform: uppercase;

}

  1. WMDE_Banner_info span.binfo-bold {
   font-weight: bold;

}

  1. WMDE_Banner span.btext-highlight {
   background-color: yellow;
   padding: 1px 5px;

}

  1. WMDE_Banner .highlight {
   background-color: yellow;

}

  1. amtTarget {
   color: rgba(0, 0, 0, 0.5);
   font-size: 15px;
   font-weight: bold;
   position: absolute;
   right: 0;
   top: 3px;
   width: 70px;

}

/* --- Error Msg --- */

  1. WMDE_Banner-amounts.fieldset-error, #WMDE_Banner-frequency.fieldset-error {
   float: left;
   border: 2px solid red;
   padding-top: 0.2em;
   padding-bottom: 0.2em;
   margin-left: -2px;
   margin-top: 0.3em;
   margin-bottom: 0.3em;

}

  1. WMDE_Banner-amounts-error-text, #WMDE_Banner-frequency-error-text {
   color: red;
   font-weight: bold;
   display: inline-block;
   text-align: center;
   width: 100%;
   margin-bottom: 0.2em;

}</style> <style type="text/css">

  1. WMDE_Banner-text {
   margin-bottom: 0;
   padding-bottom: 0;

}

  1. donationMeterCell {
   padding:0 10px 0 35px;
   vertical-align: middle!important;

}

  1. donationMeterWrapper {
   position: relative;
   margin: 4px 10px 4px 35px;
   max-width: 1200px;
   background: #FF6C00;
   border: 2px solid #FF6C00;
   border-radius: 8px;

}

  1. donationMeter {
   margin: 0 auto;
   height: 20px;

}

  1. donationFill {
   position: absolute;
   top: 0;
   left: 0;
   width: 90px;
   height: 20px;
   background: #FFFFFF;
   border-top-left-radius: 5px;
   border-bottom-left-radius: 5px;

}

  1. pbarTip {
   position: absolute;
   right: 0;
   height: 20px;

}

  1. pbarTip img {
   vertical-align: baseline;

}

  1. donationText {
   position: absolute;
   right: 12px;
   height: 100%;
   width: 100%;
   text-align: right;
   /*margin: 8px -16px;*/
   line-height: 20px;
   font-size: 14px;
   font-weight: bold;
   color: #B2B2B2;
   overflow: hidden;

}

  1. donationRemaining {
   position: absolute;
   top: 1px;
   right: 10px;
   font-size: 15px;
   color: white;
   font-weight: bold;

}

  1. daysLeft {
   display: none;
   font-size: 14px;
   color: #FF6C00;
   font-weight: bold;
   line-height: 20px;
   position: absolute;
   left: 5px;

}

  1. donationMeterTip {
   position: absolute;
   right: 0;
   background: #ff6c00 url( '//upload.wikimedia.org/wikipedia/commons/8/89/Pbar-tip-small.png' ) no-repeat;
   width: 10px;
   height: 20px;

}</style> <script type="text/javascript">/*jshint latedef: nofunc */ /*jshint unused: false */ /* globals mw, alert, GlobalBannerSettings */ var finalDateTime = new Date( 2015, 11, 31, 23, 59, 59 ), goalSum = 8600000, /* jshint -W079 */ GlobalBannerSettings = typeof GlobalBannerSettings !== 'undefined' ? GlobalBannerSettings : {}, /* jshint +W079 */ baseDate = replaceWikiVars( '2015-12-15' ), collectedBase = parseInt( replaceWikiVars( '6000000' ), 10 ), donorsBase = parseInt( replaceWikiVars( '295000' ), 10 ), donationsPerMinApproximation = parseFloat( replaceWikiVars( '100' ) ), donorsPerMinApproximation = parseFloat( replaceWikiVars( '7' ) ), noIntervalSelectedMessage = replaceWikiVars( '{{{no-interval-message}}}' ) || 'Es wurde kein Zahlungsintervall ausgewählt.', amountTooLowMessage = replaceWikiVars( '{{{amount-too-low-message}}}' ) || 'Der Mindestbetrag beträgt 1 Euro.', amountTooHighMessage = replaceWikiVars( '{{{amount-too-high-message}}}' ) || 'Der Spendenbetrag ist zu hoch.', allBannersImpCookie = 'centralnotice_banner_impression_count', singleBannerImpCookie = 'centralnotice_single_banner_impression_count', bannerCloseTrackRatio = replaceWikiVars( '{{{banner-close-track-ratio}}}' ) || 0.01, bannerClosedCookieValue = replaceWikiVars( '{{{banner-closed-cookie-custom-value}}}' ) || '1', showBanner = true, messages = { en: { day: 'day', days: 'days' }, de: { day: 'Tag', days: 'Tage' } };

if ( bannerClosedCookieIsSet() ) { showBanner = false; }

if ( onMediaWiki() ) { mw.centralNotice.bannerData.alterImpressionData = function ( impressionData ) { if ( showBanner ) { return true; }

mw.centralNotice.bannerData.hideResult = true; mw.centralNotice.bannerData.hideReason = 'close'; return false; }; }

$( function () { $( '#WMDE_Banner-close' ).click( function () { if ( Math.random() < bannerCloseTrackRatio ) { $( '#WMDE_Banner-close-ct' ).attr( 'src', 'https://tracking.wikimedia.de/piwik/piwik.php?idsite=1&url=https://spenden.wikimedia.de/banner-closed/{{{BannerName}}}&rec=1' ); } $( '#WMDE_Banner' ).hide(); removeBannerSpace(); setBannerClosedCookie( 'centralnotice_wmde15_hide_cookie' );

return false; } );

$( '#amount-other-input' ).on( 'click', function () { $( 'input:radio[name=betrag_auswahl]' ).prop( 'checked', false ); $( '#amount_other' ).prop( 'checked', true ); } ); $( '#amount_other' ).on( 'click', function () { $( '#amount-other-input' ).trigger( 'click' ); } ); $( 'input:radio[name=betrag_auswahl]' ).on( 'click', function () { $( '#amount_other' ).prop( 'checked', false ); } ); $( '#interval_onetime' ).on( 'click', function () { removeSpaceForIntervalOptions(); $( '.interval-options' ).addClass( 'interval-hidden' ); $( '#interval_multiple' ).prop( 'checked', false ); } ); $( '#interval_multiple' ).on( 'click', function () { addSpaceForIntervalOptions(); $( '.interval-options' ).removeClass( 'interval-hidden' ); $( '#interval_onetime' ).prop( 'checked', false ); } ); } );

function setBannerClosedCookie( cookieName ) { var currentDate = new Date(), expiryDate;

expiryDate = new Date( 2016, 0, 15 ); $.cookie( cookieName, bannerClosedCookieValue, { expires: expiryDate, path: '/' } ); }

function getDaysLeft() { var daysLeft = Math.floor( new Date( finalDateTime - new Date() ) / 1000 / 60 / 60 / 24 ); return ( daysLeft < 0 ) ? 0 : daysLeft; }

function getDaysRemaining( language ) { var daysRemaining = getDaysLeft(), lang = language || 'de'; // TODO manually hack to fix older banners from 2014 if ( daysRemaining === 0 ) { $( '#donationRemaining' ).width( 0 ); $( '#donationRemaining' ).html( ); } return daysRemaining + ' ' + ( daysRemaining > 1 ? messages[ lang ].days : messages[ lang ].day ); }

function getSecsPassed() { var startDate = baseDate.split( '-' ), startDateObj = new Date( startDate[ 0 ], startDate[ 1 ] - 1, startDate[ 2 ] ), maxSecs = Math.floor( new Date( finalDateTime - startDateObj ) / 1000 ), secsPassed = Math.floor( ( new Date() - startDateObj ) / 1000 );

if ( secsPassed < 0 ) { secsPassed = 0; } if ( secsPassed > maxSecs ) { secsPassed = maxSecs; }

return secsPassed; }

function getApprDonationsRaw( rand ) { var startDonations = collectedBase, secsPast = getSecsPassed();

return startDonations + getApprDonationsFor( secsPast, rand ); }

function getApprDonatorsRaw( rand ) { var startDonators = donorsBase, secsPast = getSecsPassed();

return startDonators + getApprDonatorsFor( secsPast, rand ); }

function getApprDonationsFor( secsPast, rand ) { var apprDontionsMinute = donationsPerMinApproximation, randFactor = 0;

if ( rand === true ) { randFactor = Math.floor( ( Math.random() ) + 0.5 - 0.2 ); }

return ( secsPast / 60 * ( apprDontionsMinute * ( 100 + randFactor ) ) / 100 ); }

function getApprDonatorsFor( secsPast, rand ) { var apprDonatorsMinute = donorsPerMinApproximation, randFactor = 0;

if ( rand === true ) { randFactor = Math.floor( ( Math.random() ) + 0.5 - 0.2 ); }

return ( secsPast / 60 * ( apprDonatorsMinute * ( 100 + randFactor ) ) / 100 ); }

function getCurrentGermanDay() { switch ( new Date().getDay() ) { case 0: return 'Sonntag'; case 1: return 'Montag'; case 2: return 'Dienstag'; case 3: return 'Mittwoch'; case 4: return 'Donnerstag'; case 5: return 'Freitag'; case 6: return 'Samstag'; default: return ; } }

function getCurrentDayInEnglish() { switch ( new Date().getDay() ) { case 0: return 'Sunday'; case 1: return 'Monday'; case 2: return 'Tuesday'; case 3: return 'Wednesday'; case 4: return 'Thursday'; case 5: return 'Friday'; case 6: return 'Saturday'; default: return ; } }

function addPointsToNum( num ) { // jscs:disable disallowImplicitTypeConversion num = parseInt( num, 10 ) + ; // jscs:enable disallowImplicitTypeConversion num = num.replace( /\./g, ',' ); return num.replace( /(\d)(?=(\d\d\d)+(?!\d))/g, '$1.' ); }

function floorF( num ) { return Math.floor( num * 100 ) / 100; }

function getImpCount() { return parseInt( $.cookie( allBannersImpCookie ), 10 ) || 0; }

function getBannerImpCount( bannerId ) { var cookieValue, cookieData;

if ( $.cookie( singleBannerImpCookie ) ) { cookieValue = $.cookie( singleBannerImpCookie ); cookieData = cookieValue.split( '|' ); if ( cookieData[ 0 ] === bannerId ) { return parseInt( cookieData[ 1 ], 10 ); } } return 0; }

function increaseImpCount() { var impCount = getImpCount(); $.cookie( allBannersImpCookie, impCount + 1, { expires: 7, path: '/' } ); return impCount + 1; }

function increaseBannerImpCount( bannerId ) { var impCount = getBannerImpCount( bannerId );

$.cookie( singleBannerImpCookie, bannerId + '|' + ( impCount + 1 ), { expires: 7, path: '/' } ); return ( impCount + 1 ); }

function validateForm() { var chkdPayment = $( 'input[name=pay]:checked', '#WMDE_BannerForm' ).val(), form = document.donationForm, error = false, amount;

switch ( chkdPayment ) { case 'BEZ': $( '#form-page' ).val( 'Formularseite2-Lastschrift' ); break; case 'UEB': $( '#form-page' ).val( 'Formularseite2-Überweisung' ); break; case 'PPL': $( '#form-page' ).val( 'Formularseite2-PayPal' ); break; case 'MCP': $( '#form-page' ).val( 'Formularseite2-Micropayment' ); break; }

if ( !validateAndSetPeriod() ) { return false; } amount = getAmount();

// Check amount is at least the minimum if ( amount < 1 || error ) { alert( amountTooLowMessage ); return false; } else if ( amount > 99999 ) { alert( amountTooHighMessage ); return false; } return amount; }

/**

* Check the "interval" radio buttons and change the "period" and "intervalType" fields accordingly.
* If "periodically" is selected but no interval is selected, this function
* will display an error message via alert.
*/

function validateAndSetPeriod() { var form = document.donationForm; if ( $( '#interval_multiple' ).is( ':checked' ) ) { if ( $( 'input[name=interval]:checked', form ).length !== 1 ) { alert( noIntervalSelectedMessage ); return false; } else { $( '#intervalType' ).val( '1' ); $( '#periode' ).val( $( 'input[name=interval]:checked', form ).val() ); } } else if ( $( '#interval_onetime' ).is( ':checked' ) ) { $( '#periode' ).val( '0' ); $( '#intervalType' ).val( '0' ); } else { $( '#periode' ).val( '0' ); $( '#intervalType' ).val( '0' ); } return true; }

function getAmount() { var amount = null, otherAmount = $( '#amount-other-input' ).val(), form = document.donationForm;

amount = $( 'input[name=betrag_auswahl]:checked' ).val();

if ( otherAmount !== ) { otherAmount = otherAmount.replace( /[,.](\d)$/, '\:$10' ); otherAmount = otherAmount.replace( /[,.](\d)(\d)$/, '\:$1$2' ); otherAmount = otherAmount.replace( /[\$,.]/g, ); otherAmount = otherAmount.replace( /:/, '.' ); $( '#amount-other-input' ).val( otherAmount ); amount = otherAmount; }

if ( amount === null || isNaN( amount ) || amount.value <= 0 ) { return false; }

return amount; }

function addBannerSpace() { var expandableBannerHeight = $( 'div#WMDE_Banner' ).height() + 44, bannerDivElement = $( '#WMDE_Banner' ), skin = getSkin();

if ( !showBanner ) { return; } switch ( skin ) { case 'vector': bannerDivElement.css( 'top', 0 ); bannerDivElement.css( 'display', 'block' ); $( '#mw-panel' ).css( 'top', expandableBannerHeight + 160 ); $( '#mw-head' ).css( 'top', expandableBannerHeight ); $( '#mw-page-base' ).css( 'paddingTop', expandableBannerHeight ); break; case 'minerva': $( '#mw-mf-viewport' ).css( 'top', expandableBannerHeight );

                               $( '#mw-mf-page-center, #mw-mf-page-left' ).css( 'top', expandableBannerHeight );

break; case 'monobook': $( '#globalWrapper' ).css( 'position', 'relative' ); $( '#globalWrapper' ).css( 'top', expandableBannerHeight ); bannerDivElement.css( 'top', '-20px' ); bannerDivElement.css( 'background', 'none' ); break; } setTimeout( animateProgressBar, 1000 ); }

function addBannerSpaceWithRollo() { var expandableBannerHeight = $( 'div#WMDE_Banner' ).height() + 44, bannerDivElement = $( '#WMDE_Banner' ), skin = getSkin();

if ( !showBanner ) { return; } switch ( skin ) { case 'vector': bannerDivElement.css( 'top', 0 - expandableBannerHeight ); $( '#mw-panel' ).animate( { top: expandableBannerHeight + 160 }, 1000 ); $( '#mw-head' ).animate( { top: expandableBannerHeight }, 1000 ); $( '#mw-page-base' ).animate( { paddingTop: expandableBannerHeight }, 1000 ); break; case 'minerva': $( '#mw-mf-viewport' ).css( 'top', expandableBannerHeight );

                       $( '#mw-mf-page-center, #mw-mf-page-left' ).css( 'top', expandableBannerHeight );

break; case 'monobook': $( '#globalWrapper' ).css( 'position', 'relative' ); $( '#globalWrapper' ).css( 'top', expandableBannerHeight ); bannerDivElement.css( 'top', '-20px' ); bannerDivElement.css( 'background', 'none' ); break; } bannerDivElement.css( 'display', 'block' ); bannerDivElement.animate( { top: 0 }, 1000 ); setTimeout( animateProgressBar, 1000 ); }

function removeBannerSpace() { var skin = getSkin(); switch ( skin ) { case 'vector': $( '#mw-panel' ).css( 'top', 160 ); $( '#mw-head' ).css( 'top', 0 ); $( '#mw-page-base' ).css( 'padding-top', 0 ); break; case 'minerva': $( '#mw-mf-viewport' ).css( 'top', 0 );

                       $( '#mw-mf-page-center, #mw-mf-page-left' ).css( 'top', 0 );

break; case 'monobook': $( '#globalWrapper' ).css( 'position', 'relative' ); $( '#globalWrapper' ).css( 'top', 0 ); break; } }

function addSpaceForIntervalOptions() { var $intervalOptionsContainer = $( 'div.interval-options' ), expandableBannerHeight = $intervalOptionsContainer.height(); if ( $intervalOptionsContainer && $intervalOptionsContainer.is( ':visible' ) ) { return; }

switch ( getSkin() ) { case 'vector': $( '#mw-panel' ).css( { top: parseInt( $( '#mw-panel' ).css( 'top' ), 10 ) + expandableBannerHeight + 'px' } ); $( '#mw-head' ).css( { top: parseInt( $( '#mw-head' ).css( 'top' ), 10 ) + expandableBannerHeight + 'px' } ); $( '#mw-page-base' ).css( { paddingTop: parseInt( $( '#mw-page-base' ).css( 'padding-top' ), 10 ) + expandableBannerHeight + 'px' } ); break; case 'minerva': $( '#mw-mf-viewport' ).css( { top: parseInt( $( '#mw-mf-viewport' ).css( 'top' ), 10 ) + expandableBannerHeight + 'px' } );

                       $( '#mw-mf-page-center, #mw-mf-page-left' ).css( { top: parseInt( $( '#mw-mf-page-center' ).css( 'top' ), 10 ) + expandableBannerHeight + 'px' } );

break; case 'monobook': $( '#globalWrapper' ).css( { top: parseInt( $( '#globalWrapper' ).css( 'top' ), 10 ) + expandableBannerHeight + 'px' } ); break; } }

function removeSpaceForIntervalOptions() { var $intervalOptionsContainer = $( 'div.interval-options' ), expandableBannerHeight = $intervalOptionsContainer.height() + 5; if ( $intervalOptionsContainer && !$intervalOptionsContainer.is( ':visible' ) ) { return; }

switch ( getSkin() ) { case 'vector': $( '#mw-panel' ).css( { top: ( parseInt( $( '#mw-panel' ).css( 'top' ), 10 ) - expandableBannerHeight ) + 'px' } ); $( '#mw-head' ).css( { top: ( parseInt( $( '#mw-head' ).css( 'top' ), 10 ) - expandableBannerHeight ) + 'px' } ); $( '#mw-page-base' ).css( { paddingTop: ( parseInt( $( '#mw-page-base' ).css( 'padding-top' ), 10 ) - expandableBannerHeight ) + 'px' } ); break; case 'minerva': $( '#mw-mf-viewport' ).css( { top: ( parseInt( $( '#mw-mf-viewport' ).css( 'top' ), 10 ) - expandableBannerHeight ) + 'px' } );

                       $( '#mw-mf-page-center, #mw-mf-page-left' ).css( { top: ( parseInt( $( '#mw-mf-page-center' ).css( 'top' ), 10 ) - expandableBannerHeight ) + 'px' } );

break; case 'monobook': $( '#globalWrapper' ).css( { top: ( parseInt( $( '#globalWrapper' ).css( 'top' ), 10 ) - expandableBannerHeight ) + 'px' } ); break; } }

function animateProgressBar() { var donationFillElement = $( '#donationFill' ), daysLeftElement = $( '#daysLeft' ), donationValueElement = $( '#donationValue' ), remainingValueElement = $( '#valRem' ), preFillValue = 0, barWidth, dTarget, dCollected, dRemaining, fWidth, widthToFill;

donationFillElement.clearQueue(); donationFillElement.stop(); donationFillElement.width( preFillValue + 'px' );

daysLeftElement.hide();

barWidth = $( '#donationMeter' ).width(); dTarget = goalSum; dCollected = getApprDonationsRaw();

       if ( dCollected > goalSum ) {
         dCollected  = goalSum;
       }

dRemaining = dTarget - dCollected; fWidth = dCollected / dTarget * barWidth; widthToFill = getFillWidth( barWidth, dTarget, dCollected );

donationFillElement.animate( { width: widthToFill + 'px' }, { duration: 3000, progress: function () { var dFill = donationFillElement.width() / widthToFill * fWidth, pFill = dFill / barWidth,

dColl = dTarget * pFill / 1000000, vRem = ( dTarget - ( dTarget * pFill ) ) / 1000000; setCollectedAndRemaining( dColl, vRem ); }, complete: function () { setCollectedAndRemaining( dCollected / 1000000, dRemaining / 1000000 ); $( '#donationText' ).show(); $( '#donationRemaining' ).show(); daysLeftElement.show(); } } );

function setCollectedAndRemaining( donationsCollected, donationsRemaining ) { donationsCollected = donationsCollected.toFixed( 1 ); donationsCollected = donationsCollected.replace( '.', ',' );

donationsRemaining = donationsRemaining.toFixed( 1 ); donationsRemaining = donationsRemaining.replace( '.', ',' );

remainingValueElement.html( donationsRemaining ); donationValueElement.html( donationsCollected ); } }

function setProgressBarSize() { var donationFillElement = $( '#donationFill' ), barWidth, dCollected; barWidth = $( '#donationMeter' ).width(); dCollected = getApprDonationsRaw(); donationFillElement.width( getFillWidth( barWidth, goalSum, dCollected ) + 'px' ); }

function getFillWidth( donationBarWidth, donationTarget, donationsCollected ) { var widthToFill, maxFillWidth = donationBarWidth - $( '#donationRemaining' ).width() - 16, fWidth = donationsCollected / donationTarget * donationBarWidth;

widthToFill = Math.min( maxFillWidth, fWidth ); // Fill at least 100px or 15% (in case 15% fill is lower than 100px) widthToFill = Math.max( 100, 0.15 * donationBarWidth, widthToFill ); return widthToFill; }

/**

* Calculate the number of donors needed, given an average donation amount.
*
* This function cannot return less than 0 donors when the target has been reached.
*
* @param  {number} averageDonation Average donation amount in EUR
* @return {number} Number of donors needed (rounded up)
*/

function getRemainingDonorsNeeded( averageDonation ) { var dRemaining, dCollected, numDonors; dCollected = getApprDonationsRaw(); dRemaining = goalSum - dCollected; numDonors = Math.ceil( dRemaining / averageDonation ); return Math.max( 0, numDonors ); }

function replaceWikiVars( text ) { var re = /\{\{\{([^\}]+)\}\}\}/g, wikiVarMatch; while ( ( wikiVarMatch = re.exec( text ) ) !== null ) { if ( GlobalBannerSettings[ wikiVarMatch[ 1 ] ] ) { text = text.replace( wikiVarMatch[ 0 ], GlobalBannerSettings[ wikiVarMatch[ 1 ] ] ); } else { text = text.replace( wikiVarMatch[ 0 ], ); } } return text; }

function getSkin() { if ( onMediaWiki() ) { return mw.config.get( 'skin' ); } return 'vector'; }

function onMediaWiki() { return typeof mw === 'object' && typeof mw.centralNotice !== 'undefined'; }

function bannerClosedCookieIsSet() { if ( bannerClosedCookieValue !== '1' ) { return $.cookie( 'centralnotice_wmde15_hide_cookie' ) === bannerClosedCookieValue; } return $.cookie( 'centralnotice_wmde15_hide_cookie' ) !== null; } </script> <script type="text/javascript">var startDate = '2015-11-11';

function getCampaignDayString() { var daysSinceStart = getDaysSinceCampaignStart() + 1; return daysSinceStart + '.'; }

function getDaysSinceCampaignStart() { var startDateParts = startDate.split( '-' ), startDay = new Date( startDateParts[ 0 ], startDateParts[ 1 ] - 1, startDateParts[ 2 ] ); return Math.floor( new Date( new Date() - startDay ) / 1000 / 60 / 60 / 24 ); } </script> <script type="text/javascript">/*jshint unused: false */

function addSpan(id) {

   var elm = $('#' + id);
   var string = elm.text();
   var numCharacters = string.length;
   var newHTML = "";
   for (i = 0; i < numCharacters; i++) {
       if(i == 0) {
           newHTML = newHTML + "" + string[i] + "";
       } else {
           if(i+1 == numCharacters) {
               newHTML = newHTML + "" + string[i] + "";
           } else {
               newHTML = newHTML + "" + string[i] + "";
           }
       }
   }
   elm.html(newHTML);

}

function highlightSpan(id, num) {

   $('#' + id + ' span:nth-child(' + num + ')').css("background-color", "yellow")

}

function setHighlight(id, start, end, tempo) {

   highlightSpan(id, start)
   if (start < end) window.setTimeout(function () {
       setHighlight(id, start + 1, end, tempo);
   }, tempo);

}

function addCharacterSpans( $elem, startCharacter, endCharacter ) { var text = $elem.text(), i = startCharacter, $newContainer = $( '' ); if ( startCharacter > 0 ) { $newContainer.append( text.substring( 0, startCharacter ) ); } while ( i < endCharacter ) { $newContainer.append( $( '' ).text( text[ i ] ) ); i++; } if ( endCharacter < text.length ) { $newContainer.append( text.substring( endCharacter ) ); } $elem.html( $newContainer.html() ); }

function getNumberOfCharacters( $elem ) { return $elem.text().length; }

function highlightNthCharacter( $elem, n, className ) { $elem.find( 'span:nth-child(' + n + ')' ).addClass( className ); }

function doHighlightStep( step, $elem, highlightClass, numSteps, stepDuration ) { highlightNthCharacter( $elem, step, highlightClass ); if ( step < numSteps ) { setTimeout( function () { doHighlightStep( step + 1, $elem, highlightClass, numSteps, stepDuration ); }, stepDuration ); } } function animateHighlight( $elem, highlightClass, stepDuration, startCharacter, endCharacter ) { startCharacter = startCharacter || 0; endCharacter = endCharacter || getNumberOfCharacters( $elem ); addCharacterSpans( $elem, startCharacter, endCharacter ); doHighlightStep( 0, $elem, highlightClass, $elem.children( 'span' ).length, stepDuration ); }</script> <script type="text/javascript">/*jshint unused: false */

var customDayNames = { '06.12': { de: 'Nikolaustag', en: 'St Nicholas Day' }, '24.12': { de: 'Weihnachtsfeiertag', en: 'Christmas Day' }, '25.12': { de: '1. Weihnachtsfeiertag', en: 'Christmas Day' }, '26.12': { de: '2. Weihnachtsfeiertag', en: 'Christmas Day' } };

function getDateString( date ) { var dateString = , day = date.getDate(), month = date.getMonth() + 1; if ( day < 10 ) { dateString += '0'; } dateString += day; dateString += '.'; if ( month < 10 ) { dateString += month; } dateString += month; return dateString; }

function getCurrentDayName( fallbackFunction, lang ) { var currentDateString = getDateString( new Date() ), language = lang || 'de'; if ( currentDateString in customDayNames ) { return customDayNames[ currentDateString ][ language ]; } return fallbackFunction(); }</script> <style type="text/css">

 #donationText {
   display: none;
 }
 #WMDE_Banner-text-salute {
   color: #000;
   font-size: 17px;
   font-weight: bold;
   line-height: 1.2em;
   margin: 4px 10px 4px 35px;
   text-align: justify;
 }
 #WMDE_Banner-text-salute {
   margin-bottom: 0;
   padding-bottom: 0;
 }
 #donationMeterCell {
   padding: 9px 20px 9px 25px;
 }

</style>

   <form id="WMDE_Banner-form" method="post" name="donationForm" 
         action="https://spenden.wikimedia.de/spenden/?page={{{landing-page}}}&skin={{{page-skin}}}&piwik_campaign={{{CampaignName}}}&piwik_kwd={{{BannerName}}}">
<tbody> </tbody>
<tbody> </tbody>

{{{banner-text-salutation}}}

{{{banner-text}}}

0,0 Mio. €
Nur noch 1 Tag
es fehlen 8,6 Mio. €
                     Spendenkonto
                     Wikimedia Foerdergesellschaft
                     BIC
                     BFSWDE33BER
                     IBAN

DE33 1002 0500 0001 1947 00

<tbody id="WMDE_BannerForm-payment"> </tbody>
                 <input checked="checked" class="amount-radio"
                        id="interval_onetime"
                        type="radio">
                 <label for="interval_onetime"
                        class="interval-label">einmalig</label>
                 <input class="amount-radio" id="interval_multiple"
                        type="radio">
                 <label for="interval_multiple"
                        class="interval-label">regelmäßig</label>
                 <input name="interval" class="amount-radio" id="interval1"
                        value="1"
                        type="radio">
                 <label for="interval1" class="interval-label">monatlich</label>
                 <input name="interval" class="amount-radio" id="interval3"
                        value="3"
                        type="radio">
                 <label for="interval3"
                        class="interval-label">vierteljährlich</label>
                 <input name="interval" class="amount-radio" id="interval6"
                        value="6"
                        type="radio">
                 <label for="interval6"
                        class="interval-label">halbjährlich</label>
                 <input name="interval" class="amount-radio" id="interval12"
                        value="12"
                        type="radio">
                 <label for="interval12" class="interval-label">jährlich</label>

                 <input class="amount-radio" name="betrag_auswahl"
                        onclick="document.donationForm.amountGiven.value = "
                        id="amount5"
                        value="5"
                        type="radio">
                 <label class="amount-label" for="amount5">5 €</label>
                 <input class="amount-radio" name="betrag_auswahl"
                        onclick="document.donationForm.amountGiven.value = "
                        id="amount15"
                        value="15" type="radio">
                 <label class="amount-label" for="amount15">15 €</label>
                 <input class="amount-radio" name="betrag_auswahl"
                        onclick="document.donationForm.amountGiven.value = "
                        id="amount25"
                        value="25" type="radio">
                 <label class="amount-label" for="amount25">25 €</label>
                 <input class="amount-radio" name="betrag_auswahl"
                        onclick="document.donationForm.amountGiven.value = "
                        id="amount50"
                        value="50" type="radio">
                 <label class="amount-label" for="amount50">50 €</label>
                 <input class="amount-radio" name="betrag_auswahl"
                        onclick="document.donationForm.amountGiven.value = "
                        id="amount75"
                        value="75" type="radio">
                 <label class="amount-label" for="amount75">75 €</label>
                 <input class="amount-radio" name="betrag_auswahl"
                        onclick="document.donationForm.amountGiven.value = "
                        id="amount100"
                        value="100"
                        type="radio">
                 <label class="amount-label" for="amount100">100 €</label>
                 <input class="amount-radio" name="betrag_auswahl"
                        onclick="document.donationForm.amountGiven.value = "
                        id="amount250"
                        value="250"
                        type="radio">
                 <label class="amount-label" for="amount250">250 €</label>
                 <input class="amount-radio" name="betrag" id="amount_other"
                        value=""
                        type="radio">
                 <input id="amount-other-input"
                        onfocus="$('#amount_other').attr('checked', 'checked');"
                        autocomplete="off" size="3" name="amountGiven"
                        type="tel">
                 <button onclick="$('#zahlweise').val('BEZ');">Lastschrift
                 </button>
                 <button onclick="$('#zahlweise').val('UEB');">Überweisung
                 </button>
                 
                 <button onclick="$('#zahlweise').val('MCP');">
                   Kreditkarte
                 </button>
                 <button id="btn-ppl" onclick="$('#zahlweise').val('PPL');">
                   PayPal
                 </button>
            
     <input type="hidden" name="periode" id="periode" value=""/>
     <input type="hidden" name="intervalType" id="intervalType" value="0"/>
     <input type="hidden" id="form-page" name="form" value="{{{form-name}}}"/>
     <input type="hidden" id="wikilogin" name="wikilogin" value="no"/>
     <input type="hidden" id="impCount" name="impCount" value=""/>
     <input type="hidden" id="bImpCount" name="bImpCount" value=""/>
     <input type="hidden" id="zahlweise" name="zahlweise" value=""/>
   </form>
 <img id="WMDE_Banner-close-ct" src="" border="0" height="0" width="0">


<script type="text/javascript">

 $( document ).ready( function () {
   $( '#interval_onetime' ).on( 'click', function () {
     addSpace();
   } );
   $( '#interval_multiple' ).on( 'click', function () {
     addSpace();
   } );
 } );
 function addSpace() {
   if ( !$( '#WMDE_Banner' ).is( ':visible' ) ) {
     return;
   }
   var bannerHeight = $( 'div#WMDE_Banner' ).height(),
       skin = getSkin();
   switch ( skin ) {
     case 'vector':
       $( '#mw-panel' ).animate( {'top':bannerHeight + 160},1000 );
       $( '#mw-head' ).animate( {'top':bannerHeight},1000 );
       $( '#mw-page-base' ).animate( {'padding-top':bannerHeight},1000);
     case 'minerva':
       $( '#mw-mf-viewport' ).animate( {'top':bannerHeight},1000 );
       break;
   }
 }
 function addSpaceInstantly() {
   if ( !$( '#WMDE_Banner' ).is( ':visible' ) ) {
     return;
   }
   var bannerHeight = $( 'div#WMDE_Banner' ).height(),
       skin = getSkin();
   switch ( skin ) {
     case 'vector':
       $( '#mw-panel' ).css( { top: bannerHeight + 160 } );
       $( '#mw-head' ).css( { top: bannerHeight } );
       $( '#mw-page-base' ).css( { paddingTop: bannerHeight } );
     case 'minerva':
       $( '#mw-mf-viewport' ).css( { top: bannerHeight } );
       break;
   }
 }
 function displayBanner() {
   if ( !showBanner ) {
     return;
   }
   var bannerElement = $( '#WMDE_Banner' ),
       bannerHeight = bannerElement.height() + 44,
       toHighlight = 'to-highlight';
   $( 'body' ).prepend( $( '#centralNotice' ) );
   bannerElement.css( 'top', -bannerHeight );
   bannerElement.css( 'display', 'block' );
   addSpace();
   bannerElement.animate( { top: 0 }, 1000 );
   setTimeout( animateProgressBar, 1000 );
   addSpan(toHighlight);
   window.setTimeout(function () {
       setHighlight(toHighlight, 1, 154, 10);
   }, 4500);
   $( window ).resize( function () {
     addSpaceInstantly();
     setProgressBarSize();
   } );
 }
 function addMiniBanner() {
   /* add the "nag" bar. Has to be done after we show the main banner (to get its height) */
   var bigBannerHeight = $('#WMDE_Banner').height();
   $(window).scroll(function() {
     if ($(window).scrollTop() <= bigBannerHeight) {
       $('#WMDE_Banner-nag').finish();
       $('#WMDE_Banner-nag').css('display', 'none');
     } else {
       $('#WMDE_Banner-nag').delay(1500).slideDown();
     }
   });
   $('#WMDE_Banner-nag-close').click(function(event) {
     $('#WMDE_Banner-nag').remove();
     event.stopPropagation();
   });
   $('#WMDE_Banner-nag').click(function() {
     window.scrollTo(0,0);
   });
 }
 $( document ).ready( function() {
   $( '#WMDE_BannerForm-payment button' ).click( function( e ) {
     return validateForm();
   } );
   var impCount = increaseImpCount();
   $( '#impCount' ).val( impCount );
   var bannerImpCount = increaseBannerImpCount( "{{{banner}}}" );
   $( '#bImpCount' ).val( bannerImpCount );
   if ( mw.config.get( 'wgAction' ) === "view" ) {
     setTimeout( displayBanner, 7500 );
   }
   if ( mw.config.get( 'wgUserName' ) !== null ) {
     $( '#wikilogin' ).val( 'yes' );
   }
   $( 'span#numDaysLeft' ).text( getDaysRemaining() );
   $( 'span#weekday' ).text( getCurrentDayName( getCurrentGermanDay ) );
   if ( getCurrentDayName( getCurrentGermanDay ) !== getCurrentGermanDay() ) {
     $( '#weekdayPrepPhrase' ).text( 'am heutigen' );
   }
   $( 'span#campaignDay' ).text( getCampaignDayString() );
   $( 'span#donorsValue' ).html( addPointsToNum( Math.floor( getApprDonatorsRaw() ) ) );
 } );

</script>