This is an old revision of this page, as edited by SD0001(talk | contribs) at 15:37, 17 September 2019(unbreak for AN/ANI). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.Revision as of 15:37, 17 September 2019 by SD0001(talk | contribs)(unbreak for AN/ANI)
This page is loaded as a part of the find-archived-section gadget, used by 5,637 users.
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.
$.ready.then(function(){varaddsection=document.getElementById('ca-addsection');varcorrectNs=mw.config.get('wgNamespaceNumber')%2===1||mw.config.get('wgNamespaceNumber')===4;varminerva=mw.config.get('skin')==='minerva';// Show only on discussion pages (pages with "add section" button)// On minerva skin (which doesn't use have add section button) show on all talk & project space pagesif(!addsection&&(!correctNs||!minerva)){return;}varsectionName=decodeURIComponent(window.___location.hash.slice(1)).replace(/_/g,' ');if(!sectionName||document.getElementById(sectionName.replace(/ /g,'_'))!==null){return;}$('#mw-content-text').before($('<div>').html('Looks like the discussion "'+sectionName+'" has been archived. Finding archived discussion...').addClass('archived-section-prompt').css({'font-size':'90%','padding-left':'20px'}));varprefix=mw.config.get('wgPageName').replace(/_/g,' ');// For admin noticeboards, archive pages titles are unusualif(prefix==="Wikipedia:Administrators' noticeboard/Incidents"){prefix="Wikipedia:Administrators' noticeboard/IncidentArchive";}elseif(prefix==="Wikipedia:Administrators' noticeboard/Edit warring"){prefix="Wikipedia:Administrators' noticeboard/3RRArchive";}elseif(prefix==="Wikipedia:Administrators' noticeboard"){prefix="Wikipedia:Administrators' noticeboard/Archive";}varsearchString='~"'+sectionName+'"';varsearchLink=mw.config.get('wgScript')+'?title=Special:Search'+'&search='+encodeURIComponent(searchString)+'&prefix='+encodeURIComponent(prefix);// Fetch and parse search results page$.ajax(searchLink).then(function(html){if($(html).find('.mw-search-nonefound').length){vardivHtml='No search results found for archived discussion "'+sectionName+'"';}else{vardivHtml='Looks like the discussion "'+sectionName+'" has been archived. ';vardiscussionLink=$(html).find('ul.mw-search-results .searchalttitle a').attr('href');if(discussionLink){divHtml+='<b><a href="'+discussionLink+'">Click to see archived discussion</a></b> ';divHtml+='<small><a href="'+searchLink+'">(or search in archives)</a></small>. ';}else{divHtml+='<a href="'+searchLink+'">Click to search in archives</a>. ';}}$('.archived-section-prompt').html(divHtml);}).fail(function(err){console.error('[find-archived-section]: ',JSON.stringify(err));});});