مدیاویکی:Gadget-intropreload.js: تفاوت میان نسخهها
ظاهر
imported>Huji صفحهای جدید حاوی «$(function () { var preload = editintro = ''; if ( location.href.indexOf('preload') > -1 ) { preload = location.href.split('preload...» ایجاد کرد |
imported>Huji بدون خلاصۀ ویرایش |
||
| خط ۲۰: | خط ۲۰: | ||
el = document.createElement('span'); | el = document.createElement('span'); | ||
el.style.fontSize = "10pt"; | el.style.fontSize = "10pt"; | ||
el. | el.style.marginRight = "10px"; | ||
el.appendChild(pr); | el.appendChild(pr); | ||
el.appendChild(spacer); | el.appendChild(spacer); | ||
نسخهٔ ۵ ژانویهٔ ۲۰۱۳، ساعت ۱۹:۰۹
$(function () {
var preload = editintro = '';
if ( location.href.indexOf('preload') > -1 ) {
preload = location.href.split('preload')[1].split('&')[0];
preload = location.href.split('?')[0] + "?title" + preload;
}
if ( location.href.indexOf('editintro') > -1 ) {
editintro = location.href.split('editintro')[1].split('&')[0];
editintro= location.href.split('?')[0] + "?title" + editintro;
}
if ( preload != '' & editintro != '' & wgAction == 'edit' ) {
pr = document.createElement('a');
pr.innerHTML = '(محتوای پیشفرض)';
pr.href = preload;
spacer = document.createElement('span');
spacer.innerHTML = ' ';
ei = document.createElement('a');
ei.innerHTML = '(اعلان بالای صفحه)';
ei.href = editintro;
el = document.createElement('span');
el.style.fontSize = "10pt";
el.style.marginRight = "10px";
el.appendChild(pr);
el.appendChild(spacer);
el.appendChild(ei);
document.getElementById('firstHeading').appendChild(el);
}
});