Script improves readability of history pages:
Example:
becomes
Demo without installation: go to any history page, copy this to browser address field and press Enter:
javascript:function addOnloadHook(f){f()};importScript('User:Alex_Smotrov/histcomb.js');void 0
Static installation:
importScript('User:Alex Smotrov/histcomb.js')
→
your monobook.js
Dynamic installation
script is loaded only after you click on a new link Improve… (after Compare selected versions )
if (mw.config.get('wgAction') == 'history') //add a link to call histComb.js
$(function(){
var pagehis = document.getElementById('pagehistory');
if (!pagehis) return;
var lnk = document.createElement('a');
lnk.style.marginLeft = '10px';
lnk.href = '#';
lnk.appendChild(document.createTextNode('Improve…'));
lnk.onclick=function(){this.parentNode.removeChild(this);importScript('User:Alex_Smotrov/histcomb.js')}
pagehis.parentNode.insertBefore(lnk, pagehis);
})
Optional parameters (listed with default values)
window.histCombLeaveComment = false //if true, keep summary on the last folded edit
window.histCombNoCollapse = true //if true, do not collapse edits on load
window.histCombMyBg = '#F0FFF0' //background on your edits (light green)
window.histCombTalk = 't' //string to replace 'Talk'
window.histCombContrib = 'c' //string to replace 'contribs'
window.histCombUndo = '×' //string to replace 'undo'
Script tested in IE 6/7, Opera 9, Firefox 1.5/2, Safari 3
Also see logPage.js script.
Недурно, но есть вопросы и замечания:
Спасибо. -- AVB talk 16:52, 28 July 2008 (UTC)
I've got a couple of interesting bugs in this script for you: first, when multiple edits are rolled together, the links to the users' page, etc. stop working, and you have to expand the edits. Second, if you select the diff at the very bottom of a history page, and then select the diff right above it, the radio button for the bottom diff jumps out to the left. Just thought I'd give you a heads up! — Dino guy 1000 21:28, 8 February 2008 (UTC)
It doesn't work any longer for me. I have tested this in both Firefox and IE. I'm guessing the Wikipedia people probably changed something that broke your script. Can you fix it? And please let me know if you need further info from me in order to work this out.- Lilac Soul ( talk • contribs • count) • I'm watching this page so just reply to me right here! 11:14, 4 August 2008 (UTC)
// importScript('User:Superm401/Compare link.js');
) and then my script will start working again. —
AlexSm
14:55, 4 August 2008 (UTC)Hello!
I was using the script at pt.wb and I got the following at error console:
Error: tOld is null Source File: http://pt.wikibooks.org/?title=MediaWiki:Gadget-ajaxPreview.js&action=raw&ctype=text/javascript&urid=239az2 Line: 18 tOld.style.clear = 'none'
Do you know if I did something wrong? Is there a bug? Helder 13:48, 26 September 2009 (UTC)
This scripts causes the following warnings in the console:
Helder.wiki 14:36, 19 May 2014 (UTC)
Not sure why this wasn't in there along with talk and contribs! Personally, I replace thanks as well (and rollback and block)... ~ Amory ( u • t • c) 15:49, 24 March 2018 (UTC)
Script improves readability of history pages:
Example:
becomes
Demo without installation: go to any history page, copy this to browser address field and press Enter:
javascript:function addOnloadHook(f){f()};importScript('User:Alex_Smotrov/histcomb.js');void 0
Static installation:
importScript('User:Alex Smotrov/histcomb.js')
→
your monobook.js
Dynamic installation
script is loaded only after you click on a new link Improve… (after Compare selected versions )
if (mw.config.get('wgAction') == 'history') //add a link to call histComb.js
$(function(){
var pagehis = document.getElementById('pagehistory');
if (!pagehis) return;
var lnk = document.createElement('a');
lnk.style.marginLeft = '10px';
lnk.href = '#';
lnk.appendChild(document.createTextNode('Improve…'));
lnk.onclick=function(){this.parentNode.removeChild(this);importScript('User:Alex_Smotrov/histcomb.js')}
pagehis.parentNode.insertBefore(lnk, pagehis);
})
Optional parameters (listed with default values)
window.histCombLeaveComment = false //if true, keep summary on the last folded edit
window.histCombNoCollapse = true //if true, do not collapse edits on load
window.histCombMyBg = '#F0FFF0' //background on your edits (light green)
window.histCombTalk = 't' //string to replace 'Talk'
window.histCombContrib = 'c' //string to replace 'contribs'
window.histCombUndo = '×' //string to replace 'undo'
Script tested in IE 6/7, Opera 9, Firefox 1.5/2, Safari 3
Also see logPage.js script.
Недурно, но есть вопросы и замечания:
Спасибо. -- AVB talk 16:52, 28 July 2008 (UTC)
I've got a couple of interesting bugs in this script for you: first, when multiple edits are rolled together, the links to the users' page, etc. stop working, and you have to expand the edits. Second, if you select the diff at the very bottom of a history page, and then select the diff right above it, the radio button for the bottom diff jumps out to the left. Just thought I'd give you a heads up! — Dino guy 1000 21:28, 8 February 2008 (UTC)
It doesn't work any longer for me. I have tested this in both Firefox and IE. I'm guessing the Wikipedia people probably changed something that broke your script. Can you fix it? And please let me know if you need further info from me in order to work this out.- Lilac Soul ( talk • contribs • count) • I'm watching this page so just reply to me right here! 11:14, 4 August 2008 (UTC)
// importScript('User:Superm401/Compare link.js');
) and then my script will start working again. —
AlexSm
14:55, 4 August 2008 (UTC)Hello!
I was using the script at pt.wb and I got the following at error console:
Error: tOld is null Source File: http://pt.wikibooks.org/?title=MediaWiki:Gadget-ajaxPreview.js&action=raw&ctype=text/javascript&urid=239az2 Line: 18 tOld.style.clear = 'none'
Do you know if I did something wrong? Is there a bug? Helder 13:48, 26 September 2009 (UTC)
This scripts causes the following warnings in the console:
Helder.wiki 14:36, 19 May 2014 (UTC)
Not sure why this wasn't in there along with talk and contribs! Personally, I replace thanks as well (and rollback and block)... ~ Amory ( u • t • c) 15:49, 24 March 2018 (UTC)