Jump to content

User:Rutilant/ArchiveTool.js

From Wikipedia, the free encyclopedia
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
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.
var saved;
function addSpan(){
	saved=bodyContent.innerHTML;
bodyContent.innerHTML=bodyContent.innerHTML+"<span id='archiveMessages' style='position:absolute;left:350px;top:40px;width:700px;height:400px;background-color:skyblue;border:2px solid blue;border-radius:3px'><center style='font-family:Courier;margin:0'>Archive Talk Messages</center><span style='position:relative;left:530px;font-size:9pt;border-left:solid black 2px'>A simple script by <a href='https://en.wikipedia.org/wiki/User:RainFall'>User:RainFall</a></span><br>Destination : <input id='archiveTo' value='/Archive 1'><Br><input type=radio id=archiveSelected name=archiveSetting disabled><label for=1>Archive Selected (<font color=red>Unavailable</font>)</label><BR><input type=radio id=archiveAll name=archiveSetting checked><label for=archiveAll><a style=float:right href='#' onclick='javascript:closeArchiver()'>Cancel</a><span class='ui-button-text' style='float:right' onclick='archiveTM()'>Archive</span>Archive all the following talk messages</label><fieldset style='width:668px;height:270px;overflow:auto'><span id='talkComments'></span></fieldset>";

}

function closeArchiver(){

bodyContent.innerHTML=saved;

$("#archiveMessages").fadeOut(200);
}

$(function() {
	 mw.util.addPortletLink("p-cactions",  "javascript:addSpan()", "ArchiveAll");
});