[13:53:43] In JavaScript using `mw.config`, what is the best/most correct way to check that the page you're on doesn't exist? [13:53:44] [13:53:46] `wgArticleId === 0 && wgNamespaceNumber >= 0 [13:53:47] [13:53:49] `? [14:18:00] that depends on what exactly you mean by "page" and by "doesn't exist". `wgArticleId` appears to be 0 for files from commons or user pages from meta (I assume because there's no local page), and that will be false for special pages which do exist, including page-specific ones like Special:WhatLinksHere [14:19:43] (for Special:WhatLinksHere, `wgRelevantArticleId` would distinguish between pages that exist and those that don't, it seems) [14:20:14] ah, didn't think of those cases (files and user pages). For my usecase though, there's another more important condition: pagename ends in a slash (`/`), and i think that can never be true for user pages or commons files [14:23:31] to explain a bit more: I use Special:PrefixIndex _a lot_, but that's a pain to type every time. So i just made this little snippet (https://meta.wikimedia.org/w/index.php?title=User%3AJon_Harald_S%C3%B8by%2Fglobal.js&diff=26245151&oldid=25876553) to redirect me to Special:PrefixIndex if I just add a slash to the page's URL. I'll try it as it is for now, and amend it if i hit any [14:23:32] bumps in the road 😊 [14:29:35] but what if you want to check for subpages of a deleted page? :D [14:30:00] I've seen quite a few people add a subpages link to the sidebar, and this reminds me that I was going to do the same [14:31:05] it works for that too. it just won't redirect in the off chance that there is an actual page on "Pagename/" (I've seen some archive indices do that, but that's about the only time) (re @Nikki: but what if you want to check for subpages of a deleted page? :D)