Jump to content

User:Sander Säde/differ.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
addOnloadHook(AddDifferButton);
function AddDifferButton() {
  addPortletLink("p-cactions", "javascript:viewHistory()", "differ");
}

function viewHistory()
{
mw.loader.load('//en.wikipedia.org/w/index.php?action=raw&ctype=text/css&title=User:Sander_Säde/differ.css', 'text/css');
importStylesheet('http://en.wikipedia.org/skins-1.5/common/diff.css?257z2');

$("#globalWrapper").append('<div id="historyviewer"><div id="historyhead"><span id="historyName">&nbsp;</span> <span id="historyClose">x</span></div><div id="historyBody"><div id="historylist"><div id="historyButtons"><div><span id="histLatest" class="histNavLink">Latest</span>&nbsp;<span id="histEarliest" class="histNavLink">Earliest</span></div><div><span class="histNavLink">&lt;</span>&nbsp;<span class="histNavLink">&gt;</span></div></div><div id="articleHistory"></div></div><div id="diffdisplay"></div></div></div>');
}