Jump to content

MediaWiki:Centralnotice-template-B15WMDE ikea prototype

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( 2016, 0, 1, 5, 0, 0 ), goalSum = 8600000, /* jshint -W079 */ GlobalBannerSettings = typeof GlobalBannerSettings !== 'undefined' ? GlobalBannerSettings : {}, /* jshint +W079 */ baseDate = replaceWikiVars( '2015-12-03' ), collectedBase = parseInt( replaceWikiVars( '4500000' ), 10 ), donorsBase = parseInt( replaceWikiVars( '212000' ), 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, showBanner = true, messages = { en: { day: 'day', days: 'days' }, de: { day: 'Tag', days: 'Tage' } };

if ( $.cookie( 'centralnotice_wmde15_hide_cookie' ) === '1' ) { showBanner = false; }

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

return false; } );

$( 'select[name=betrag_auswahl]' ).on( 'change', function () { if ( $( this ).val() === ) { $( '#amount-other-input-container' ).slideDown(); } else { $( '#amount-other-input-container' ).slideUp(); $( '#amount-other-input' ).val( ); } } ); $( '#interval_onetime' ).on( 'click', function () {

       var $button = $( this );
       if ( $button.hasClass( 'active' ) ) {
           return;
       }
       $button.addClass( 'active' );

removeSpaceForIntervalOptions(); $( '.interval-options' ).addClass( 'interval-hidden' ); $( '#interval_multiple' ).removeClass( 'active' ); $( '.interval-options button' ).removeClass( 'active' ); } ); $( '#interval_multiple' ).on( 'click', function () {

       var $button = $( this );
       if ( $button.hasClass( 'active' ) ) {
           return;
       }
       $button.addClass( 'active' );

addSpaceForIntervalOptions(); $( '.interval-options' ).removeClass( 'interval-hidden' ); $( '#interval_onetime' ).removeClass( 'active' ); } ); $( '.interval-options button' ).on( 'click', function () { $( '.interval-options button' ).removeClass( 'active' ); $( this ).addClass( 'active' ); } ); } );

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 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 = $( '#zahlweise', '#WMDE_BannerForm' ).val(), form = document.donationForm, amount, period;

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; }

period = validateAndSetPeriod(); if ( period === false ) { return false; }

// Check amount is at least the minimum amount = getAmount(); if ( amount < 1 ) { 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, period; if ( $( '#interval_multiple' ).hasClass( 'active' ) ) { if ( $( '.interval-options button.active', form ).length !== 1 ) { alert( noIntervalSelectedMessage ); return false; } else { period = $( '.interval-options button.active', form ).data( 'value' ); $( '#intervalType' ).val( '1' );

} } else { period = '0'; $( '#intervalType' ).val( '0' ); } $( '#periode' ).val( period ); return period; }

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

amount = $( '#amount_select' ).val();

if ( amount === ) { 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 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' } ); break; case 'minerva': $( '#mw-mf-viewport' ).css( 'top', 0 ); 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' } ); break; case 'monobook': $( '#globalWrapper' ).css( { top: ( parseInt( $( '#globalWrapper' ).css( 'top' ), 10 ) - expandableBannerHeight ) + 'px' } ); break; } }

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 ); break; case 'monobook': $( '#globalWrapper' ).css( 'position', 'relative' ); $( '#globalWrapper' ).css( 'top', 0 ); 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(); 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; }

/**

* For instances where this JS is not generated by a Wiki, try to replace the
* placeholders with values fram a global object
*/

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'; } </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">/*!

* jquery.customSelect() - v0.5.1
* http://adam.co/lab/jquery/customselect/
* 2014-04-19
*
* Copyright 2013 Adam Coulombe
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @license http://www.gnu.org/licenses/gpl.html GPL2 License 
*/

(function(a){a.fn.extend({customSelect:function(c){if(typeof document.body.style.maxHeight==="undefined"){return this}var e={customClass:"customSelect",mapClass:true,mapStyle:true},c=a.extend(e,c),d=c.customClass,f=function(h,k){var g=h.find(":selected"),j=k.children(":first"),i=g.html()||" ";j.html(i);if(g.attr("disabled")){k.addClass(b("DisabledOption"))}else{k.removeClass(b("DisabledOption"))}setTimeout(function(){k.removeClass(b("Open"));a(document).off("mouseup.customSelect")},60)},b=function(g){return d+g};return this.each(function(){var g=a(this),i=a("").addClass(b("Inner")),h=a("");g.after(h.append(i));h.addClass(d);if(c.mapClass){h.addClass(g.attr("class"))}if(c.mapStyle){h.attr("style",g.attr("style"))}g.addClass("hasCustomSelect").on("render.customSelect",function(){f(g,h);g.css("width","");var k=parseInt(g.outerWidth(),10)-(parseInt(h.outerWidth(),10)-parseInt(h.width(),10));h.css({display:"inline-block"});var j=h.outerHeight();if(g.attr("disabled")){h.addClass(b("Disabled"))}else{h.removeClass(b("Disabled"))}i.css({width:k,display:"inline-block"});g.css({"-webkit-appearance":"menulist-button",width:h.outerWidth(),position:"absolute",opacity:0,height:j,fontSize:h.css("font-size")})}).on("change.customSelect",function(){h.addClass(b("Changed"));f(g,h)}).on("keyup.customSelect",function(j){if(!h.hasClass(b("Open"))){g.trigger("blur.customSelect");g.trigger("focus.customSelect")}else{if(j.which==13||j.which==27){f(g,h)}}}).on("mousedown.customSelect",function(){h.removeClass(b("Changed"))}).on("mouseup.customSelect",function(j){if(!h.hasClass(b("Open"))){if(a("."+b("Open")).not(h).length>0&&typeof InstallTrigger!=="undefined"){g.trigger("focus.customSelect")}else{h.addClass(b("Open"));j.stopPropagation();a(document).one("mouseup.customSelect",function(k){if(k.target!=g.get(0)&&a.inArray(k.target,g.find("*").get())<0){g.trigger("blur.customSelect")}else{f(g,h)}})}}}).on("focus.customSelect",function(){h.removeClass(b("Changed")).addClass(b("Focus"))}).on("blur.customSelect",function(){h.removeClass(b("Focus")+" "+b("Open"))}).on("mouseenter.customSelect",function(){h.addClass(b("Hover"))}).on("mouseleave.customSelect",function(){h.removeClass(b("Hover"))}).trigger("render.customSelect")})}})})(jQuery);</script> <style type="text/css">

  1. donationText {
   display: none;

}

  1. WMDE_Banner {
   background: #056698;

}

  1. WMDE_Banner-facts {
   height:188px;
   background:none;

}

  1. WMDE_Banner-inside {
   box-shadow: 0 3px 5px rgba(0, 0, 0, 0.5);
   background: #FCCC01;
   margin: 10px 10px 0 10px;
   border-radius: 10px;

}

  1. WMDE_Banner-infotext {
   background: white;
   border-top-left-radius: 10px;
   padding-top: 4px;

}

  1. WMDE_Banner-text {
   margin-right: 10px;
   margin-left: 25px;
   text-align: left;

}

  1. WMDE_Banner-text-salute {
   color: #000;
   font-size: 17px;
   font-weight: bold;
   line-height: 1.2em;
   margin: 4px 10px 0 25px;
   text-align: left;

}

  1. donationMeterCell {
   background:white;
   padding: 0 20px 4px 25px;

}

  1. WMDE_Banner_info {
   border:none;
   padding-top:5px;

}

  1. WMDE_BannerForm-wrapper {
   background:none;
   border:none;
   padding-left:30px;

}

  1. WMDE_Banner #WMDE_BannerForm-wrapper {
   vertical-align:middle;

}

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

}

  1. WMDE_Banner-close-wrapper {
   width: 30px;
   position:relative;

}

  1. WMDE_Banner-close {
   background-color: none;
   background: url('data:image/svg+xml;charset=US-ASCII,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3C%21--%20Generated%20by%20IcoMoon.io%20--%3E%0A%3C%21DOCTYPE%20svg%20PUBLIC%20%22-//W3C//DTD%20SVG%201.1//EN%22%20%22http%3A//www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd%22%3E%0A%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20width%3D%2264%22%20height%3D%2264%22%20viewBox%3D%220%200%2064%2064%22%3E%0A%3Cpath%20d%3D%22M63.416%2051.416c-0-0-0.001-0.001-0.001-0.001l-19.415-19.416%2019.415-19.416c0-0%200.001-0%200.001-0.001%200.209-0.209%200.36-0.453%200.457-0.713%200.265-0.711%200.114-1.543-0.458-2.114l-9.172-9.172c-0.572-0.572-1.403-0.723-2.114-0.458-0.26%200.097-0.504%200.248-0.714%200.457%200%200-0%200-0.001%200.001l-19.416%2019.416-19.416-19.416c-0-0-0-0-0.001-0.001-0.209-0.209-0.453-0.36-0.713-0.457-0.711-0.266-1.543-0.114-2.114%200.457l-9.172%209.172c-0.572%200.572-0.723%201.403-0.458%202.114%200.097%200.26%200.248%200.505%200.457%200.713%200%200%200%200%200.001%200.001l19.416%2019.416-19.416%2019.416c-0%200-0%200-0%200.001-0.209%200.209-0.36%200.453-0.457%200.713-0.266%200.711-0.114%201.543%200.458%202.114l9.172%209.172c0.572%200.572%201.403%200.723%202.114%200.458%200.26-0.097%200.504-0.248%200.713-0.457%200-0%200-0%200.001-0.001l19.416-19.416%2019.416%2019.416c0%200%200.001%200%200.001%200.001%200.209%200.209%200.453%200.36%200.713%200.457%200.711%200.265%201.543%200.114%202.114-0.458l9.172-9.172c0.572-0.572%200.723-1.403%200.458-2.114-0.097-0.26-0.248-0.504-0.457-0.713z%22%20fill%3D%22%23FFFFFF%22%3E%3C/path%3E%0A%3C/svg%3E%0A') no-repeat;
   position:absolute;
   background-size: 75% auto;
   right: 10px;
   top: 15px;
   width: 25px;
   height: 25px;

}

  1. WMDE_BannerForm-payment td {
   padding: 4px 6px 0;

}

  1. WMDE_Banner span.btext-highlight {
   background: #FCCC01;

}

/* Form */

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

}

  1. WMDE_BannerForm-payment .frequency-options td:first-child button,
  2. WMDE_BannerForm-payment .interval-options td:first-child button {
   width: 110px;

}

  1. WMDE_BannerForm-payment .frequency-options td:last-child button,
  2. WMDE_BannerForm-payment .interval-options td:last-child button {
   width: 125px;

}

  1. WMDE_BannerForm-wrapper {
 height:1%;

}

  1. WMDE_BannerForm-payment button {
  height: 30px;
  padding:0;
  background: white;
  color: black;
  border: none;
  border-radius: 6px;
  filter:none;

}

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

}

  1. WMDE_BannerForm-payment button.active,
  2. WMDE_BannerForm-payment #WMDE_Banner_formsubmit {
  background: #056698;
  color: white;
  padding:0;
  filter:none;
  border-radius: 6px;

}

  1. WMDE_BannerForm-payment button.active:hover,
  2. WMDE_BannerForm-payment #WMDE_Banner_formsubmit:hover {
  color: #90B9CF

}

  1. WMDE_BannerForm-payment #WMDE_Banner_formsubmit {
  width: 250px;
  margin-bottom: 8px;

}

  1. WMDE_BannerForm-payment #amount-other-input {
  height: 30px;
  width: 234px;
  background: white;
  color: black;
  border: 3px solid #90B9CF;
  border-radius: 6px;
  padding-left:8px;

}

  1. amount-other-input-container {
  width:100%;
  padding-left:2px;

}

  1. interval_onetime {
 margin-left:0;

}

.customSelect {

  width: 244px;
  height: 30px;
  font-family: Helvetica, Arial, Verdana, sans-serif;
  font-size: 16px;
  background-color: white;
  background-image: url('data:image/svg+xml;charset=US-ASCII,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3C%21--%20Generated%20by%20IcoMoon.io%20--%3E%0A%3C%21DOCTYPE%20svg%20PUBLIC%20%22-//W3C//DTD%20SVG%201.1//EN%22%20%22http%3A//www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd%22%3E%0A%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20width%3D%2264%22%20height%3D%2264%22%20viewBox%3D%220%200%2064%2064%22%3E%0A%3Cpath%20d%3D%22M64%2032c0-17.673-14.327-32-32-32s-32%2014.327-32%2032%2014.327%2032%2032%2032%2032-14.327%2032-32zM6%2032c0-14.359%2011.641-26%2026-26s26%2011.641%2026%2026-11.641%2026-26%2026-26-11.641-26-26z%22%20fill%3D%22%2390B9CF%22%3E%3C/path%3E%0A%3Cpath%20d%3D%22M19.828%2022.172l-5.657%205.657%2017.828%2017.828%2017.828-17.828-5.657-5.657-12.172%2012.171z%22%20fill%3D%22%2390B9CF%22%3E%3C/path%3E%0A%3C/svg%3E%0A');
  background-repeat: no-repeat;
  background-position: 95%;
  background-size: 8%;
  border: 3px solid #90B9CF;
  border-radius: 6px;
  margin: 0 2px;
  padding-left:8px;

}

.customSelectInner {

  width: 100%;
  height: 30px;
  line-height: 30px;

}

/* Donation Meter */

  1. donationMeter {
   background: #056698;
   box-shadow: 2px 2px 0px 0px rgba(0,0,0,0.08);
   border-radius: 6px;
   border: 3px solid #056698;

}

  1. donationFill {
   background: #FCCC01;
   border-radius: 4px 10px 10px 4px;
   top: 3px;
   left: 3px;

}

  1. donationText {
   color: #056698;
   right:15px;

}

  1. donationMeterTip {
   display:none;

} </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>

{{{banner-text-salutation}}}

{{{banner-text}}}

0,0 Mio. €
es fehlen 8,6 Mio. €
                     Spendenkonto
                     Wikimedia Foerdergesellschaft
                     BIC
                     BFSWDE33BER
                     IBAN

DE33 1002 0500 0001 1947 00

<tbody id="WMDE_BannerForm-payment"> </tbody>
                   <button type="button" class="active" id="interval_onetime">einmalig</button>
                   <button type="button" id="interval_multiple">regelmäßig</button>
                   <button type="button" id="interval1" data-value="1">monatlich</button>
                   <button type="button" id="interval3" data-value="3">vierteljährlich</button>
                   <button type="button" id="interval6" data-value="6">halbjährlich</button>
                   <button type="button" id="interval12" data-value="12">jährlich</button>
                      <select name="betrag_auswahl" id="amount_select">
                          <option value="5" id="amount5">5,00 €</option>
                          <option value="15" id="amount15">15,00 €</option>
                          <option value="25" id="amount25" selected="selected">25,00 €</option>
                          <option value="50" id="amount50">50,00 €</option>
                          <option value="75" id="amount75">75,00 €</option>
                          <option value="100" id="amount100">100,00 €</option>
                          <option value="250" id="amount250">250,00 €</option>
                          <option value="" id="amount_other">Anderer Betrag</option>
                      </select>
                      <select name="zahlweise" id="zahlweise">
                          <option value="BEZ">Lastschrift</option>
                          <option value="UEB">Überweisung</option>
                          <option value="MCP">Kreditkarte</option>
                          <option value="PPL">PayPal</option>
                      </select>
                  <button type="submit" id="WMDE_Banner_formsubmit">JETZT SPENDEN</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=""/>
   </form>
 <img id="WMDE_Banner-close-ct" src="" border="0" height="0" width="0">


<script type="text/javascript">

 function addSpace() {
   if ( !$( '#WMDE_Banner' ).is( ':visible' ) ) {
     return;
   }
   var bannerHeight = $( 'div#WMDE_Banner' ).height() + 44,
       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() + 44,
       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
   $( 'body' ).prepend( $( '#centralNotice' ) );
   bannerElement.css( 'top', -bannerHeight );    
   bannerElement.css( 'display', 'block' );
   addSpace();
   $( '#amount_select' ).customSelect();
   $( '#zahlweise' ).customSelect();
   bannerElement.animate( { top: 0 }, 1000 );
   setTimeout( animateProgressBar, 1000 );
   $( 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_Banner_formsubmit' ).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, 500 );
   }
   if ( mw.config.get( 'wgUserName' ) !== null ) {
     $( '#wikilogin' ).val( 'yes' );
   }
   $( "span#numDaysLeft" ).text( getDaysRemaining() );
   $( "span#weekday" ).text( getCurrentGermanDay() );
   $( 'span#campaignDay' ).text( getCampaignDayString() );
   $( "span#donorsValue" ).html( addPointsToNum( Math.floor( getApprDonatorsRaw() ) ) );
 } );

</script>