Skip to content

Commit 2694a06

Browse files
committed
onLoad clear load screen, ternary shortening
Now clears load screen when this is loaded Ternary statements shortened even further in 3 areas
1 parent 66ca709 commit 2694a06

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/multiple-results.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<link rel="stylesheet" type="text/css" href="multiple-results.css">
99
</head>
1010

11-
<body class="results">
11+
<body class="results" onLoad="top.document.getElementById('loadingMask').style.visibility = 'hidden'">
1212

1313
<h1 id="title"></h1>
1414
<div class="resultsPane" id="resultsPane">
@@ -127,15 +127,15 @@ function phpGrep($q, $path, $base) {
127127
}
128128
}
129129
?>
130-
foundArray.length==0 ? showHide = "hide" : showHide = "show";
130+
showHide = foundArray.length==0 ? "hide" : "show";
131131
top.ICEcoder.showHide(showHide,top.document.getElementById('blackMask'));
132132
if (foundArray.length==0) {top.ICEcoder.message('No matches found')};
133133
<?php if (isset($_GET['replace'])) { ?>
134134
if (foundArray.length!=0) {document.getElementById('replaceAll').style.opacity = 1};
135135
<?php ;}; ?>
136-
foundArray.length >= 2 ? plural = "s" : plural = "";
136+
plural = foundArray.length >= 2 ? "s" : "";
137137
targetName = "<?php echo $targetName;?>";
138-
foundInSelected ? selectedText = "selected " : selectedText = "";
138+
selectedText = foundInSelected ? "selected " : "";
139139
document.getElementById('title').innerHTML = findText.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")+" found in "+foundArray.length+" "+selectedText+targetName+plural;
140140
document.getElementById('results').innerHTML = resultsDisplay;
141141

0 commit comments

Comments
 (0)