From 97b2d4da62147e0955707a80ec6a987135d2db26 Mon Sep 17 00:00:00 2001
From: kopareigns <kopareigns@gmail.com>
Date: Sat, 23 Mar 2019 00:25:43 -0400
Subject: [PATCH] Main tab updates

---
 src/uncategorized/main.tw | 35 +++++++++++++----------------------
 1 file changed, 13 insertions(+), 22 deletions(-)

diff --git a/src/uncategorized/main.tw b/src/uncategorized/main.tw
index 7cf93987b8d..7c09e603ce0 100644
--- a/src/uncategorized/main.tw
+++ b/src/uncategorized/main.tw
@@ -107,82 +107,73 @@ __''MAIN MENU''__&nbsp;&nbsp;&nbsp;&nbsp;//[[Summary Options]]//
 
 	<div class="tab">
 		<<set _penthouseSlaves = 0>>
+		<<run Object.keys($JobIDArray).forEach((job) => _penthouseSlaves += $JobIDArray[job].length)>>
 		<<if $useSlaveSummaryOverviewTab == 1>>
 		<button class="tablinks" onclick="opentab(event, 'overview')" id="tab overview">Overview</button>
 		<</if>>
 		<button class="tablinks" onclick="opentab(event, 'resting')" id="tab resting">
 			Resting
 			<<if $JobIDArray['rest'].length > 0>>
-				<<print " (" + $JobIDArray['rest'].length + ")">>
-				<<set _penthouseSlaves += $JobIDArray['rest'].length>>
+				($JobIDArray['rest'].length)
 			<</if>>
 		</button>
 		<button class="tablinks" onclick="opentab(event, 'stay confined')" id="tab stay confined">
 			Confined
 			<<if $JobIDArray['stay confined'].length > 0>>
-				<<print " (" + $JobIDArray['stay confined'].length + ")">>
-				<<set _penthouseSlaves += $JobIDArray['stay confined'].length>>
+				($JobIDArray['stay confined'].length)
 			<</if>>
 		</button>
 		<button class="tablinks" onclick="opentab(event, 'take classes')" id="tab take classes">
 			Students
 			<<if $JobIDArray['take classes'].length > 0>>
-				<<print " (" + $JobIDArray['take classes'].length + ")">>
-				<<set _penthouseSlaves += $JobIDArray['take classes'].length>>
+				($JobIDArray['take classes'].length)
 			<</if>>
 		</button>
 		<button class="tablinks" onclick="opentab(event, 'please you')" id="tab please you">
 			Fucktoys
 			<<if $JobIDArray['please you'].length > 0>>
-				<<print " (" + $JobIDArray['please you'].length + ")">>
-				<<set _penthouseSlaves += $JobIDArray['please you'].length>>
+				($JobIDArray['please you'].length)
 			<</if>>
 		</button>
 		<button class="tablinks" onclick="opentab(event, 'whore')" id="tab whore">
 			Whores
 			<<if $JobIDArray['whore'].length > 0>>
-				<<print " (" + $JobIDArray['whore'].length + ")">>
-				<<set _penthouseSlaves += $JobIDArray['whore'].length>>
+				($JobIDArray['whore'].length)
 			<</if>>
 		</button>
 		<button class="tablinks" onclick="opentab(event, 'serve the public')" id="tab serve the public">
 			Public Servants
 			<<if $JobIDArray['serve the public'].length > 0>>
-				<<print " (" + $JobIDArray['serve the public'].length + ")">>
-				<<set _penthouseSlaves += $JobIDArray['serve the public'].length>>
+				($JobIDArray['serve the public'].length)
 			<</if>>
 		</button>
 		<button class="tablinks" onclick="opentab(event, 'be a servant')" id="tab be a servant">
 			Servants
 			<<if $JobIDArray['be a servant'].length > 0>>
-				<<print " (" + $JobIDArray['be a servant'].length + ")">>
-				<<set _penthouseSlaves += $JobIDArray['be a servant'].length>>
+				($JobIDArray['be a servant'].length)
 			<</if>>
 		</button>
 		<button class="tablinks" onclick="opentab(event, 'get milked')" id="tab milked">
 			Cows
 			<<if $JobIDArray['get milked'].length > 0>>
-				<<print " (" + $JobIDArray['get milked'].length + ")">>
-				<<set _penthouseSlaves += $JobIDArray['get milked'].length>>
+				($JobIDArray['get milked'].length)
 			<</if>>
 		</button>
 		<button class="tablinks" onclick="opentab(event, 'work a glory hole')" id="tab work a glory hole">
 			Gloryhole
 			<<if $JobIDArray['work a glory hole'].length > 0>>
-				<<print " (" + $JobIDArray['work a glory hole'].length + ")">>
-				<<set _penthouseSlaves += $JobIDArray['work a glory hole'].length>>
+				($JobIDArray['work a glory hole'].length)
 			<</if>>
 		</button>
 		<button class="tablinks" onclick="opentab(event, 'be a subordinate slave')" id="tab be a subordinate slave">
 			Subordinate slaves
 			<<if $JobIDArray['be a subordinate slave'].length > 0>>
-				<<print " (" + $JobIDArray['be a subordinate slave'].length + ")">>
-				<<set _penthouseSlaves += $JobIDArray['be a subordinate slave'].length>>
+				($JobIDArray['be a subordinate slave'].length)
 			<</if>>
 		</button>
 		<button class="tablinks" onclick="opentab(event, 'all')" id="tab all">
 			All
-			<<if  _penthouseSlaves > 0>>
+			<<if _penthouseSlaves > 0>>
 				<<if $Headgirl != 0>>
 					<<set _penthouseSlaves++>>
 				<</if>>
@@ -192,7 +183,7 @@ __''MAIN MENU''__&nbsp;&nbsp;&nbsp;&nbsp;//[[Summary Options]]//
 				<<if $Bodyguard != 0>>
 					<<set _penthouseSlaves++>>
 				<</if>>
-				<<print " (" +  _penthouseSlaves + ")">>
+				(_penthouseSlaves)
 			<</if>>
 		</button>
 	</div>
-- 
GitLab