Uporabnik:Dbc334/inlinediff.js: Razlika med redakcijama

m
brez povzetka urejanja
m
m
function NZS_runInlineDiff_initialise() {
var rcList = document.getElementsByTagName('ul')[0].getElementsByTagName('li');
for(i = 0; i < rcList.length; i++) {
var rcCurrentrcCurrentURL = rcList[i].getElementsByTagName('a')[0].href;
if(rcCurrent.hrefrcCurrentURL.indexOf('&diff=') != -1) {
var rcDiff = rcCurrent.hrefrcCurrentURL.substring(rcCurrent.hrefrcCurrentURL.indexOf('&diff=')+6, rcCurrent.hrefrcCurrentURL.indexOf('&oldid='));
var rcOldid = rcCurrent.hrefrcCurrentURL.substring(rcCurrent.hrefrcCurrentURL.indexOf('&oldid=')+7);
NZS_makeClickInlineDiff_attachClick(rcDiffrcList[i], rcOldidrcDiff, ircOldid);
}
}
 
importStylesheetURI('//bits.wikimedia.org/sl'+window.wikipedialocation.orghost+'/load.php?debug=false&lang=sl'+mw.user.options.get('language')+'&modules=mediawiki.action.history.diff&only=styles&skin=monobook'+mw.user.options.get('skin')+'&*');
}
 
function NZS_makeClickInlineDiff_attachClick(diffentryDOM, oldiddiff, ioldid) {
var entryDOM = document.getElementsByTagName('ul')[0].getElementsByTagName('li')[i];
entryDOM.id = 'rcChange' + diff;
entryDOM.getElementsByTagName('a')[0].onclick = function() {return NZS_diffInlineDiff_showDiff(diff, oldid);};
}
 
function NZS_diffInlineDiff_showDiff(diff, oldid) {
if(document.getElementById('rcDiff' + diff)) {
var rcDiffTag = document.getElementById('rcDiff' + diff);
rcLinkResult.style.textAlign = 'center';
 
var loadingImagercLoadingImage = new Image(18, 18);
loadingImagercLoadingImage.src = '//upload.wikimedia.org/wikipedia/commons/4/42/Loading.gif';
rcLinkResult.appendChild(loadingImagercLoadingImage);
loadingImage.title = 'Nalaganje';
loadingImage.id = 'rc2Diff' + diff;
rcLinkResult.appendChild(loadingImage);
 
var rcList = document.getElementsByTagName('ul')[0];
rcList.insertBefore(rcLink, rcLinkResult);
 
NZS_showDiffInlineDiff_fetchDiff(diff, oldid);
}
 
return false;
}
 
function NZS_showDiffInlineDiff_fetchDiff(diff, oldid) {
$.ajax({
url: '/w/index.php?action=render&diffonly=yes&diff='+diff+'&oldid='+oldid,
 
if(wgCanonicalSpecialPageName == 'Recentchanges') {
addOnloadHook(NZS_runInlineDiff_initialise);
}
19.279

urejanj