Przeglądaj źródła

Protocol-relative URLs in some places for full HTTPS support

pull/24/head
Ben Kurtovic 12 lat temu
rodzic
commit
c49119ea97
5 zmienionych plików z 9 dodań i 7 usunięć
  1. +1
    -1
      README.md
  2. +3
    -1
      pages/copyvios.mako
  3. +2
    -2
      pages/support/footer.mako
  4. +1
    -1
      pages/support/header.mako
  5. +2
    -2
      static/js/potd.js

+ 1
- 1
README.md Wyświetl plik

@@ -1,5 +1,5 @@
This is a from-scratch rewrite of
[my Toolserver site](http://toolserver.org/~earwig) to interface well with my
[my Toolserver site](https://toolserver.org/~earwig) to interface well with my
[EarwigBot rewrite](https://github.com/earwig/earwigbot).

Not much else to say at this stage. Move along, now.

+ 3
- 1
pages/copyvios.mako Wyświetl plik

@@ -155,6 +155,8 @@
def urlstrip(url):
if url.startswith("http://"):
url = url[7:]
if url.startswith("https://"):
url = url[8:]
if url.startswith("www."):
url = url[4:]
if url.endswith("/"):
@@ -174,7 +176,7 @@
%>\
<%include file="/support/header.mako" args="environ=environ, title='Copyvio Detector', add_css=('copyvios.css',), add_js=('copyvios.js',)"/>
<h1>Copyvio Detector</h1>
<p>This tool attempts to detect <a href="http://en.wikipedia.org/wiki/WP:COPYVIO">copyright violations</a> in Wikipedia articles.</p>
<p>This tool attempts to detect <a href="//en.wikipedia.org/wiki/WP:COPYVIO">copyright violations</a> in Wikipedia articles.</p>
<form action="${environ['PATH_INFO']}" method="get">
<table>
<tr>


+ 2
- 2
pages/support/footer.mako Wyświetl plik

@@ -13,10 +13,10 @@
<table id="footer-box">
<tr>
<td>
<a href="http://wiki.toolserver.org/"><img src="${root}/static/images/toolserver-button.png" title="Powered by the Wikimedia Toolserver" alt="Powered by the Wikimedia Toolserver" /></a>
<a href="https://wiki.toolserver.org/"><img src="${root}/static/images/toolserver-button.png" title="Powered by the Wikimedia Toolserver" alt="Powered by the Wikimedia Toolserver" /></a>
</td>
<td>
<p>Copyright &copy; 2009&ndash;2012 <a href="http://en.wikipedia.org/wiki/User:The_Earwig">Ben Kurtovic</a> &bull; \
<p>Copyright &copy; 2009&ndash;2012 <a href="//en.wikipedia.org/wiki/User:The_Earwig">Ben Kurtovic</a> &bull; \
<a href="mailto:earwig@toolserver.org">Contact</a> &bull; \
<a href="https://github.com/earwig/toolserver">View Source</a> &bull; \
<a id="bg_image_link" href="">Background</a> &bull; \


+ 1
- 1
pages/support/header.mako Wyświetl plik

@@ -30,7 +30,7 @@
</head>
<body onload="potd_set_background()">
<div id="header">
<p id="heading"><a class="dark" href="${pretty}">earwig</a><span class="light">@</span><a class="mid" href="http://wiki.toolserver.org/">toolserver</a><span class="light">:</span><a class="dark" href="${this}">${slug}</a></p>
<p id="heading"><a class="dark" href="${pretty}">earwig</a><span class="light">@</span><a class="mid" href="https://wiki.toolserver.org/">toolserver</a><span class="light">:</span><a class="dark" href="${this}">${slug}</a></p>
<p id="links"><span class="light">&gt;</span>
% for (name, tool, link, complete, desc), num in zip(tools, count(1)):
<abbr title="${name}${' (incomplete)' if not complete else ''}"><a class="${'dark' if complete else 'mid'}" href="${pretty}/${link}">${tool}</a></abbr>


+ 2
- 2
static/js/potd.js Wyświetl plik

@@ -2,7 +2,7 @@ function potd_set_background() {
var d = new Date();
var callback = "like_a_boss";
var date = (d.getUTCFullYear()) + "-" + zero_pad(d.getUTCMonth() + 1, 2) + "-" + zero_pad(d.getUTCDate(), 2);
var base = "http://commons.wikimedia.org/w/api.php?action=query&prop=revisions&rvprop=content&format=json&titles=Template:Potd/";
var base = "//commons.wikimedia.org/w/api.php?action=query&prop=revisions&rvprop=content&format=json&titles=Template:Potd/";
var url = base + date + "&callback=" + callback;

var script = document.createElement("script");
@@ -26,7 +26,7 @@ function parse_file_name(data) {
var filename = /\{\{Potd filename\|(1=)?(.*?)\|.*?\}\}/.exec(content)[2];

var callback = "like_a_faust";
var base = "http://commons.wikimedia.org/w/api.php?action=query&prop=imageinfo&iiprop=url|size&format=json&titles=File:";
var base = "//commons.wikimedia.org/w/api.php?action=query&prop=imageinfo&iiprop=url|size&format=json&titles=File:";
var url = base + escape(filename) + "&callback=" + callback;

var script = document.createElement("script");


Ładowanie…
Anuluj
Zapisz