-function historyRadios(parent) {
+window.historyRadios = function(parent) {
var inputs = parent.getElementsByTagName('input');
var radios = [];
for (var i = 0; i < inputs.length; i++) {
}
}
return radios;
-}
+};
// check selection and tweak visibility/class onclick
-function diffcheck() {
+window.diffcheck = function() {
var dli = false; // the li where the diff radio is checked
var oli = false; // the li where the oldid radio is checked
var hf = document.getElementById('pagehistory');
}
}
return true;
-}
-
-// Attach event handlers to the input elements on history page
-function histrowinit() {
- var hf = document.getElementById('pagehistory');
- if (!hf) return;
- var lis = hf.getElementsByTagName('li');
- for (var i = 0; i < lis.length; i++) {
- var inputs = historyRadios(lis[i]);
- if (inputs[0] && inputs[1]) {
- inputs[0].onclick = diffcheck;
- inputs[1].onclick = diffcheck;
- }
- }
- diffcheck();
-}
-
-hookEvent("load", histrowinit);
+};