User talk:Thathgar and MediaWiki:Centralnotice-template-B12 5C 120707 recurring recurring: Difference between pages
(Difference between pages)
Content deleted Content added
m Adding welcome message to new user's talk page |
No edit summary |
||
Line 1: | Line 1: | ||
<style type="text/css"> |
|||
<div class="borderc6 backgroundc2" style="border-style:solid;border-width:medium;padding:0.3em 0.5em;color:lightgrey"> |
|||
#centralNotice.collapsed #{{{banner}}}{ |
|||
<div align="center">{{Welcome/lang}}</div> |
|||
display: none; |
|||
== Welcome to Meta! == |
|||
} |
|||
<!--{{<includeonly>subst:</includeonly>void|{{error:not substituted|welcome}}}}--> |
|||
div#{{{banner}}} { |
|||
<div class="lang-en" lang="en" style="color:black"> |
|||
background: transparent; |
|||
Hello, {{PAGENAME}}. Welcome to the '''Wikimedia [[Meta:About Meta|Meta-Wiki]]'''! This website is for coordinating and discussing all [[Complete list of Wikimedia projects|Wikimedia projects]]. You may find it useful to read our [[Meta:Policy|policy page]]. If you are interested in doing translations, visit [[Meta:Babylon]]. You can also leave a note on [[Meta:Babel]] or [[Wikimedia Forum]] (please read the instructions at the top of the page before posting there). Happy editing! |
|||
display: none; |
|||
</div> |
|||
font-family: Arial, Helvetica, Verdana, sans-serif; |
|||
left: 0; |
|||
overflow: hidden; |
|||
position: absolute; |
|||
top: 0; |
|||
width: 100%; |
|||
z-index: 9999; |
|||
} |
|||
div#{{{banner}}} div#{{{banner}}}-facts { |
|||
background: #ffcc00 url(//upload.wikimedia.org/wikipedia/donate/c/c0/Information-icon.png) no-repeat 10px 8px; |
|||
# border-bottom: 1px solid #a7a7a7; |
|||
cursor: pointer; |
|||
padding: 10px 0; |
|||
position: relative; |
|||
width: 100%; |
|||
} |
|||
div#{{{banner}}} div#{{{banner}}}-facts p { |
|||
color: #000; |
|||
font-size: 13px; |
|||
font-weight: bold; |
|||
line-height: 16px; |
|||
margin: 0; |
|||
padding: 0 40px 0 40px; |
|||
} |
|||
div#{{{banner}}} div#{{{banner}}}-facts span { |
|||
background: #fff; |
|||
background: linear-gradient(to top, #ffffff 0%,#e4e4e4 100%); |
|||
background: -moz-linear-gradient(top, #ffffff 0%, #e4e4e4 100%); |
|||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#e4e4e4)); |
|||
border: 1px solid #ccc; |
|||
border-radius: 5px; |
|||
display: block; |
|||
font-weight: normal; |
|||
margin: 0; |
|||
padding: 3px 8px; |
|||
position: absolute; |
|||
right: 40px; |
|||
top: 6px; |
|||
-moz-border-radius: 5px; |
|||
-webkit-border-radius: 5px; |
|||
} |
|||
div#{{{banner}}} span#{{{banner}}}-tab { |
|||
background: #ffcc00; |
|||
background-position: 115px 10px; |
|||
border: 1px solid #a7a7a7; |
|||
border-top: none; |
|||
border-radius: 0 0 5px 5px; |
|||
color: #000; |
|||
cursor: pointer; |
|||
display: block; |
|||
font-size: 10px; |
|||
font-weight: bold; |
|||
height: 25px; |
|||
line-height: 25px; |
|||
margin: 0 auto; |
|||
position: relative; |
|||
text-align: center; |
|||
text-transform: uppercase; |
|||
width: 100px; |
|||
z-index: 100; |
|||
-moz-border-radius: 0 0 5px 5px; |
|||
-webkit-border-radius: 0 0 5px 5px; |
|||
} |
|||
div#{{{banner}}} span#{{{banner}}}-tab.close { |
|||
background-position: 115px -40px; |
|||
} |
|||
div#{{{banner}}} span#{{{banner}}}-close { |
|||
background: url(//upload.wikimedia.org/wikipedia/donate/1/1e/Small-black-close.png) no-repeat center center; |
|||
cursor: pointer; |
|||
display: block; |
|||
height: 11px; |
|||
position: absolute; |
|||
text-indent: -9999px; |
|||
right: 10px; |
|||
top: 12px; |
|||
width: 11px; |
|||
} |
|||
div#{{{banner}}} div#{{{banner}}}-landing { |
|||
background: #fff; |
|||
border-bottom: 1px solid #a7a7a7; |
|||
display: none; |
|||
font-family: Arial, Helvetica, Verdana, sans-serif; |
|||
padding: 30px 0 10px 0; |
|||
position: relative; |
|||
width: 100%; |
|||
} |
|||
div#{{{banner}}} div#{{{banner}}}-landing:after { |
|||
clear: both; |
|||
content: ''; |
|||
display: block; |
|||
height: 0; |
|||
visibility: hidden; |
|||
} |
|||
div#{{{banner}}} div#{{{banner}}}-landing span.landing-close { |
|||
color: #3f3f3f; |
|||
cursor: pointer; |
|||
font-size: 12px; |
|||
position: absolute; |
|||
right: 10px; |
|||
top: 10px; |
|||
} |
|||
div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-left { |
|||
float: left; |
|||
font-size: 15px; |
|||
line-height: 18px; |
|||
margin: 0 2%; |
|||
padding: 0; |
|||
width: 43%; |
|||
} |
|||
div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-left h3 { |
|||
border-bottom: 1px solid #000; |
|||
font-size: 20px; |
|||
font-weight: bold; |
|||
line-height: 22px; |
|||
margin: 0 0 10px 0; |
|||
padding: 0 0 10px 0; |
|||
} |
|||
div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-left img { |
|||
float: left; |
|||
margin: 0 20px 10px 0; |
|||
} |
|||
div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-right { |
|||
background: #ebf3f9; |
|||
border: 1px solid #adb8c1; |
|||
border-radius: 10px; |
|||
float: right; |
|||
font-size: 13px; |
|||
line-height: 18px; |
|||
margin: 0 2% 0 0; |
|||
padding: 0 1%; |
|||
text-align: left; |
|||
width: 48%; |
|||
-moz-border-radius: 10px; |
|||
-webkit-border-radius: 10px; |
|||
} |
|||
div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-right h4 { |
|||
font-size: 20px; |
|||
font-weight: bold; |
|||
line-height: 22px; |
|||
margin: 0 0 15px 0; |
|||
} |
|||
div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-right p { |
|||
margin: 0 0 15px 0; |
|||
} |
|||
div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-right p span { |
|||
font-size: 10px; |
|||
line-height: 14px; |
|||
} |
|||
div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-right ul { |
|||
margin: 10px 0 0 0; |
|||
} |
|||
div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-right ul li { |
|||
display: inline-block; |
|||
font-size: 10px; |
|||
line-height: 14px; |
|||
} |
|||
div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-right form br:first-of-type { |
|||
/* display: none; */ |
|||
margin-bottom: 10px; |
|||
} |
|||
div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-right form span { |
|||
white-space: nowrap; |
|||
} |
|||
div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-right form label { |
|||
font-weight: bold; |
|||
margin: 0 10px 0 3px; |
|||
} |
|||
div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-right form button { |
|||
cursor: pointer; |
|||
margin: 10px 10px 0 0; |
|||
} |
|||
div#{{{banner}}} div#{{{banner}}}-landing p.copyright { |
|||
display: block; |
|||
float: left; |
|||
font-size: 10px; |
|||
line-height: 14px; |
|||
margin: 20px 2% 0 2%; |
|||
width: 96%; |
|||
} |
|||
div#{{{banner}}} div#{{{banner}}}-facts p b { |
|||
color: #0645ad; |
|||
} |
|||
div#{{{banner}}}:hover div#{{{banner}}}-facts p b { |
|||
text-decoration: underline; |
|||
} |
|||
</style> |
|||
<div id="{{{banner}}}"> |
|||
<div id="{{{banner}}}-facts"> |
|||
<p><i>Dear Wikipedia readers:</i> We are the small non-profit that runs the #5 website in the world. We have only 150 staff but serve 450 million users, and have costs like any other top site: servers, power, rent, programs, and staff. Wikipedia is something special. It is like a library or a public park. It is like a temple for the mind, a place we can all go to think and learn. To protect our independence, we'll never run ads. We take no government funds. We run on donations averaging about $30. <b>If everyone reading this gave $3, our fundraiser would be done within an hour.</b> If Wikipedia is useful to you, take one minute to keep it online another year. Please help us forget fundraising and get back to Wikipedia. <i>Thank you.</i></p> |
|||
</div> |
|||
<div id="{{{banner}}}-landing"> |
|||
<div id="{{{banner}}}-landing-left"> |
|||
<p>When I founded Wikipedia, I could have made it into a for-profit company with advertising banners, but decided to do something different. Commerce is fine. Advertising is not evil. But it doesn't belong here. Not in Wikipedia.</p> |
|||
<p class="right"><strong>— Wikipedia Founder, Jimmy Wales</strong></p> |
|||
</div> |
|||
<div id="{{{banner}}}-landing-right"> |
|||
<h4>Please give whatever you can to end the fundraiser today. </h4> |
|||
<form id="{{{banner}}}-form" method="post" name="paypalcontribution"> |
|||
<input type="hidden" name="gateway" value="paypal"> |
|||
<input type="hidden" name="payment_method" value="cc"> |
|||
<input type="hidden" name="utm_source" value="{{{banner}}}"> |
|||
<input type="hidden" name="utm_medium" value="sitenotice"> |
|||
<input type="hidden" name="utm_campaign" value="{{{campaign}}}"> |
|||
<input type="hidden" name="language" value=""> |
|||
<input type="hidden" name="referrer" value=""> |
|||
<input type="hidden" name="country" value=""> |
|||
<input type="hidden" name="returnto" value=""> |
|||
<input type="hidden" name="currency_code" id="input_currency_code" value=""> |
|||
<span><input type="radio" name="frequency" id="frequency_onetime" value="onetime"><label for="frequency_onetime">One-time</label></span> |
|||
<span><input type="radio" name="frequency" id="frequency_monthly" value="monthly"><label for="frequency_monthly">Monthly*</label></span><br /><br /> |
|||
<span><input type="radio" name="amount" id="input_amount_0" onclick="document.paypalcontribution.amountGiven.value = ''" value="3"><label for="input_amount_0">$3</label></span> |
|||
<span><input type="radio" name="amount" id="input_amount_1" onclick="document.paypalcontribution.amountGiven.value = ''" value="5"><label for="input_amount_1">$5</label></span> |
|||
<span><input type="radio" name="amount" id="input_amount_2" onclick="document.paypalcontribution.amountGiven.value = ''" value="10"><label for="input_amount_2">$10</label></span> |
|||
<span><input type="radio" name="amount" id="input_amount_3" onclick="document.paypalcontribution.amountGiven.value = ''" value="20"><label for="input_amount_3">$20 </label></span><br /> |
|||
<span><input type="radio" name="amount" id="input_amount_4" onclick="document.paypalcontribution.amountGiven.value = ''" value="30"><label for="input_amount_4">$30</label></span> |
|||
<span><input type="radio" name="amount" id="input_amount_5" onclick="document.paypalcontribution.amountGiven.value = ''" value="50"><label for="input_amount_5">$50</label></span> |
|||
<span><input type="radio" name="amount" id="input_amount_6" onclick="document.paypalcontribution.amountGiven.value = ''" value="100"><label for="input_amount_6">$100</label></span> |
|||
<span><input type="radio" name="amount" id="input_amount_other" value="Other"><label for="input_amount_other">Other: $</label><input type="text" placeholder="" name="amountGiven" size="4" autocomplete="off" onfocus="this.form.input_amount_other.checked=true;" onkeypress="return DefaultSubmit(this,event)"></span> |
|||
<br /> |
|||
<button class='paymentmethod-cc' onclick="redirectPayment('1');return false;">Donate with Credit Card</button> |
|||
<button class='paymentmethod-pp' onclick="redirectPayment('2');return false;">Donate with PayPal</button> |
|||
<button class='paymentmethod-amazon' onclick="redirectPayment('3');return false;" style="display:none;">Donate with Amazon</button> |
|||
<button class='paymentmethod-bpay' onclick="redirectPayment('4');return false;" style="display:none;">Donate with BPay</button> |
|||
</form> |
|||
<ul> |
|||
<li><a class="localize" target="_blank" href="https://wikimediafoundation.org/wiki/Special:LandingCheck?basic=true&landing_page=Problems_donating">{{int:Donate_interface-problemsdonating}}</a> | </li> |
|||
<li><a class="localize" target="_blank" href="https://wikimediafoundation.org/wiki/Special:LandingCheck?basic=true&landing_page=Ways_to_Give">{{int:donate_interface-otherways-short}}</a> | </li> |
|||
<li><a class="localize" target="_blank" href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?form-countryspecific=Form-countryspecific-monthly&utm_medium=sitenotice&utm_campaign={{{campaign}}}&utm_source={{{banner}}}">{{int:donate_interface-monthly-donation}}</a> | </li> |
|||
<li><a class="localize" target="_blank" href="https://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=FAQ&basic=true"></html>{{int:donate_interface-faqs}}<html></a></li> |
|||
</ul> |
|||
</div> |
|||
<p class="copyright"><span>{{int:donate_interface-informationsharing-gb}}</span></p> |
|||
</div> |
|||
<span id="{{{banner}}}-tab">Please help</span> |
|||
<span id="{{{banner}}}-close">Close</span> |
|||
</div> |
</div> |
||
{{MediaWiki:FR2012/Resources/BannerCount.js}} |
|||
-- [[User:Meta-Wiki Welcome|Meta-Wiki Welcome]] ([[User talk:Meta-Wiki Welcome|talk]]) 22:06, 7 December 2012 (UTC) |
|||
<script type="text/javascript"> |
|||
$(document).ready( function () { |
|||
$('body').prepend($('#centralNotice')); |
|||
if ( wgCanonicalSpecialPageName != "CentralNotice" && wgCanonicalSpecialPageName != "NoticeTemplate" ){ |
|||
addBannerSpace(); |
|||
$(window).resize(function() { |
|||
addBannerSpace(); |
|||
}) |
|||
$('span#{{{banner}}}-close').click(function() { |
|||
hideBanner(); |
|||
$('#mw-panel').css('top', '160px'); |
|||
$('#mw-head').css('top', '0px'); |
|||
$('#mw-page-base').css('padding-top', '0'); |
|||
return false; |
|||
}) |
|||
$('div#{{{banner}}} div#{{{banner}}}-facts').click(function() { |
|||
$("html, body").animate({ scrollTop: 0 }, 0); |
|||
$('div#{{{banner}}}-landing').slideDown(150); |
|||
$('span#{{{banner}}}-tab').addClass('close').html('Close'); |
|||
$('#{{{banner}}}').css('position', 'absolute'); |
|||
setTimeout(addBannerSpace, 151); |
|||
return false; |
|||
}) |
|||
$('span#{{{banner}}}-tab').click(function() { |
|||
if ($('div#{{{banner}}} div#{{{banner}}}-landing').is(':visible')){ |
|||
$('div#{{{banner}}}-landing').slideUp(150); |
|||
$('#{{{banner}}}').css('position', 'fixed'); |
|||
$(this).removeClass('close').html('Please help'); |
|||
setTimeout(addBannerSpace, 151); |
|||
} else { |
|||
$('div#{{{banner}}}-landing').slideDown(150); |
|||
$("html, body").animate({ scrollTop: 0 }, 0); |
|||
$('#{{{banner}}}').css('position', 'absolute'); |
|||
$(this).addClass('close').html('Close'); |
|||
setTimeout(addBannerSpace, 151); |
|||
} |
|||
return false; |
|||
}) |
|||
} |
|||
}); |
|||
function addBannerSpace() { |
|||
var expandableBannerHeight = $('div#{{{banner}}}').height(); |
|||
if (parseInt($.cookie('{{{hide-cookie-name}}}')) <= {{{hide-cookie-max-count}}}) { |
|||
$('#mw-panel').css('top', expandableBannerHeight+160); |
|||
$('#mw-head').css('top', expandableBannerHeight); |
|||
$('#mw-page-base').css('padding-top', expandableBannerHeight); |
|||
$('#{{{banner}}}').css('display', 'block'); |
|||
} |
|||
} |
|||
mw.centralNotice.bannerData.alterImpressionData = function( impressionData ) { |
|||
if (parseInt($.cookie('{{{hide-cookie-name}}}')) <= {{{hide-cookie-max-count}}}) { |
|||
return true; |
|||
} else { |
|||
return false; |
|||
} |
|||
}; |
|||
</script> |
|||
{{MediaWiki:FR2012/Resources/Banner.js}} |
|||
{{MediaWiki:FR2012/Resources/DropdownForm.js}} |
Revision as of 22:06, 7 December 2012
<style type="text/css">
#centralNotice.collapsed #{{{banner}}}{ display: none; } div#{{{banner}}} { background: transparent; display: none; font-family: Arial, Helvetica, Verdana, sans-serif; left: 0; overflow: hidden; position: absolute; top: 0; width: 100%; z-index: 9999; } div#{{{banner}}} div#{{{banner}}}-facts { background: #ffcc00 url(//upload.wikimedia.org/wikipedia/donate/c/c0/Information-icon.png) no-repeat 10px 8px; # border-bottom: 1px solid #a7a7a7; cursor: pointer; padding: 10px 0; position: relative; width: 100%; } div#{{{banner}}} div#{{{banner}}}-facts p { color: #000; font-size: 13px; font-weight: bold; line-height: 16px; margin: 0; padding: 0 40px 0 40px; } div#{{{banner}}} div#{{{banner}}}-facts span { background: #fff; background: linear-gradient(to top, #ffffff 0%,#e4e4e4 100%); background: -moz-linear-gradient(top, #ffffff 0%, #e4e4e4 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#e4e4e4)); border: 1px solid #ccc; border-radius: 5px; display: block; font-weight: normal; margin: 0; padding: 3px 8px; position: absolute; right: 40px; top: 6px; -moz-border-radius: 5px; -webkit-border-radius: 5px; } div#{{{banner}}} span#{{{banner}}}-tab { background: #ffcc00; background-position: 115px 10px; border: 1px solid #a7a7a7; border-top: none; border-radius: 0 0 5px 5px; color: #000; cursor: pointer; display: block; font-size: 10px; font-weight: bold; height: 25px; line-height: 25px; margin: 0 auto; position: relative; text-align: center; text-transform: uppercase; width: 100px; z-index: 100; -moz-border-radius: 0 0 5px 5px; -webkit-border-radius: 0 0 5px 5px; } div#{{{banner}}} span#{{{banner}}}-tab.close { background-position: 115px -40px; } div#{{{banner}}} span#{{{banner}}}-close { background: url(//upload.wikimedia.org/wikipedia/donate/1/1e/Small-black-close.png) no-repeat center center; cursor: pointer; display: block; height: 11px; position: absolute; text-indent: -9999px; right: 10px; top: 12px; width: 11px; } div#{{{banner}}} div#{{{banner}}}-landing { background: #fff; border-bottom: 1px solid #a7a7a7; display: none; font-family: Arial, Helvetica, Verdana, sans-serif; padding: 30px 0 10px 0; position: relative; width: 100%; } div#{{{banner}}} div#{{{banner}}}-landing:after { clear: both; content: ; display: block; height: 0; visibility: hidden; } div#{{{banner}}} div#{{{banner}}}-landing span.landing-close { color: #3f3f3f; cursor: pointer; font-size: 12px; position: absolute; right: 10px; top: 10px; } div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-left { float: left; font-size: 15px; line-height: 18px; margin: 0 2%; padding: 0; width: 43%; } div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-left h3 { border-bottom: 1px solid #000; font-size: 20px; font-weight: bold; line-height: 22px; margin: 0 0 10px 0; padding: 0 0 10px 0; } div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-left img { float: left; margin: 0 20px 10px 0; } div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-right { background: #ebf3f9; border: 1px solid #adb8c1; border-radius: 10px; float: right; font-size: 13px; line-height: 18px; margin: 0 2% 0 0; padding: 0 1%; text-align: left; width: 48%; -moz-border-radius: 10px; -webkit-border-radius: 10px; } div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-right h4 { font-size: 20px; font-weight: bold; line-height: 22px; margin: 0 0 15px 0; } div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-right p { margin: 0 0 15px 0; } div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-right p span { font-size: 10px; line-height: 14px; } div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-right ul { margin: 10px 0 0 0; } div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-right ul li { display: inline-block; font-size: 10px; line-height: 14px; } div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-right form br:first-of-type {
/* display: none; */
margin-bottom: 10px; } div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-right form span { white-space: nowrap; } div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-right form label { font-weight: bold; margin: 0 10px 0 3px; } div#{{{banner}}} div#{{{banner}}}-landing div#{{{banner}}}-landing-right form button { cursor: pointer; margin: 10px 10px 0 0; } div#{{{banner}}} div#{{{banner}}}-landing p.copyright { display: block; float: left; font-size: 10px; line-height: 14px; margin: 20px 2% 0 2%; width: 96%; } div#{{{banner}}} div#{{{banner}}}-facts p b { color: #0645ad; } div#{{{banner}}}:hover div#{{{banner}}}-facts p b { text-decoration: underline; }
</style>
<script type='text/javascript'> var cookieName = 'centralnotice_bannercount_fr12'; var count = $.cookie(cookieName); if( count == null ){
count = 1;
} else {
count = parseInt( count ) + 1;
} $.cookie( cookieName, count, { expires: 30, path: '/' } ); </script> <script type="text/javascript">
$(document).ready( function () { $('body').prepend($('#centralNotice')); if ( wgCanonicalSpecialPageName != "CentralNotice" && wgCanonicalSpecialPageName != "NoticeTemplate" ){ addBannerSpace(); $(window).resize(function() { addBannerSpace(); }) $('span#{{{banner}}}-close').click(function() { hideBanner(); $('#mw-panel').css('top', '160px'); $('#mw-head').css('top', '0px'); $('#mw-page-base').css('padding-top', '0'); return false; }) $('div#{{{banner}}} div#{{{banner}}}-facts').click(function() { $("html, body").animate({ scrollTop: 0 }, 0); $('div#{{{banner}}}-landing').slideDown(150); $('span#{{{banner}}}-tab').addClass('close').html('Close'); $('#{{{banner}}}').css('position', 'absolute'); setTimeout(addBannerSpace, 151); return false; }) $('span#{{{banner}}}-tab').click(function() { if ($('div#{{{banner}}} div#{{{banner}}}-landing').is(':visible')){ $('div#{{{banner}}}-landing').slideUp(150); $('#{{{banner}}}').css('position', 'fixed'); $(this).removeClass('close').html('Please help'); setTimeout(addBannerSpace, 151); } else { $('div#{{{banner}}}-landing').slideDown(150); $("html, body").animate({ scrollTop: 0 }, 0); $('#{{{banner}}}').css('position', 'absolute'); $(this).addClass('close').html('Close'); setTimeout(addBannerSpace, 151); } return false; }) } }); function addBannerSpace() { var expandableBannerHeight = $('div#{{{banner}}}').height(); if (parseInt($.cookie('{{{hide-cookie-name}}}')) <= {{{hide-cookie-max-count}}}) { $('#mw-panel').css('top', expandableBannerHeight+160); $('#mw-head').css('top', expandableBannerHeight); $('#mw-page-base').css('padding-top', expandableBannerHeight); $('#{{{banner}}}').css('display', 'block'); } }
mw.centralNotice.bannerData.alterImpressionData = function( impressionData ) { if (parseInt($.cookie('{{{hide-cookie-name}}}')) <= {{{hide-cookie-max-count}}}) { return true; } else { return false; } };
</script> <script type="text/javascript" language="javascript"> var getQuerystring = function(key) {
key = key.replace( /[\[]/, '\\\[' ).replace( /[\]]/, '\\\]' ); var regex = new RegExp( '[\\?&]' + key + '=([a-zA-Z0-9\_\-]*)' ); var qs = regex.exec( window.location.search ); return qs == null ? : qs[1];
};
var bannerChooseRandom = function(choiceString) {
var choices = choiceString.split(','); if ( choices.length ) { return choices[Math.floor( Math.random() * choices.length )].replace(/^\s+|\s+$/, ); } return ;
};
$(document).ready( function () {
if(getQuerystring('country') != ){ Geo.country = getQuerystring('country'); } $("a.localize").each( function(index){ var url = $(this).attr("href"); if( url.indexOf("?") == -1 ){ url = url + "?" } else { url = url + "&" } $(this).attr("href", url + "country=" + Geo.country + "&language=" + mw.config.get('wgUserLanguage') + "&uselang=" + mw.config.get('wgUserLanguage')); } ); if ( wgCanonicalSpecialPageName != "CentralNotice" && wgCanonicalSpecialPageName != "NoticeTemplate" ){ var currencySymbol = '$'; switch(Geo.country){ case 'GB': currencySymbol = '£'; break; case 'IT': currencySymbol = '€'; break; default: currencySymbol = '$'; } if(currencySymbol != '$'){ $("div#{{{banner}}} p").each(function(index){ $(this).html( $(this).html().replace(/\$/g, currencySymbol) ); }); } }
}); </script> <script type='text/javascript'> function validateForm(form) {
var minimums = { 'USD':1, 'GBP':1, // $1.26 'EUR':1, // $1.26 'AUD':2, // $1.35 'CAD':1, // $0.84 'CHF':1, // $0.85 'CZK':20, // $1.03 'DKK':5, // $0.85 'HKD':10, // $1.29 'HUF':200, // $0.97 'JPY':100, // $1 'NZD':2, // $1.18 'NOK':10, // $1.44 'PLN':5, // $1.78 'SGD':2, // $1.35 'SEK':10, // $1.28 'ILS':5 // $1.39 }; var error = true;
// Get amount selection var amount = null; for (var i = 0; i < form.amount.length; i++) { if (form.amount[i].checked) { amount = form.amount[i].value; } } if (form.amountGiven.value != "") { var otherAmount = form.amountGiven.value; otherAmount = otherAmount.replace(/[,.](\d)$/, '\:$10'); otherAmount = otherAmount.replace(/[,.](\d)(\d)$/, '\:$1$2'); otherAmount = otherAmount.replace(/[\$,.]/g, ); otherAmount = otherAmount.replace(/:/, '.'); form.amountGiven.value = otherAmount; amount = otherAmount; } // Check amount is a real number error = ( amount == null || isNaN(amount) || amount.value <= 0 ); // Check amount is at least the minimum var currency = form.currency_code.value; if (typeof( minimums[currency] ) == 'undefined') { minimums[currency] = 1; } if (amount < minimums[currency] || error) { alert('You must contribute at least $1'.replace('$1', minimums[currency] + ' ' + currency)); error = true; } return !error;
} function redirectPayment(i) {
var ccforms = { 'US' : 'cc-vmad', 'AU' : 'cc-vmaj,email-cc-vmaj', 'CA' : 'cc-vm', 'GB' : 'cc-vma', 'NZ' : 'cc-vma', 'IT' : 'cc-vma' }; var ccformName = bannerChooseRandom( ccforms[Geo.country] ); var language = mw.config.get('wgUserLanguage');
var rccforms = { 'US' : 'rcc-vmad', 'AU' : 'rcc-vmaj', 'CA' : 'rcc-vm', 'GB' : 'rcc-vma', 'NZ' : 'rcc-vma', 'IT' : 'rcc-vma' }; var rccformName = bannerChooseRandom( rccforms[Geo.country] );
var frequency = $("input[name='frequency']:checked").val(); if( frequency != "monthly" ){ frequency = "onetime"; }
//if i == 1 var paymentType = "cc"; var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=" + language + "\x26appeal=JimmyQuote\x26form_name=RapidHtml\x26ffname="; if( frequency == "monthly"){ action_url += rccformName; paymentType = "rcc"; } else { action_url += ccformName; }
if (i == 2) { action_url = "https://foundation.wikimedia.org/wiki/Special:ContributionTracking/" + language; paymentType = "pp";
if( frequency == "monthly"){ $('<input>').attr({ type : 'hidden', id : 'recurring-hidden', name : 'recurring_paypal', value : "true" }).appendTo( $("form[name='paypalcontribution']") ); paymentType = "rpp"; } } if (i == 3) { action_url = "https://payments.wikimedia.org/index.php/Special:AmazonGateway?redirect=1\x26uselang=" + language; paymentType = "amazon"; } if (i == 4) { formName = "obt-bpay"; action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=" + language + "\x26form_name=RapidHtml\x26ffname=" + formName + "\x26appeal=JimmyQuote"; paymentType = "bpay"; } if (i == 5) { formName = "ew-webmoney"; action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=" + language + "\x26form_name=RapidHtml\x26ffname=" + formName + "\x26appeal=JimmyQuote"; paymentType = "ew"; } document.paypalcontribution.action = action_url; document.paypalcontribution.utm_source.value = '{{{banner}}}.no-LP' + '.' + paymentType; document.paypalcontribution.payment_method.value = paymentType; if (validateForm(document.paypalcontribution)) { document.paypalcontribution.submit(); }
}
$(document).ready( function () {
if ( wgCanonicalSpecialPageName != "CentralNotice" && wgCanonicalSpecialPageName != "NoticeTemplate" ){ // append the banner count in utm-key var cookieName = 'centralnotice_bannercount_fr12'; var count = $.cookie(cookieName); $('[name="paypalcontribution"]').append( $('<input type="hidden" name="utm_key" />').attr('value', count));
// do country-specific things var currency = "USD"; var symbol = "$"; switch(Geo.country){ case 'AU': $(".paymentmethod-bpay").css("display", ""); //do not set to block currency = "AUD"; break; case 'CA': currency = "CAD"; break; case 'GB': currency = "GBP"; symbol = "£"; break; case 'IT': currency = "EUR"; symbol = "€"; break; case 'NZ': currency = "NZD"; break; case 'US': $(".us-only").css("display", ""); $(".paymentmethod-amazon").css("display", ""); //do not set to block break; default:
} // set the form fields $("input[name='country']").val(Geo.country); $("input[name='currency_code']").val(currency); $("input[name='language']").val(mw.config.get('wgUserLanguage')); $("input[name='return_to']").val("Thank_You/" + mw.config.get('wgUserLanguage'));
// do fun things to localize currency in the banner and form $("input[name='amount']").each(function(index){ var id = $(this).attr("id"); var label = $("label[for='" + id + "']"); label.text(label.text().replace(/\$/, symbol)); }); }
});
function toggleMonthly( monthly ){
if( monthly.type == "checkbox" ){ monthly = monthly.checked; }
var onetimeonly = $(".no-monthly");
if( monthly ){ onetimeonly.css("display", "none"); } else { onetimeonly.css("display", ""); if( Geo.country != "US" ){ $(".paymentmethod-amazon").css("display", "none"); } if( Geo.country != "AU" ){ $(".paymentmethod-bpay").css("display", "none"); } }
} </script>