Content deleted Content added
Writ Keeper (talk | contribs) dumb dumb dumb |
Writ Keeper (talk | contribs) fx |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1:
diffRequestLocked = "f";
if(mw.config.get("wgCanonicalSpecialPageName") == "Contributions")
{
Line 8:
$("#mw-content-text ul").children("li").each(function(index, element)
{
if($(element).children('[href*="diff=prev"]').length > 0 && !(/(\.js|\.css)$/.test($(element).children('.mw-changeslist-date').attr('title'))))
{
var diffURL = $(element).children('.mw-changeslist-date').attr("href");
var regex = /&oldid=(\d+)/.exec(diffURL);
var diffID = regex[1];
var inlineDiffButton
if(typeof inlineDiffSmallUI != "undefined")
inlineDiffButton.type = "button";▼
{
inlineDiffButton = document.createElement("a");
inlineDiffButton.href = "#";
inlineDiffButton.innerHTML = '<b><span style="color:black;">[</span><span style="color:MidnightBlue;">inspect diff</span><span style="color:black;">]</span></b>';
}
else
{
inlineDiffButton = document.createElement("input");
▲ inlineDiffButton.type = "button";
inlineDiffButton.value = "Inspect edit";
}
inlineDiffButton.id = diffID;
$(inlineDiffButton).
$(inlineDiffButton).click(function(){ inspectContribsDiff(this);});▼
element.appendChild(inlineDiffButton);
}
Line 30 ⟶ 40:
{
alert("An old request is still being processed, please wait...");
return false;
}
else
Line 68 ⟶ 78:
newTable.id = button.id + "display";
$(button).attr("value","Hide edit");▼
$(button).unbind("click");
if(typeof inlineDiffSmallUI != "undefined")
$(button).click(function(){ hideEditInspection(this);});▼
{
$(button).html('<b><span style="color:black;">[</span><span style="color:MidnightBlue;">hide diff</span><span style="color:black;">]</span></b>');
▲
}
else
{
}
diffRequestLocked = "f";
Line 77 ⟶ 94:
}
return false;
}
Line 84 ⟶ 102:
$(button).attr("value","Hide edit");
$(button).unbind("click");
$(button).click(function(){ return hideEditInspection(this);});
return false;
}
function hideEditInspection( button)
{
return false;
}
function showSmallEditInspection( button)
{
$("#"+button.id+"display").css("display", "");
$(button).html('<b><span style="color:black;">[</span><span style="color:MidnightBlue;">hide diff</span><span style="color:black;">]</span></b>');
$(button).unbind("click");
$(button).click(function(){ return hideSmallEditInspection(this);});
return false;
}
function hideSmallEditInspection( button)
{
$("#"+button.id+"display").css("display", "none");
$(button).html('<b><span style="color:black;">[</span><span style="color:MidnightBlue;">show diff</span><span style="color:black;">]</span></b>');
$(button).unbind("click");
$(button).click(function(){ return showSmallEditInspection(this);});
return false;
}
$(document).ready(addContribsInspectionBoxes);
}
|