Pengguna:Iwan Novirion/twinklediff.js: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
k Maintenance: Replacing legacy global variable (phab:T72470)
k Maintenance: Replacing addPortletLink() with mw.util.addPortletLink() (mw:ResourceLoader/Migration_guide_(users)#addPortletLink)
 
Baris 10:
};
 
mw.util.addPortletLink( (typeof pTwinkle != "undefined") ? pTwinkle : "p-cactions" , mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/index.php?' + QueryString.create( query ), 'Last', 'tw-lastdiff', 'Show most recent diff' );
 
// Show additional tabs only on diff pages
if(!QueryString.exists('diff')) return;
 
mw.util.addPortletLink( (typeof pTwinkle != "undefined") ? pTwinkle : "p-cactions", "javascript:twinklediff.evaluate(false);", 'Since', 'tw-since', 'Show difference between last diff and the revision made by previous user' );
 
mw.util.addPortletLink( (typeof pTwinkle != "undefined") ? pTwinkle : "p-cactions", "javascript:twinklediff.evaluate(true);", 'Since mine', 'tw-sincemine', 'Show difference between last diff and my last revision' );
 
var oldid = document.evaluate( 'substring-after(//div[@id="mw-diff-ntitle1"]/strong/a[1]/@href, "oldid=")', document, null, XPathResult.STRING_TYPE, null).stringValue;
Baris 25:
'oldid' : oldid
};
mw.util.addPortletLink( (typeof pTwinkle != "undefined") ? pTwinkle : "p-cactions", mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/index.php?' + QueryString.create( query ), 'Current', 'tw-curdiff', 'Show difference to current revision' );
}
$( twinklediff );