e = campaignTrail_temp; nct_stuff.themes[nct_stuff.selectedTheme].coloring_title = "#000000"; nct_stuff.themes[nct_stuff.selectedTheme].coloring_window = "#990000"; document.getElementsByClassName("game_header")[0].style.backgroundColor = nct_stuff.themes[nct_stuff.selectedTheme].coloring_title; $("#game_window")[0].style.backgroundColor = nct_stuff.themes[nct_stuff.selectedTheme].coloring_window; $(".container")[0].style.backgroundColor = "#d10000"; document.getElementById("header").src = "https://i.imgur.com/xQOH0Sn.png"; document.body.background = "https://i.imgur.com/FeuiYH8.png"; e.election_json = [{"model":"campaign_trail.election","pk":20,"fields":{"year":2016,"summary":"
After the ratification of the Equal Right to Govern Amendment in 2014, the natural-born requirement has been outlawed and naturalized citizens can now run for President and Vice President.

In the 2016 United States presidential election, former California governor, actor, and bodybuilder Arnold Schwarzenegger is the first naturalized citizen to run for President and get the Republican nomination. He is quite moderate to liberal on social issues, which has triggered Mike Huckabee's socially conservative third-party campaign under the Constitution Party. He will face off against former First Lady and Secretary of State Hillary Clinton, who is hoping to break the glass ceiling and become the first female President of the United States.

How will the 2016 campaign play out? Will Arnold Schwarzenegger be able to take advantage of Hillary's unpopularity and follow Ronald Reagan's footsteps to the presidency? Or will Hillary Clinton be able to continue Obama's legacy for another four years?
","image_url":"https://i.imgur.com/sHFjvz3.png","winning_electoral_vote_number":270,"advisor_url":"https://i.imgur.com/dLyfufP.png","recommended_reading":"

Canon Map





I hope everyone enjoyed the redux of this mod, as much as I did making it. The sequel, Arnold Schwarzenegger vs Tim Ryan, should be released in March 2024. Stay tuned!

","has_visits":1,"no_electoral_majority_image":"../static/images/2012-no-majority.jpg"}}];e.temp_election_list = [{"id":20,"year":2016,"is_premium":0,"display_year":"2016ARNOLD"}];e.credits = "Environmental_Cap104";e.global_parameter_json = [{"model":"campaign_trail.global_parameter","pk":1,"fields":{"vote_variable":1.125,"max_swing":0.12,"start_point":0.94,"candidate_issue_weight":10,"running_mate_issue_weight":3,"issue_stance_1_max":-0.71,"issue_stance_2_max":-0.3,"issue_stance_3_max":-0.125,"issue_stance_4_max":0.125,"issue_stance_5_max":0.3,"issue_stance_6_max":0.71,"global_variance":0.01,"state_variance":0.005,"question_count":25,"default_map_color_hex":"#C9C9C9","no_state_map_color_hex":"#999999"}}];e.candidate_json = [{"model":"campaign_trail.candidate","pk":200,"fields":{"first_name":"Arnold","last_name":"Schwarzenegger","election":20,"party":"Republican","state":"California","priority":1,"description":"Arnold Schwarzenegger has had a long career in many different fields. He was a bodybuilder, well-known action film star, and most recently Governor of California from 2003 to 2011 after the recall election of Governor Gray Davis. If elected, he will be the first President that wasn't born an American citizen, thanks to the Equal Right to Govern Amendment passed in 2014.

In terms of positions, he is quite moderate on social issues, but conservative on economic issues. Mike Huckabee has launched a third-party social conservative campaign, which has split the Republican vote, potentially hindering Schwarzenegger's chances of winning. However, he is the favorite in the polls, judging by Hillary Clinton's unpopularity.","color_hex":"#d60000","secondary_color_hex":null,"is_active":1,"image_url":"https://i.imgur.com/PMlq9sD.png","electoral_victory_message":"

REAL PATRIOT DUMMY EXAMPLE SWEEPS

","electoral_loss_message":"

Fake News?

","no_electoral_majority_message":"

DUMMY EXAMPLE RETURNS TO HELL

","description_as_running_mate":null,"candidate_score":1,"running_mate":false,"scrollable":false}},{"model":"campaign_trail.candidate","pk":201,"fields":{"first_name":"Hillary","last_name":"Clinton","election":20,"party":"Democrat","state":"New York","priority":1,"description":"After facing an unexpectedly strong challenge by Vermont Senator Bernie Sanders in the primaries, Hillary Clinton has won the 2016 Democratic primaries, hoping to become the first female President of the United States. She was traditionally known as a mainstream Democrat, but tacked significantly to the left during the primary campaign.

However, she is fairly unpopular, and many voters find her very untrustworthy and out of touch with the people. Can she fight back against the attacks and become the first female President? Or will she be terminated by the Terminator?","color_hex":"#0000d1","secondary_color_hex":null,"is_active":0,"image_url":"https://i.imgur.com/QzuCplN.png","electoral_victory_message":"

REAL PATRIOT DUMMY EXAMPLE SWEEPS

","electoral_loss_message":"

Fake News?

","no_electoral_majority_message":"

DUMMY EXAMPLE RETURNS TO HELL

","description_as_running_mate":null,"candidate_score":1,"running_mate":false,"scrollable":false}},{"model":"campaign_trail.candidate","pk":203,"fields":{"first_name":"Jill","last_name":"Stein","election":20,"party":"Green","state":"Massachusetts","priority":1,"description":"Green Party nominee who takes votes from Hillary.","color_hex":"#00b31e","secondary_color_hex":null,"is_active":0,"image_url":"https://upload.wikimedia.org/wikipedia/commons/a/a8/Jill_Stein_by_Gage_Skidmore.jpg","electoral_victory_message":"

REAL PATRIOT DUMMY EXAMPLE SWEEPS

","electoral_loss_message":"

Fake News?

","no_electoral_majority_message":"

DUMMY EXAMPLE RETURNS TO HELL

","description_as_running_mate":null,"candidate_score":1,"running_mate":false,"scrollable":false}},{"model":"campaign_trail.candidate","pk":202,"fields":{"first_name":"Mike","last_name":"Huckabee","election":20,"party":"Constitution","state":"Arkansas","priority":1,"description":"Mike Huckabee is the former Governor of Arkansas, serving from 1996 to 2007. He also ran for the 2016 Republican presidential nomination, dropping out after Iowa.

He is very socially conservative, and will be running as a splinter candidate to hopefully win over conservative voters may not like Schwarzenegger's moderate stances on social issues. If he could win a few states down South, he would be the first third-party candidate to win electoral votes since George Wallace in 1968. This could also potentially swing the election towards Hillary Clinton, if Huckabee can perform well in the battleground states of Florida, Georgia, and North Carolina.","color_hex":"#b000e0","secondary_color_hex":null,"is_active":0,"image_url":"https://upload.wikimedia.org/wikipedia/commons/4/4b/Mike_Huckabee_by_Gage_Skidmore_6.jpg","electoral_victory_message":"

REAL PATRIOT DUMMY EXAMPLE SWEEPS

","electoral_loss_message":"

Fake News?

","no_electoral_majority_message":"

DUMMY EXAMPLE RETURNS TO HELL

","description_as_running_mate":null,"candidate_score":1,"running_mate":false,"scrollable":false}},{"model":"campaign_trail.candidate","pk":1005,"fields":{"first_name":"Lindsey","last_name":"Graham","election":20,"party":"Republican","state":"South Carolina","priority":1,"description":"Lindsey Graham is a Senator from South Carolina, taking over Strom Thurmond's seat after his retirement in 2002. He is one of John McCain's best friends in the Senate, and has advocated for a more moderate and inclusive Republican Party. He does have some slight conservative tendencies on some things, which could help eat into Mike Huckabee's support.

Although South Carolina is widely expected to go for you this year, the Huckabee campaign is targeting this state. Graham's geographical advantage could save your candidacy in the Southeast, which many think could go to Hillary Clinton due to Huckabee splitting the vote. ","color_hex":"#ff0000","secondary_color_hex":null,"is_active":0,"image_url":"https://i.imgur.com/systCJ0.png","electoral_victory_message":"

REAL PATRIOT DUMMY EXAMPLE SWEEPS

","electoral_loss_message":"

Fake News?

","no_electoral_majority_message":"

DUMMY EXAMPLE RETURNS TO HELL

","description_as_running_mate":"Lindsey Graham is a Senator from South Carolina, taking over Strom Thurmond's seat after his retirement in 2002. He is one of John McCain's best friends in the Senate, and has advocated for a more moderate and inclusive Republican Party. He does have some slight conservative tendencies on some things, which could help eat into Mike Huckabee's support.

Although South Carolina is widely expected to go for you this year, the Huckabee campaign is targeting this state. Graham's geographical advantage could save your candidacy in the Southeast, which many think could go to Hillary Clinton due to Huckabee splitting the vote. ","candidate_score":1,"running_mate":true,"scrollable":false,"partner":"0"}},{"model":"campaign_trail.candidate","pk":1006,"fields":{"first_name":"Susan","last_name":"Collins","election":20,"party":"Republican","state":"Maine","priority":1,"description":"Susan Collins has served Maine in the Senate since 1996, where she is very popular in spite of the state's Democratic lean on the presidential level. She is one of the few prominent New England Republicans left in Congress, and is quite moderate on most issues.

Although Susan Collins could give Huckabee a lot of momentum in the South, she could help double down on your moderate vision for America, and could also help with Bernie or Bust voters in New England and other traditionally blue states. For those reasons, Susan Collins is seen as a wild card for the 2016 electoral map.","color_hex":"#ff0000","secondary_color_hex":null,"is_active":0,"image_url":"https://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Senator_Susan_Collins_2014_official_portrait.jpg/330px-Senator_Susan_Collins_2014_official_portrait.jpg","electoral_victory_message":"

REAL PATRIOT DUMMY EXAMPLE SWEEPS

","electoral_loss_message":"

Fake News?

","no_electoral_majority_message":"

DUMMY EXAMPLE RETURNS TO HELL

","description_as_running_mate":"Susan Collins has served Maine in the Senate since 1996, where she is very popular in spite of the state's Democratic lean on the presidential level. She is one of the few prominent New England Republicans left in Congress, and is quite moderate on most issues.

Although Susan Collins could give Huckabee a lot of momentum in the South, she could help double down on your moderate vision for America, and could also help with Bernie or Bust voters in New England and other traditionally blue states. For those reasons, Susan Collins is seen as a wild card for the 2016 electoral map.","candidate_score":1,"running_mate":true,"scrollable":false,"partner":"0"}},{"model":"campaign_trail.candidate","pk":1007,"fields":{"first_name":"John","last_name":"Kasich","election":20,"party":"Republican","state":"Ohio","priority":1,"description":"John Kasich has served as the Governor of Ohio since 2010, and has also served in Congress for about two decades in the 1980s and 1990s. Similarly to you, he is quite moderate on most issues, which could help double down on your moderate Republican image. He is quite strong on foreign policy, though.

Ohio is regarded as one of the most competitive battleground states in the country, and Kasich could give you a huge boost there, as well as in some traditionally Democratic states in the Rust Belt, including Michigan and Pennsylvania. However, due to his socially moderate tendencies, he could make you quite vulnerable in the South, where the vote splitting from Mike Huckabee's candidacy could tip some states towards Hillary Clinton.","color_hex":"#ff0000","secondary_color_hex":null,"is_active":0,"image_url":"https://i.imgur.com/oSSPF9T.png","electoral_victory_message":"

REAL PATRIOT DUMMY EXAMPLE SWEEPS

","electoral_loss_message":"

Fake News?

","no_electoral_majority_message":"

DUMMY EXAMPLE RETURNS TO HELL

","description_as_running_mate":"John Kasich has served as the Governor of Ohio since 2010, and has also served in Congress for about two decades in the 1980s and 1990s. Similarly to you, he is quite moderate on most issues, which could help double down on your moderate Republican image. He is quite strong on foreign policy, though.

Ohio is regarded as one of the most competitive battleground states in the country, and Kasich could give you a huge boost there, as well as in some traditionally Democratic states in the Rust Belt, including Michigan and Pennsylvania. However, due to his socially moderate tendencies, he could make you quite vulnerable in the South, where the vote splitting from Mike Huckabee's candidacy could tip some states towards Hillary Clinton.","candidate_score":1,"running_mate":true,"scrollable":false,"partner":"0"}},{"model":"campaign_trail.candidate","pk":1008,"fields":{"first_name":"Rand","last_name":"Paul","election":20,"party":"Republican","state":"Kentucky","priority":1,"description":"Rand Paul has served Kentucky in the Senate since 2011. He describes himself as a \"constitutional Conservative\", and is viewed as a libertarian to the likes of his father Ron Paul. Even though he is part of the Tea Party movement, Paul can help you unify the Republican Party by eating into some of Huckabee's base.

Rand's home state of Kentucky isn't competitive at all this year, but his positions can help you in many parts of the country, including the West, New Hampshire, and the South. He is also a good candidate to balance the ticket in terms of age, as he is quite young compared to you. ","color_hex":"#ff0000","secondary_color_hex":null,"is_active":0,"image_url":"https://i.imgur.com/OU1Qfh3.png","electoral_victory_message":"

REAL PATRIOT DUMMY EXAMPLE SWEEPS

","electoral_loss_message":"

Fake News?

","no_electoral_majority_message":"

DUMMY EXAMPLE RETURNS TO HELL

","description_as_running_mate":"Rand Paul has served Kentucky in the Senate since 2011. He describes himself as a \"constitutional Conservative\", and is viewed as a libertarian to the likes of his father Ron Paul. Even though he is part of the Tea Party movement, Paul can help you unify the Republican Party by eating into some of Huckabee's base.

Rand's home state of Kentucky isn't competitive at all this year, but his positions can help you in many parts of the country, including the West, New Hampshire, and the South. He is also a good candidate to balance the ticket in terms of age, as he is quite young compared to you. ","candidate_score":1,"running_mate":true,"scrollable":false,"partner":"0"}},{"model":"campaign_trail.candidate","pk":1009,"fields":{"first_name":"Chuck","last_name":"Hagel","election":20,"party":"Republican","state":"Nebraska","priority":1,"description":"Chuck Hagel is a former Senator from Nebraska, serving from 1997 to 2009. He was later appointed Secretary of Defense by President Obama in 2013, serving until his resignation in 2015. He is very moderate, and had strong disagreements with the Bush administration on foreign policy and on other issues.

Although his home state of Nebraska will go solidly for you this year, he can help double down on your moderate image. However, it is very likely that he'll face criticism from the Huckabee wing, considering Hagel's positions on social issues and foreign policy. This could give Huckabee's campaign a lot of momentum in the South.","color_hex":"#ff0000","secondary_color_hex":null,"is_active":0,"image_url":"https://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Secretary_of_Defense_Chuck_Hagel._130227-A-SS368-001.jpg/1200px-Secretary_of_Defense_Chuck_Hagel._130227-A-SS368-001.jpg","electoral_victory_message":"

REAL PATRIOT DUMMY EXAMPLE SWEEPS

","electoral_loss_message":"

Fake News?

","no_electoral_majority_message":"

DUMMY EXAMPLE RETURNS TO HELL

","description_as_running_mate":"Chuck Hagel is a former Senator from Nebraska, serving from 1997 to 2009. He was later appointed Secretary of Defense by President Obama in 2013, serving until his resignation in 2015. He is very moderate, and had strong disagreements with the Bush administration on foreign policy and on other issues.

Although his home state of Nebraska will go solidly for you this year, he can help double down on your moderate image. However, it is very likely that he'll face criticism from the Huckabee wing, considering Hagel's positions on social issues and foreign policy. This could give Huckabee's campaign a lot of momentum in the South.","candidate_score":1,"running_mate":true,"scrollable":false,"partner":"0"}},{"model":"campaign_trail.candidate","pk":1010,"fields":{"first_name":"Brian","last_name":"Sandoval","election":20,"party":"Republican","state":"Nevada","priority":1,"description":"Brian Sandoval has served as Governor of Nevada since 2011. If elected, he will become the first Latino Vice President of the United States. Like you, he is quite moderate on social issues, Obamacare, and immigration. Sandoval can help balance the ticket on age and race, and can help you with Latino voters who may be skeptical of Hillary Clinton.

Nevada is expected to be a battleground state this year, and he is extremely popular in that state. He could give you a sizable boost there as well as in the rest of the Mountain West and Florida, where there are high Hispanic populations.","color_hex":"#ff0000","secondary_color_hex":null,"is_active":0,"image_url":"https://i.imgur.com/kEjyERN.png","electoral_victory_message":"

REAL PATRIOT DUMMY EXAMPLE SWEEPS

","electoral_loss_message":"

Fake News?

","no_electoral_majority_message":"

DUMMY EXAMPLE RETURNS TO HELL

","description_as_running_mate":"Brian Sandoval has served as Governor of Nevada since 2011. If elected, he will become the first Latino Vice President of the United States. Like you, he is quite moderate on social issues, Obamacare, and immigration. Sandoval can help balance the ticket on age and race, and can help you with Latino voters who may be skeptical of Hillary Clinton.

Nevada is expected to be a battleground state this year, and he is extremely popular in that state. He could give you a sizable boost there as well as in the rest of the Mountain West and Florida, where there are high Hispanic populations.","candidate_score":1,"running_mate":true,"scrollable":false,"partner":"0"}}];e.running_mate_json = [{"model":"campaign_trail.running_mate","pk":2001,"fields":{"candidate":200,"running_mate":1005}},{"model":"campaign_trail.running_mate","pk":2002,"fields":{"candidate":200,"running_mate":1006}},{"model":"campaign_trail.running_mate","pk":2003,"fields":{"candidate":200,"running_mate":1007}},{"model":"campaign_trail.running_mate","pk":2004,"fields":{"candidate":200,"running_mate":1008}},{"model":"campaign_trail.running_mate","pk":2005,"fields":{"candidate":200,"running_mate":1009}},{"model":"campaign_trail.running_mate","pk":2006,"fields":{"candidate":200,"running_mate":1010}}]; HistHexcolour=["#d60000","#0000d1","#b000e0","#00b31e"]; HistName=["Arnold Schwarzenegger","Hillary Clinton","Mike Huckabee", "Jill Stein"]; HistEV=[339,199,0,0]; HistPV=["62,741,427","56,987,846","15,890,842","1,369,900"]; HistPVP=["45.8%","41.6%","11.6%","1.0%"]; var changeGameDisp = (hide) => { disp = ""; if (hide) { disp = "none"; } document.getElementsByClassName("inner_window_w_desc")[0].style.display = disp }; e.creditsPage = () => { credits_html = `

Coding

Environmental_Cap104

Writing

Environmental_Cap104

Misc.

DecstarG for the Music Player

Music Credit

JibJab - Ahnuld for Governor

The Terminator - Main Theme

Sia - Cheap Thrills

Luke Million - Arnold

Sheryl Crow - Real Gone



` changeGameDisp(true); var spacer = document.createElement("amongusspacerthisisntarealelement"); spacer.innerHTML = "      "; document .getElementsByClassName("inner_window_w_desc")[0] .children[1].appendChild(spacer); changeGameDisp(true); var menuHeader = document.createElement("div"); menuHeader.classList.add("inner_window_front"); menuHeader.innerHTML = `

Credits

`; menuHeader.id = "SOTUheader"; menuHeader.style = "height: 50px;background-color:#2d2d2d"; var newMenu = document.createElement("div"); newMenu.classList.add("inner_window_front"); newMenu.id = "SOTUmenu"; newMenu.style = `height:260px;background-color:#2d2d2d;color:white;overflow-y: scroll;`; newMenu.innerHTML = credits_html; let z = document.getElementById("game_window"); var backButton = document.createElement("button"); backButton.style = "position: relative; bottom: -13px; left: -380px; width: 150px; height: 80px;font-size:40px;padding-top:5px;padding-left:8px"; backButton.id = "backSOTUBtn"; backButton.innerHTML = `BACK`; backButton.onclick = function () { document.getElementById("SOTUheader").remove(); document.getElementById("SOTUmenu").remove(); document.getElementById("backSOTUBtn").remove(); changeGameDisp(false); }; z.appendChild(menuHeader); z.appendChild(newMenu); z.appendChild(backButton); } e.credits = "" // Initialise custom music $("#music_player")[0].children[0].style.display="none" $("#music_player")[0].children[1].style.display="none" document.getElementById("modLoadReveal").style.display="none" document.getElementById("modloaddiv").style.display="none" musicBox = document.getElementById("music_player") musicBox.style.display="" var trackSel; e = campaignTrail_temp e.selectedSoundtrack = 0 toTime = (seconds) => { var date = new Date(null); date.setSeconds(seconds); return date.toISOString().substr(11, 8); } generateTime = () => { // Get the audio element var audio = document.getElementById("campaigntrailmusic"); timeTracker = document.createElement("div"); timeTracker.style = ` text-align:left; border-style:solid; border-width:3px; height:150px; width:200px; background-color:#999999; float:right; padding: 10px; ` $("#trackSelParent")[0].prepend(timeTracker); $("#trackSelParent")[0].prepend(document.createElement("br")); // Create a new element to display the current position of the audio var positionDisplay = document.createElement("gg"); positionDisplay.id = "position-display"; // Create a new slider element to change the time var timeSlider = document.createElement("input"); timeSlider.type = "range"; timeSlider.min = 0; timeSlider.max = 1; timeSlider.step = 0.001; timeSlider.value = 0; timeSlider.style.width = "200px"; timeSlider.id = "time-slider"; var pausePlay = document.createElement("button"); pausePlay.id = "position-display"; pausePlay.innerHTML = "Pause" pausePlay.style.width = "100%"; pausePlay.addEventListener("click", event => { event.preventDefault(); updatePositionDisplay(); let audio = document.getElementById("campaigntrailmusic"); if (audio.paused) { audio.play(); event.target.innerHTML = "Pause"; return; } audio.pause(); event.target.innerHTML = "Play"; return; }) var volumeLabel = document.createElement("gg"); volumeLabel.id = "volume-label"; volumeLabel.innerHTML = "
Volume: " var volumeSlider = document.createElement("input"); volumeSlider.type = "range"; volumeSlider.min = 0; volumeSlider.max = 1; volumeSlider.step = 0.001; volumeSlider.value = 0; volumeSlider.style.width = "200px"; volumeSlider.id = "volume-slider"; volumeSlider.value = audio.volume; timeTracker.appendChild(pausePlay); timeTracker.appendChild(document.createElement("br")); timeTracker.appendChild(document.createElement("br")); timeTracker.appendChild(positionDisplay); timeTracker.appendChild(timeSlider); timeTracker.appendChild(volumeLabel); timeTracker.appendChild(volumeSlider); updatePositionDisplay(); //for (let i = 0; i < 10; i++) //timeTracker.append(document.createElement("br")); // Function to update the position display function updatePositionDisplay() { positionDisplay.innerHTML = "Time: " + toTime(audio.currentTime) + "
"; timeSlider.value = audio.duration ? audio.currentTime / audio.duration : 0; } // Function to change the time of the audio function changeTime() { positionDisplay.innerHTML = "Time: " + toTime(audio.currentTime) + "
"; audio.currentTime = timeSlider.value * audio.duration; } updateVolume = event => { audio.volume = event.target.value; } // Update the position display and slider every second setInterval(updatePositionDisplay, 1000); // Listen for changes to the time slider and change the time of the audio timeSlider.addEventListener("input", changeTime); volumeSlider.addEventListener("input", updateVolume) } function newMusicPlayer() { trackSel = document.createElement("div"); trackSel.id = "trackSelParent" let z = `









` z += `

` //
for (i in soundtracks[e.selectedSoundtrack].tracklist) { let a = soundtracks[e.selectedSoundtrack].tracklist[i] let b = `
` z += b } z += "


" trackSel.innerHTML = z // select correct song musicBox.appendChild(trackSel); Array.from(document.getElementById("trackSel").children).filter(f=>{ return f.tagName == "LABEL" }).map(f=>f.children[0])[0].checked = true // set soundtrack changer soundtrackSelector = document.getElementById("selectSoundtrack") soundtrackSelector.onchange = function() { for (i in soundtracks) { if (soundtracks[i].name == soundtrackSelector.value) { e.selectedSoundtrack = i break } } document.getElementById("trackSelParent").remove() newMusicPlayer() } var matches = document.querySelectorAll('.trackSelector'); for (match in matches) { matches[match].onchange = function() { audio = $("#campaigntrailmusic")[0]; audio.src = soundtracks[e.selectedSoundtrack].tracklist[this.value].url audio.currentTime = 0 } } musicBox.children[2].loop = false musicBox.children[2].src = soundtracks[e.selectedSoundtrack].tracklist[0].url musicBox.children[2].onended = function() { console.log("next track") let selected = Number(document.querySelector('input[name="trackSelector"]:checked').value); let newSel = clamp(selected+1, soundtracks[e.selectedSoundtrack].tracklist.length-1, 0) let buttons = Array.from(document.getElementById("trackSel").children).filter(f=>{ return f.tagName == "LABEL" }).map(f=>f.children[0]) //let selectedIndex = buttons.map(f=>f.children[0]).map(f=>f.checked) buttons[newSel].click() } for (w = 0; w < 7; w++) { document.getElementById("trackSelParent").appendChild(document.createElement("br")) } generateTime(); } clamp = function(a, max, min, overflow=true) { if (overflow) { return a > max ? min : a < min ? max : a; } return a > max ? max : a < min ? min : a; } // Track list var soundtracks = { 0: { name: "Ahnuld for President of America", tracklist: [ { "name": "JibJab - Ahnuld for Governor", "url": "https://audio.jukehost.co.uk/f0HuZheAs6hnlJNSFELX1gSAWKNvMprz" }, { "name": "The Terminator - Main Theme", "url": "https://audio.jukehost.co.uk/YwiFaQSrDL0ZpyxhydnZpl2cm9lnaZJC" }, { "name": "Sia - Cheap Thrills", "url": "https://audio.jukehost.co.uk/Pp7TwNe7ZCQsmgQKwibl38j42n6It00m" }, { "name": "Luke Million - Arnold", "url": "https://audio.jukehost.co.uk/yAilvBusLaOsHKQPj4FFD6u3BH1SYP9O" }, { "name": "Sheryl Crow - Real Gone", "url": "https://audio.jukehost.co.uk/uSkx8iXE3oQ6BZQ9ZbFqYfPh49SfaMrU" }, ] } } // Set up new music player newMusicPlayer() RecReading=true