Expand the protocol for proto-relative links when printing
authorBartosz Dziewoński <matma.rex@gmail.com>
Fri, 18 Apr 2014 19:48:02 +0000 (21:48 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Mon, 21 Apr 2014 19:48:04 +0000 (21:48 +0200)
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

index 65f3fbe..f0ea2e9 100644 (file)
@@ -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;