From 05c398e83a1beac87a9f068591e26ed05e23ed63 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Fri, 18 Apr 2014 21:48:02 +0200 Subject: [PATCH] Expand the protocol for proto-relative links when printing Things like "User's Guide (//meta.wikimedia.org/wiki/Help:Contents)" (on the default main page) don't look like the expected behavior to me, and I think regular users expect links to start with either "www" or "http". Let's assume HTTPS for these and prepend the protocol to the URL. Change-Id: If48f61de26a37eddbb134b824186706c08dabb72 --- skins/common/commonPrint.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/skins/common/commonPrint.css b/skins/common/commonPrint.css index 65f3fbe014..f0ea2e9602 100644 --- a/skins/common/commonPrint.css +++ b/skins/common/commonPrint.css @@ -206,6 +206,12 @@ a:link, a:visited { content: " (" attr(href) ")"; } +#content a.external.text[href^='//']:after, +#content a.external.autonumber[href^='//']:after { + /* Expand protocol-relative URLs for printing */ + content: " (https:" attr(href) ")"; +} + #globalWrapper { width: 100% !important; min-width: 0 !important; -- 2.20.1