| @@ -1,5 +1,5 @@ | |||||
| This is a from-scratch rewrite of | 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). | [EarwigBot rewrite](https://github.com/earwig/earwigbot). | ||||
| Not much else to say at this stage. Move along, now. | Not much else to say at this stage. Move along, now. | ||||
| @@ -155,6 +155,8 @@ | |||||
| def urlstrip(url): | def urlstrip(url): | ||||
| if url.startswith("http://"): | if url.startswith("http://"): | ||||
| url = url[7:] | url = url[7:] | ||||
| if url.startswith("https://"): | |||||
| url = url[8:] | |||||
| if url.startswith("www."): | if url.startswith("www."): | ||||
| url = url[4:] | url = url[4:] | ||||
| if url.endswith("/"): | 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',)"/> | <%include file="/support/header.mako" args="environ=environ, title='Copyvio Detector', add_css=('copyvios.css',), add_js=('copyvios.js',)"/> | ||||
| <h1>Copyvio Detector</h1> | <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"> | <form action="${environ['PATH_INFO']}" method="get"> | ||||
| <table> | <table> | ||||
| <tr> | <tr> | ||||
| @@ -13,10 +13,10 @@ | |||||
| <table id="footer-box"> | <table id="footer-box"> | ||||
| <tr> | <tr> | ||||
| <td> | <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> | ||||
| <td> | <td> | ||||
| <p>Copyright © 2009–2012 <a href="http://en.wikipedia.org/wiki/User:The_Earwig">Ben Kurtovic</a> • \ | |||||
| <p>Copyright © 2009–2012 <a href="//en.wikipedia.org/wiki/User:The_Earwig">Ben Kurtovic</a> • \ | |||||
| <a href="mailto:earwig@toolserver.org">Contact</a> • \ | <a href="mailto:earwig@toolserver.org">Contact</a> • \ | ||||
| <a href="https://github.com/earwig/toolserver">View Source</a> • \ | <a href="https://github.com/earwig/toolserver">View Source</a> • \ | ||||
| <a id="bg_image_link" href="">Background</a> • \ | <a id="bg_image_link" href="">Background</a> • \ | ||||
| @@ -30,7 +30,7 @@ | |||||
| </head> | </head> | ||||
| <body onload="potd_set_background()"> | <body onload="potd_set_background()"> | ||||
| <div id="header"> | <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">></span> | <p id="links"><span class="light">></span> | ||||
| % for (name, tool, link, complete, desc), num in zip(tools, count(1)): | % 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> | <abbr title="${name}${' (incomplete)' if not complete else ''}"><a class="${'dark' if complete else 'mid'}" href="${pretty}/${link}">${tool}</a></abbr> | ||||
| @@ -2,7 +2,7 @@ function potd_set_background() { | |||||
| var d = new Date(); | var d = new Date(); | ||||
| var callback = "like_a_boss"; | var callback = "like_a_boss"; | ||||
| var date = (d.getUTCFullYear()) + "-" + zero_pad(d.getUTCMonth() + 1, 2) + "-" + zero_pad(d.getUTCDate(), 2); | 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 url = base + date + "&callback=" + callback; | ||||
| var script = document.createElement("script"); | var script = document.createElement("script"); | ||||
| @@ -26,7 +26,7 @@ function parse_file_name(data) { | |||||
| var filename = /\{\{Potd filename\|(1=)?(.*?)\|.*?\}\}/.exec(content)[2]; | var filename = /\{\{Potd filename\|(1=)?(.*?)\|.*?\}\}/.exec(content)[2]; | ||||
| var callback = "like_a_faust"; | 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 url = base + escape(filename) + "&callback=" + callback; | ||||
| var script = document.createElement("script"); | var script = document.createElement("script"); | ||||