MCPcopy Create free account
hub / github.com/Milkyroad/SCiPNET / checkBarLoaded

Function checkBarLoaded

public/src/js/access.js:286–321  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

284 checkBarLoaded()
285
286 function checkBarLoaded() {
287 if (inBar == false) {
288 btnShow()
289 cmdShow()
290 noscroll = true;
291 var pageTitle = $('#page-title').text();
292 if (pageTitle == "" || pageTitle == null) {
293 pageTitle = "FILE"
294 }
295 var page = $('#page-content').html()
296 if (isTrad) {
297 pageTitle = opencc.simplifiedToHongKong(pageTitle)
298 page = opencc.simplifiedToHongKong(page)
299 }
300 accessListing += 1
301 if (userLoggedIn) {
302 appendNormal(`<br><div class="infoCard"><blockquote><hr><br><img class="logo_heds" style="width:40px;height:40px;" src="/src/images/scp.svg"><br>USERNAME: <span class="highlight">${displayName}</span><br>TITLE: <span class="highlight">${title}</span>, <span class="highlight">${site}</span><br>DISPLAYING ${pageTitle}, CLEARANCE LEVEL <span class="highlight">${accessCl}</span> (CLASS <span class="highlight">${classification}</span> PERSONNEL)<hr></blockquote></div><br><div id="${accessListing}-list" class="accessPage">${page}</div><div style="clear: both;"></div>`)
303 btnShow()
304 cmdShow()
305 } else {
306 appendNormal(`<br><div id="${accessListing}-list" class="accessPage">${page}</div><div style="clear: both;"></div>`)
307 btnShow()
308 cmdShow()
309 }
310 addEventLog(`Access to ${accessNo} granted`)
311 AccessLink()
312 getFrame()
313 setImageWidth()
314 chore()
315 setTimeout(() => {
316 foldDiv()
317 }, 100);
318 return;
319 }
320 window.setTimeout(checkBarLoaded, 100)
321 }
322
323 } else {
324 checkLinkLoaded()

Callers 1

accessFunction · 0.85

Calls 9

btnShowFunction · 0.90
cmdShowFunction · 0.90
appendNormalFunction · 0.90
getFrameFunction · 0.85
setImageWidthFunction · 0.85
choreFunction · 0.85
foldDivFunction · 0.85
AccessLinkFunction · 0.70
$Function · 0.50

Tested by

no test coverage detected