This is an old revision of this page, as edited by SD0001(talk | contribs) at 16:44, 12 June 2019(update: add tilde (~) in search string to correctly handle section names where an article/redirect of the same name exists; remove hashColonFix as no longer necessary; also correctly handles section names beginning with a word then a colon (like "User:")). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.Revision as of 16:44, 12 June 2019 by SD0001(talk | contribs)(update: add tilde (~) in search string to correctly handle section names where an article/redirect of the same name exists; remove hashColonFix as no longer necessary; also correctly handles section names beginning with a word then a colon (like "User:"))
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.
$.when($.ready).then(function(){varaddsection=document.getElementById('ca-addsection');varcorrectNs=mw.config.get('wgNamespaceNumber')%2===1||mw.config.get('wgNamespaceNumber')===4;if(!addsection&&mw.user.options.get('skin')!=='minerva')return;if(!correctNs&&mw.user.options.get('skin')==='minerva')return;varhash=decodeURIComponent(window.___location.hash.slice(1));if(hash===''||document.getElementById(hash.replace(/ /g,'_'))!==null){return;}varprefix=mw.config.get('wgPageName').replace(/_/g,' ');if(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";}prefix=encodeURIComponent(prefix);varsearch=encodeURIComponent('~"'+hash.replace(/_/g,' ')+'"');varsearchLink=mw.config.get('wgScript')+'?title=Special:Search'+'&search='+search+'&prefix='+prefix;vardiv=document.createElement('div');div.innerHTML='Looks like the discussion "'+hash.replace(/_/g,' ')+'" has been archived. <a href="'+searchLink+'">Click to search in archives</a>.';div.style.fontSize='90%';div.style.paddingLeft='20px';$('#mw-content-text').before(div);});