User:Pcoombe (WMF)/sandbox: Difference between revisions

From Wikimedia Foundation Governance Wiki
Content deleted Content added
No edit summary
No edit summary
Line 111: Line 111:
}
}


if(country === 'GB') {
if(Geo.country === 'GB') {
$('.country-specific-GB').show();
$('.country-specific-GB').show();
}
}

Revision as of 18:48, 20 November 2014


<html> <script src="//bits.wikimedia.org/geoiplookup"></script> <style> /* Hide some MobileFrontend clutter */ .skin-minerva .header, .skin-minerva #page-actions, .skin-minerva h1, .skin-minerva #mw-mf-last-modified {

   display: none;

}

  1. firstHeading, #contentSub, #siteSub {
   display: none;

} .ty {

   font-size: 1.2em;

}

.ty-header {

   font-size: 3em;
   font-weight: bold;
   line-height: 1.2;

} .skin-minerva .ty-header {

   font-size: 1.8em;

}

/* Can't use normal headers as don't want mobile to collapse them */ .ty-subhead {

   font-size: 1.2em;
   margin-top: 1em;
   font-weight: bold;
   color: #006699;

}

.ty-footer {

   margin-top: 1em;
   font-size: 0.9em;
   border-top: 1px solid #ddd;
   text-align: center;

}

.country-specific-GB {

   display: none;

} </style> </html>

Template:Hide banners

<html> <script> $(document).ready( function () {

   var paymentMethod = mw.util.getParamValue("payment_method");
   if(paymentMethod === 'bt') {
       $('.ty-banktransfer').show();
   }
   if(paymentMethod === 'bitcoin') {
       $('.ty-bitcoin').show();
   }
   // Allow overriding the country for testing
   var Geo = Geo || {};
   if(mw.util.getParamValue('country')) {
       Geo.country = mw.util.getParamValue('country');
   }
   if(Geo.country === 'GB') {
       $('.country-specific-GB').show();
   }

}); </script> </html>