تفاوت میان نسخههای «مدیاویکی:Gadget-CommonsSSL.js»
پرش به ناوبری
پرش به جستجو
(صفحهای جدید حاوی 'function CommonsSSL() { if (!/^https?:\/\/secure\.wikimedia\.org/.test(window.location.href)) { $('a').each(function () { ...' ایجاد کرد) |
|||
خط ۱: | خط ۱: | ||
− | function | + | $(function () { |
if (!/^https?:\/\/secure\.wikimedia\.org/.test(window.location.href)) { | if (!/^https?:\/\/secure\.wikimedia\.org/.test(window.location.href)) { | ||
$('a').each(function () { | $('a').each(function () { | ||
− | if (/^http:\/\/commons.wikimedia.org.*/.test(this.href)) this.href = this.href.replace(/http:\/\/commons.wikimedia.org/, "https:// | + | if (/^http:\/\/commons.wikimedia.org.*/.test(this.href)) this.href = this.href.replace(/http:\/\/commons.wikimedia.org/, "https://commons.wikimedia.org").replace(/commons\/?$/, "commons/wiki").replace(/\/%D9%BE%D8%B1%D9%88%D9%86%D8%AF%D9%87/, "/File"); |
}); | }); | ||
} | } | ||
− | } | + | }); |
− |
نسخهٔ کنونی تا ۱ ژوئیهٔ ۲۰۱۴، ساعت ۰۶:۴۰
$(function () { if (!/^https?:\/\/secure\.wikimedia\.org/.test(window.location.href)) { $('a').each(function () { if (/^http:\/\/commons.wikimedia.org.*/.test(this.href)) this.href = this.href.replace(/http:\/\/commons.wikimedia.org/, "https://commons.wikimedia.org").replace(/commons\/?$/, "commons/wiki").replace(/\/%D9%BE%D8%B1%D9%88%D9%86%D8%AF%D9%87/, "/File"); }); } });