e=campaignTrail_temp campaignTrail_temp.election_json = JSON.parse("[{\"model\": \"campaign_trail.election\", \"pk\": 20, \"fields\": {\"year\": 1956, \"site_image\": \"https://i.imgur.com/idGxcz6.jpg\", \"site_description\": \"

After 4 years of Eisenhower’s Modern Republicanism, voters will express their approval or disapproval of his governance as the Cold War heats up.

\", \"summary\": \"

After 4 years of Eisenhower’s Modern Republicanism, voters will express their approval or disapproval of his governance as the Cold War heats up.

\", \"image_url\": \"https://i.imgur.com/idGxcz6.jpg\", \"winning_electoral_vote_number\": 266, \"advisor_url\": \"https://imgur.com/1MQc7PP.jpg\", \"recommended_reading\": \"

1956: Peace and Prosperity

Join this Discord Server to stay in the loop about all my upcoming projects!

Sources

New York Times - STEVENSON SCORES G.O.P. AS DEFEATIST OVER FARM 'CRISIS'

Theodore H. White - The Negro Voter: Can He Elect a President?

Miller Center of Public Affairs - DWIGHT D. EISENHOWER: CAMPAIGNS AND ELECTIONS

Bevan Sewell - The political perils of Cold War foreign relations: Adlai Stevenson’s democrats and foreign policy in the 1956 presidential election

Timothy Barney - ADLAI E. STEVENSON, 'A NEW AMERICA', ACCEPTANCE ADDRESS AT THE DEMOCRATIC NATIONAL CONVENTION

Credits

Coding for Stevenson was done by ItsAstronomical, while KingJazB coded the Ike side.

Stevenson was written by Cupojo396 with help from Jake Dionysos, while Eisenhower's side was written by ChooseanUniqueName.


The VP Switcher belongs to Decstar, and of course...

Special Thanks

...thank you for playing!

- Astronomical



What are you doing here?! Go play the mod again!

\", \"has_visits\": 1, \"no_electoral_majority_image\": \"/static/images/2012-no-majority.jpg\"}}]"); campaignTrail_temp.candidate_json = JSON.parse("[{\"model\": \"campaign_trail.candidate\", \"pk\": 200, \"fields\": {\"first_name\": \"Dwight\", \"last_name\": \"Eisenhower\", \"election\": 20, \"party\": \"Republican\", \"state\": \"Pennsylvania\", \"priority\": 1, \"description\": \"

Dwight Eisenhower is the incumbent President and former General in World War II. Eisenhower’s war hero image and Truman’s unpopularity propelled the Republican to a smashing victory in 1952. He has generally governed in a moderate direction and is seen favorably by the public; however, he suffered a heart attack in 1955 that has raised eyebrows.

First and foremost, Eisenhower must demonstrate to voters that he has the physical fitness at age 66 to serve another 4 years. At the same time, he should delegate his harshest attacks to his surrogates to appear above the partisan fray. But the election begins as his to lose, given his popularity and foreign policy expertise.

\", \"color_hex\": \"#C7100F\", \"secondary_color_hex\": \"#FFA0A0\", \"is_active\": 1, \"image_url\": \"https://itsastronomical.com/assets/1956/Eisenhower.png\", \"electoral_victory_message\": \"

Congratulations! You have won the 1956 election.

America still likes Ike! Your Modern Republicanism has again been given a mandate to govern–although you could turn in a more conservative direction, given the rise of that group in your party. You must now try your best to cool the red-hot relationship between America and the USSR, while not caving to communist demands.

Unfortunately for you, Democrats have retained their (albeit slim) congressional majorities, and may force you to compromise on some issues. Perhaps you can pass some transformational bills while working with them on civil rights, for instance. This will undoubtedly be your last run for public office, and you can hand-pick your Republican successor to compete in the 1960 election. Good luck, Mr. President!

\", \"electoral_loss_message\": \"

Sorry! You have lost the 1956 election.

To the surprise of many, the American people have turned away from your administration to elect Adlai Stevenson. This’ll surely give pundits a lot to chew on in the coming months, as well as your party leadership. Democrats now hold a trifecta and can pass much of their agenda.

Your political career is almost certainly over. You could challenge Stevenson again in 1960, but your age and health may get in your way. Your likely destination is the role of elder statesman who may be able to influence the GOP’s direction as well as party nominee in 4 years. Richard Nixon will likely take over the reigns, whether you approve of it or not. Retirement awaits you in Abilene…

\", \"no_electoral_majority_message\": \"

Wow! The election has been thrown to the House of Representatives.

Few expected the race to be close in the first place, but an electoral deadlock has everyone stupefied. With no party holding an outright majority of state House delegations, and the Senate deadlocked nearly 50-50 among Ds and Rs, the nation may plunge into a constitutional crisis. Your next moves in the coming days are critical to both securing a victory and/or ensuring an orderly transition of power.

Democrats may hold a slight advantage at the outset: they control 22 House delegations to the Republicans’ 21 (the remaining 5 split). Your prospects rely almost entirely on peeling off the Representatives from the split House delegations, as well as potential Southern defections. No matter what occurs, the next few months are sure to be tumultuous. Good luck, Mr. President–you’ll need it.

\", \"description_as_running_mate\": \"'\", \"candidate_score\": 1.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 201, \"fields\": {\"first_name\": \"Adlai\", \"last_name\": \"Stevenson\", \"election\": 20, \"party\": \"Democratic\", \"state\": \"Illinois\", \"priority\": 2, \"description\": \"

Adlai Stevenson is the former Governor of Illinois and was the Democratic presidential nominee in 1952. He won his party’s nomination at the convention, but lost handily to Eisenhower in the general election. He became the de facto leader of the Democratic Party and won the primaries in ‘56 in a hard fought battle against Estes Kefauver.

Stevenson’s obvious problem is that he already lost to Eisenhower in 1952. His opponent hasn’t gotten any less popular since then, so he faces an uphill battle this election. But don’t count out this Princeton egghead: pundits expect a rebound for Democrats following the favorable midterms, and Adlai is trusted on some domestic issues. Yet this election is sure to be dominated by the Cold War, and foreign policy was and is an infirmity for Stevenson. All in all, Stevenson will need to play his cards near-perfectly to win.

\", \"color_hex\": \"#0e1896\", \"secondary_color_hex\": \"#5b61b3\", \"is_active\": 1, \"image_url\": \"https://i.imgur.com/0tIVoPb.png\", \"electoral_victory_message\": \"

Congratulations! You have won the 2016 election.

In spite of a hard-fought challenge from Donald Trump, you have become the first woman elected to serve as President.

On the political front, it is unclear how much of your agenda you will be able to push forward with the current Congress. Hopefully your victory has helped Democrats further down the ballot. Start packing and prepare to move back into the White House!

\", \"electoral_loss_message\": \"

Sorry! You have lost the 2016 election.

Many of your supporters are despondent that you have faltered to the likes of Donald Trump. Many in the left wing of the party are furious that you pushed their candidate aside, only to lose. Time will tell how Trump operates as President. As for you, a long and sometimes ambiguous political career seems to be coming to its end.

\", \"no_electoral_majority_message\": \"

Sorry! You have lost the 2016 election.

No candidate secured a majority in the Electoral College. However, the Republicans won a majority in Congress and will elevate Trump to the Presidency. Time will tell how things go in that regard. As for you, a long and sometimes ambiguous political career seems to be coming to its end.

\", \"description_as_running_mate\": \"'\", \"candidate_score\": 1.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 202, \"fields\": {\"first_name\": \"T. Coleman\", \"last_name\": \"Andrews/Dixiecrats\", \"election\": 20, \"party\": \"Independent\", \"state\": \"South Carolina\", \"priority\": 3, \"description\": \"'\", \"color_hex\": \"#FFA500\", \"secondary_color_hex\": \"#FFA500\", \"is_active\": 0, \"image_url\": \"https://itsastronomical.com/assets/1956/andrews.png\", \"electoral_victory_message\": \"'\", \"electoral_loss_message\": \"'\", \"no_electoral_majority_message\": \"'\", \"description_as_running_mate\": \"'\", \"candidate_score\": 1.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 203, \"fields\": {\"first_name\": \"Eric\", \"last_name\": \"Hass/Others\", \"election\": 20, \"party\": \"Socialist Labor\", \"state\": \"New York\", \"priority\": 4, \"description\": \"'\", \"color_hex\": \"#00C100\", \"secondary_color_hex\": \"#A1FFA1\", \"is_active\": 0, \"image_url\": \"'\", \"electoral_victory_message\": \"'\", \"electoral_loss_message\": \"'\", \"no_electoral_majority_message\": \"'\", \"description_as_running_mate\": \"'\", \"candidate_score\": 1.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 204, \"fields\": {\"first_name\": \"Richard\", \"last_name\": \"Nixon\", \"election\": 20, \"party\": \"Republican\", \"state\": \"California\", \"priority\": 5, \"description\": \"'\", \"color_hex\": \"#FF0000\", \"secondary_color_hex\": \"#FFA0A0\", \"is_active\": 0, \"image_url\": \"https://imgur.com/MmhKVzY.jpg\", \"electoral_victory_message\": \"'\", \"electoral_loss_message\": \"'\", \"no_electoral_majority_message\": \"'\", \"description_as_running_mate\": \"

Richard Nixon is the incumbent Vice President and former Senator from California. After his victory in the 1950 California Senate election, he was chosen as Eisenhower’s running mate in 1952. He became embroiled in a secret fund scandal during the campaign, but his Checkers Speech restored both Ike and America’s confidence in him. He has been deployed as an “attack dog” and is generally considered to be a staunch conservative.

Nixon’s liabilities in 1956 are notable: liberals think he is too conservative, conservatives think he is too liberal, and most voters don’t like him. But the GOP rank-and-file–besides Harold Stassen–are behind the man they call Dick. Eisenhower has his reservations about him, yet it seems doing anything but re-nominating Nixon will cause controversy.

\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 205, \"fields\": {\"first_name\": \"Christian\", \"last_name\": \"Herter\", \"election\": 20, \"party\": \"Republican\", \"state\": \"Massachusetts\", \"priority\": 6, \"description\": \"'\", \"color_hex\": \"#FF0000\", \"secondary_color_hex\": \"#FFA0A0\", \"is_active\": 0, \"image_url\": \"https://imgur.com/wWPrFFp.jpg\", \"electoral_victory_message\": \"'\", \"electoral_loss_message\": \"'\", \"no_electoral_majority_message\": \"'\", \"description_as_running_mate\": \"

Christian Herter is the current Governor of Massachusetts and previously a member of the House of Representatives. He was the namesake of the Herter Committee that studied the Marshall Plan. Disarmament advisor Harold Stassen has argued vociferously for Herter’s nomination, to the chagrin of the rest of the party.

Eisenhower has privately expressed doubts about his current Vice President, and has not suppressed Stassen’s campaign. Adding Herter to the ticket is not without its headaches, though. Much of the GOP party officials would at the very least resent the move, and Herter has less elected experience. The public does not know who he is; this may or may not be helpful. His foreign policy bona fides could help this year, but Eisenhower already has the advantage there. Choosing Herter would be a risky move, but he’s not as disliked as Nixon…

\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 209, \"fields\": {\"first_name\": \"The\", \"last_name\": \"Convention\", \"election\": 20, \"party\": \"Democratic\", \"state\": \"Illinois\", \"priority\": 9, \"description\": \"'\", \"color_hex\": \"#0000FF\", \"secondary_color_hex\": \"#90C0FF\", \"is_active\": 0, \"image_url\": \"https://i.imgur.com/KVz8ua9.png\", \"electoral_victory_message\": \"'\", \"electoral_loss_message\": \"'\", \"no_electoral_majority_message\": \"'\", \"description_as_running_mate\": \"

This year you've taken a bold chance: You've allowed the delegates of the DNC to choose your running mate. This is an incredibly risky gamble, though it has the possibility of supercharging media coverage of the convention and hype for your upcoming campaign.

The primary contenders include Tennessee Senator Estes Kefauver, Massachusetts Senator John Kennedy, as well as New York Mayor Robert Wagner and New Mexico Senator Clinton Anderson. There are even rumors that John Sparkman, your running mate from four years ago, has a chance at renomination. Whoever it is, let’s hope to God it excites the electorate enough to help you in your David vs Goliath battle against Eisenhower.

\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 210, \"fields\": {\"first_name\": \"Estes\", \"last_name\": \"Kefauver\", \"election\": 20, \"party\": \"Democratic\", \"state\": \"Tennessee\", \"priority\": 9, \"description\": \"'\", \"color_hex\": \"#0000FF\", \"secondary_color_hex\": \"#90C0FF\", \"is_active\": 0, \"image_url\": \"https://itsastronomical.com/assets/1956/estes.png\", \"electoral_victory_message\": \"'\", \"electoral_loss_message\": \"'\", \"no_electoral_majority_message\": \"'\", \"description_as_running_mate\": \"

Estes Kefauver is the incumbent senior Senator from Tennessee, elected in 1948 by a large margin over his Republican opponent. Estes has gained a reputation as a Populist, Progressive with an Anti-Corruption focus, leading the Committee to Investigate Crime in Interstate Commerce, better known as the Kefauver Committee. After his 1952 bid failed primarily due to his soured relationship with many establishment Democrats, Kefauver once again sought the nomination this year and performed well in the Midwest, Great Plains, and parts of the Northeast.

Despite his willingness to join the ticket, he still may very well hold some feelings of resentment towards his old primary rival. Kefauver on the ticket would help unite the party and assist in his home state of Tennessee. However, Kefauver's progressive views on many issues could likely hurt you in most of the Deep South. His outsider reputation would be both a gift and a curse as it may strain your relationship with some establishment Democrats.

\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 211, \"fields\": {\"first_name\": \"John F.\", \"last_name\": \"Kennedy\", \"election\": 20, \"party\": \"Democratic\", \"state\": \"Massachusetts\", \"priority\": 9, \"description\": \"'\", \"color_hex\": \"#0000FF\", \"secondary_color_hex\": \"#90C0FF\", \"is_active\": 0, \"image_url\": \"https://itsastronomical.com/assets/1956/jfk.png\", \"electoral_victory_message\": \"'\", \"electoral_loss_message\": \"'\", \"no_electoral_majority_message\": \"'\", \"description_as_running_mate\": \"

John Fitzgerald Kennedy is the junior Senator from Massachusetts. He was first elected In 1952, defeating incumbent Henry Cabot Lodge Jr. Before his time in the Senate, Kennedy served in the House. He has quickly become a rising star within the Democratic Party as his youth and charm were shown off when he gave your introduction speech not long ago at the 1956 Democratic national convention.

Kennedy is very popular within the Northeast and is a moderate-liberal ideologically. He does have his weak spots, though. His Catholicism is unpopular with many voters across the nation, especially within the Deep South, and his relative inexperience may be a gift with younger voters but a curse with older voters. The real question is, will the delegates be saying 'Viva Kennedy' or 'No Thanks'?

\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 212, \"fields\": {\"first_name\": \"Robert\", \"last_name\": \"Wagner\", \"election\": 20, \"party\": \"Democratic\", \"state\": \"New York\", \"priority\": 9, \"description\": \"'\", \"color_hex\": \"#0000FF\", \"secondary_color_hex\": \"#90C0FF\", \"is_active\": 0, \"image_url\": \"https://itsastronomical.com/assets/1956/wagner.png\", \"electoral_victory_message\": \"'\", \"electoral_loss_message\": \"'\", \"no_electoral_majority_message\": \"'\", \"description_as_running_mate\": \"

Robert Wagner Jr is the incumbent mayor of New York City, having first been elected two years ago. Wagner has served in many positions across the state of New York and has connections to the powerful political machine, Tammany Hall - albeit reluctantly. So far as Mayor, Wagner has governed as very liberal and has been a strong supporter of Desegregation and Unions.

Wagner would definitely help you in New York and in other parts of the Northeast but his very aggressively liberal views on segregation would likely cause most Southerners to bolt to Andrews. His Catholicism would also be a blessing in some parts of the Northeast but a curse with many other voters across the nation.

\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 213, \"fields\": {\"first_name\": \"Clinton\", \"last_name\": \"Anderson\", \"election\": 20, \"party\": \"Democratic\", \"state\": \"New Mexico\", \"priority\": 9, \"description\": \"'\", \"color_hex\": \"#0000FF\", \"secondary_color_hex\": \"#90C0FF\", \"is_active\": 0, \"image_url\": \"https://itsastronomical.com/assets/1956/Anderson.png\", \"electoral_victory_message\": \"'\", \"electoral_loss_message\": \"'\", \"no_electoral_majority_message\": \"'\", \"description_as_running_mate\": \"

Clinton Anderson is the incumbent junior Senator from New Mexico. Previously serving as the sole representative for New Mexico in the House and Later as Secretary of Agriculture in the Truman Administration. He was first elected to the Senate in 1948. Anderson’s record so far has been moderate with him focusing on the issues of the US Space program, Agriculture and Conservation. He also supports H-Bomb testing, something both you and Senator Kefauver opposed in the primary.

Anderson would assist your campaign in restoring support in the Southwest and West coast regions which trended greatly for Eisenhower in the 52 election. However, he’d be little help in the rest of the country and his position on H-Bombing testing could definitely hurt you among liberals.

\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 214, \"fields\": {\"first_name\": \"John\", \"last_name\": \"Sparkman\", \"election\": 20, \"party\": \"Democratic\", \"state\": \"Alabama\", \"priority\": 9, \"description\": \"'\", \"color_hex\": \"#0000FF\", \"secondary_color_hex\": \"#90C0FF\", \"is_active\": 0, \"image_url\": \"https://itsastronomical.com/assets/1956/sparkman.png\", \"electoral_victory_message\": \"'\", \"electoral_loss_message\": \"'\", \"no_electoral_majority_message\": \"'\", \"description_as_running_mate\": \"

John Sparkman is an incumbent Senator from Alabama - though you know him better as your running mate from the 52 election. Before his time in the Senate, Sparkman served as a representative from Alabama’s 8th congressional district before becoming House Majority Whip in 1946. Despite your disagreements on some social issues like Segregation, Sparkman is economically a liberal like yourself and you share a warm friendship with him from the 52 campaign.

Sparkman would help once again lock down or possibly even help flip a few Southern States to your side though he’ll just about kill your chances in any notable Northern, liberal States.

\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 214, \"fields\": {\"first_name\": \"T. Harold\", \"last_name\": \"Werdel\", \"election\": 20, \"party\": \"Independent\", \"state\": \"California\", \"priority\": 14, \"description\": \"'\", \"color_hex\": \"#FFFF00\", \"secondary_color_hex\": \"#FFFFC0\", \"is_active\": 0, \"image_url\": \"'\", \"electoral_victory_message\": \"'\", \"electoral_loss_message\": \"'\", \"no_electoral_majority_message\": \"'\", \"description_as_running_mate\": \"'\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 215, \"fields\": {\"first_name\": \"George O.\", \"last_name\": \"Cozzini\", \"election\": 20, \"party\": \"Socialist Labor\", \"state\": \"Wisconsin\", \"priority\": 15, \"description\": \"'\", \"color_hex\": \"#00C100\", \"secondary_color_hex\": \"#A1FFA1\", \"is_active\": 0, \"image_url\": \"'\", \"electoral_victory_message\": \"'\", \"electoral_loss_message\": \"'\", \"no_electoral_majority_message\": \"'\", \"description_as_running_mate\": \"'\", \"candidate_score\": 0.0}}]"); campaignTrail_temp.running_mate_json = JSON.parse("[{\"model\": \"campaign_trail.running_mate\", \"pk\": 47, \"fields\": {\"candidate\": 70, \"running_mate\": 76}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 56, \"fields\": {\"candidate\": 79, \"running_mate\": 89}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 76, \"fields\": {\"candidate\": 116, \"running_mate\": 120}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 106, \"fields\": {\"candidate\": 155, \"running_mate\": 164}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 105, \"fields\": {\"candidate\": 154, \"running_mate\": 163}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 81, \"fields\": {\"candidate\": 118, \"running_mate\": 125}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 66, \"fields\": {\"candidate\": 93, \"running_mate\": 103}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 82, \"fields\": {\"candidate\": 119, \"running_mate\": 126}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 97, \"fields\": {\"candidate\": 145, \"running_mate\": 151}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 96, \"fields\": {\"candidate\": 144, \"running_mate\": 150}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 46, \"fields\": {\"candidate\": 69, \"running_mate\": 73}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 67, \"fields\": {\"candidate\": 94, \"running_mate\": 104}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 207, \"fields\": {\"candidate\": 302, \"running_mate\": 311}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 205, \"fields\": {\"candidate\": 301, \"running_mate\": 309}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 200, \"fields\": {\"candidate\": 300, \"running_mate\": 304}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 7, \"fields\": {\"candidate\": 18, \"running_mate\": 38}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 8, \"fields\": {\"candidate\": 19, \"running_mate\": 39}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 74, \"fields\": {\"candidate\": 107, \"running_mate\": 114}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 161, \"fields\": {\"candidate\": 203, \"running_mate\": 215}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 160, \"fields\": {\"candidate\": 202, \"running_mate\": 214}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 208, \"fields\": {\"candidate\": 303, \"running_mate\": 312}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 116, \"fields\": {\"candidate\": 168, \"running_mate\": 178}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 57, \"fields\": {\"candidate\": 80, \"running_mate\": 90}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 115, \"fields\": {\"candidate\": 167, \"running_mate\": 177}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 1, \"fields\": {\"candidate\": 16, \"running_mate\": 30}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 87, \"fields\": {\"candidate\": 131, \"running_mate\": 135}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 94, \"fields\": {\"candidate\": 143, \"running_mate\": 148}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 89, \"fields\": {\"candidate\": 132, \"running_mate\": 137}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 155, \"fields\": {\"candidate\": 201, \"running_mate\": 209}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 3, \"fields\": {\"candidate\": 17, \"running_mate\": 31}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 92, \"fields\": {\"candidate\": 142, \"running_mate\": 146}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 48, \"fields\": {\"candidate\": 77, \"running_mate\": 81}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 22, \"fields\": {\"candidate\": 20, \"running_mate\": 45}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 41, \"fields\": {\"candidate\": 25, \"running_mate\": 62}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 68, \"fields\": {\"candidate\": 105, \"running_mate\": 108}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 26, \"fields\": {\"candidate\": 21, \"running_mate\": 49}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 77, \"fields\": {\"candidate\": 117, \"running_mate\": 121}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 33, \"fields\": {\"candidate\": 23, \"running_mate\": 55}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 150, \"fields\": {\"candidate\": 200, \"running_mate\": 204}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 37, \"fields\": {\"candidate\": 24, \"running_mate\": 58}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 52, \"fields\": {\"candidate\": 78, \"running_mate\": 85}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 45, \"fields\": {\"candidate\": 68, \"running_mate\": 72}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 44, \"fields\": {\"candidate\": 67, \"running_mate\": 71}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 18, \"fields\": {\"candidate\": 36, \"running_mate\": 18}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 101, \"fields\": {\"candidate\": 153, \"running_mate\": 159}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 62, \"fields\": {\"candidate\": 92, \"running_mate\": 99}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 71, \"fields\": {\"candidate\": 106, \"running_mate\": 111}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 98, \"fields\": {\"candidate\": 152, \"running_mate\": 156}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 13, \"fields\": {\"candidate\": 29, \"running_mate\": 27}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 12, \"fields\": {\"candidate\": 27, \"running_mate\": 29}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 58, \"fields\": {\"candidate\": 91, \"running_mate\": 95}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 99, \"fields\": {\"candidate\": 152, \"running_mate\": 157}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 63, \"fields\": {\"candidate\": 92, \"running_mate\": 100}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 83, \"fields\": {\"candidate\": 67, \"running_mate\": 127}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 107, \"fields\": {\"candidate\": 165, \"running_mate\": 169}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 111, \"fields\": {\"candidate\": 166, \"running_mate\": 173}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 85, \"fields\": {\"candidate\": 68, \"running_mate\": 129}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 59, \"fields\": {\"candidate\": 91, \"running_mate\": 96}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 15, \"fields\": {\"candidate\": 29, \"running_mate\": 40}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 60, \"fields\": {\"candidate\": 91, \"running_mate\": 97}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 108, \"fields\": {\"candidate\": 165, \"running_mate\": 170}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 109, \"fields\": {\"candidate\": 165, \"running_mate\": 171}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 112, \"fields\": {\"candidate\": 166, \"running_mate\": 174}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 113, \"fields\": {\"candidate\": 166, \"running_mate\": 175}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 73, \"fields\": {\"candidate\": 106, \"running_mate\": 113}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 10, \"fields\": {\"candidate\": 27, \"running_mate\": 40}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 53, \"fields\": {\"candidate\": 78, \"running_mate\": 86}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 110, \"fields\": {\"candidate\": 165, \"running_mate\": 172}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 102, \"fields\": {\"candidate\": 153, \"running_mate\": 160}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 34, \"fields\": {\"candidate\": 23, \"running_mate\": 44}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 9, \"fields\": {\"candidate\": 27, \"running_mate\": 33}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 69, \"fields\": {\"candidate\": 105, \"running_mate\": 109}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 19, \"fields\": {\"candidate\": 36, \"running_mate\": 41}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 20, \"fields\": {\"candidate\": 36, \"running_mate\": 42}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 151, \"fields\": {\"candidate\": 200, \"running_mate\": 205}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 16, \"fields\": {\"candidate\": 29, \"running_mate\": 33}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 49, \"fields\": {\"candidate\": 77, \"running_mate\": 82}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 103, \"fields\": {\"candidate\": 153, \"running_mate\": 161}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 93, \"fields\": {\"candidate\": 142, \"running_mate\": 147}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 72, \"fields\": {\"candidate\": 106, \"running_mate\": 112}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 55, \"fields\": {\"candidate\": 78, \"running_mate\": 88}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 54, \"fields\": {\"candidate\": 78, \"running_mate\": 87}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 84, \"fields\": {\"candidate\": 67, \"running_mate\": 128}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 61, \"fields\": {\"candidate\": 91, \"running_mate\": 98}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 78, \"fields\": {\"candidate\": 117, \"running_mate\": 122}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 43, \"fields\": {\"candidate\": 25, \"running_mate\": 64}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 42, \"fields\": {\"candidate\": 25, \"running_mate\": 63}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 40, \"fields\": {\"candidate\": 24, \"running_mate\": 61}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 39, \"fields\": {\"candidate\": 24, \"running_mate\": 60}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 86, \"fields\": {\"candidate\": 68, \"running_mate\": 130}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 38, \"fields\": {\"candidate\": 24, \"running_mate\": 59}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 95, \"fields\": {\"candidate\": 143, \"running_mate\": 149}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 30, \"fields\": {\"candidate\": 21, \"running_mate\": 51}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 28, \"fields\": {\"candidate\": 21, \"running_mate\": 50}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 100, \"fields\": {\"candidate\": 152, \"running_mate\": 158}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 24, \"fields\": {\"candidate\": 20, \"running_mate\": 47}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 17, \"fields\": {\"candidate\": 29, \"running_mate\": 31}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 11, \"fields\": {\"candidate\": 27, \"running_mate\": 31}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 79, \"fields\": {\"candidate\": 117, \"running_mate\": 123}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 80, \"fields\": {\"candidate\": 117, \"running_mate\": 124}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 90, \"fields\": {\"candidate\": 132, \"running_mate\": 138}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 4, \"fields\": {\"candidate\": 17, \"running_mate\": 32}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 2, \"fields\": {\"candidate\": 16, \"running_mate\": 34}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 25, \"fields\": {\"candidate\": 20, \"running_mate\": 48}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 104, \"fields\": {\"candidate\": 153, \"running_mate\": 162}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 23, \"fields\": {\"candidate\": 20, \"running_mate\": 46}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 36, \"fields\": {\"candidate\": 23, \"running_mate\": 57}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 88, \"fields\": {\"candidate\": 131, \"running_mate\": 136}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 70, \"fields\": {\"candidate\": 105, \"running_mate\": 110}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 64, \"fields\": {\"candidate\": 92, \"running_mate\": 101}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 6, \"fields\": {\"candidate\": 17, \"running_mate\": 37}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 5, \"fields\": {\"candidate\": 17, \"running_mate\": 33}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 35, \"fields\": {\"candidate\": 23, \"running_mate\": 56}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 91, \"fields\": {\"candidate\": 132, \"running_mate\": 139}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 21, \"fields\": {\"candidate\": 36, \"running_mate\": 43}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 50, \"fields\": {\"candidate\": 77, \"running_mate\": 83}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 32, \"fields\": {\"candidate\": 21, \"running_mate\": 53}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 31, \"fields\": {\"candidate\": 21, \"running_mate\": 52}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 75, \"fields\": {\"candidate\": 106, \"running_mate\": 115}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 65, \"fields\": {\"candidate\": 92, \"running_mate\": 102}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 51, \"fields\": {\"candidate\": 77, \"running_mate\": 84}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 201, \"fields\": {\"candidate\": 300, \"running_mate\": 305}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 210, \"fields\": {\"candidate\": 300, \"running_mate\": 314}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 209, \"fields\": {\"candidate\": 300, \"running_mate\": 313}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 202, \"fields\": {\"candidate\": 300, \"running_mate\": 306}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 203, \"fields\": {\"candidate\": 300, \"running_mate\": 307}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 204, \"fields\": {\"candidate\": 300, \"running_mate\": 308}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 206, \"fields\": {\"candidate\": 301, \"running_mate\": 310}}]"); campaignTrail_temp.opponents_default_json = JSON.parse("[{\"election\": 20, \"candidates\": [201, 202, 203, 200]}]"); campaignTrail_temp.opponents_weighted_json = JSON.parse("[{\"election\": 20, \"candidates\": [201, 200, 202, 203]}]"); campaignTrail_temp.global_parameter_json = JSON.parse("[{\"model\": \"campaign_trail.global_parameter\", \"pk\": 1, \"fields\": {\"vote_variable\": 1.125, \"max_swing\": 0.12, \"start_point\": 0.94, \"candidate_issue_weight\": 10.0, \"running_mate_issue_weight\": 3.0, \"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.00, \"state_variance\": 0.00, \"question_count\": 30, \"default_map_color_hex\": \"#C9C9C9\", \"no_state_map_color_hex\": \"#999999\"}}]"); campaignTrail_temp.candidate_dropout_json = JSON.parse("[{\"model\": \"campaign_trail.candidate_dropout\", \"pk\": 1, \"fields\": {\"candidate\": 36, \"affected_candidate\": 18, \"probability\": 1.0}}]"); campaignTrail_temp.temp_election_list = [{"id": 20, "year": 1956, "is_premium": 0, "display_year": "1956"}]; campaignTrail_temp.show_premium = true; campaignTrail_temp.premier_ab_test_version = -1; var changeGameDisp = (hide) => { disp = ""; if (hide) { disp = "none"; } document.getElementsByClassName("inner_window_w_desc")[0].style.display = disp }; e.creditsPage = () => { credits_html = `

Stevenson side Creators

cupojo396

ItsAstronomical (Coder)

Gelid Lagopus#3470

jaques#8485

Gardfeld#5089

pannut🌈#6100

ARC#0062


Writers

cupojo396

Jake Dionysos

Gelid Lagopus#3470


Original Eisenhower Side Creators

u/KingJazB

u/ChooseanUniqueName


Banners

cupojo396


Playtesting

jakedionysos

catboxxd

gelid_lagopus

Tyler96TNCT

Greeleycrat


Coding Bits

Credit Page - 2000N

Soundtrack System - 2000N

Have Fun!

` 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 = "" document.getElementById("header").src = "https://i.imgur.com/OCUSsCT.jpg" nct_stuff.themes[nct_stuff.selectedTheme].coloring_title = "#D7C6AC" nct_stuff.themes[nct_stuff.selectedTheme].coloring_window = "#F3E4D1" document.getElementsByClassName("game_header")[0].style.backgroundColor = nct_stuff.themes[nct_stuff.selectedTheme].coloring_title $(".container")[0].style.backgroundColor = "#AB6D54" document.body.background = "https://i.imgur.com/kBscDzN.jpg" $("#game_window")[0].style.backgroundImage = "url(https://itsastronomical.com/assets/1956/bg.png)" HistHexcolour=["#C7100F","#0e1896","#FFA500","#00C100"]; HistName=["Dwight Eisenhower","Adlai Stevenson","Andrews/Unpleged Electors","Eric Hass/Others"]; HistEV=[457,73,1,0]; HistPV=["35,579,180","26,028,028","307,931","106840"]; HistPVP=["57.4%","41.2%","0.5%","0.2%"]; RecReading=true quotes = ["My definition of a free society is a society where it is safe to be unpopular. - Adlai Stevenson II", "A hypocrite is the kind of politician who would cut down a redwood tree, then mount the stump and make a speech for conservation. - Adlai Stevenson II", "Newspaper editors are men who separate the wheat from the chaff, and then print the chaff. - Adlai Stevenson II", "Presidential ambition is a disease which can only be cured by embalming fluid. - Estes Kefauver", "You don't lead by hitting people over the head - that's assault, not leadership. - Dwight Eisenhower", "The search for a scapegoat is the easiest of all hunting expeditions. - Dwight Eisenhower", "There is one thing about being President: nobody can tell you when to sit down. - Dwight Eisenhower", "The only way to win World War III is to prevent it. - Dwight Eisenhower", "Solutions are not the answer. - Tricky Dicky", "It's hard to lead a cavalry charge if you think you look funny on a horse. - Eggie"] customquote = quotes[Math.floor((Math.random() * quotes.length))] corrr=`\n

NEW CAMPAIGN TRAIL

`+customquote+`` bannerArr=0 bannerlist=["https://i.imgur.com/OCUSsCT.jpg", "https://i.imgur.com/b6HE1tR.jpg", "https://i.imgur.com/vvKVKFV.jpg","https://i.imgur.com/ttGhHnu.jpg", "https://i.imgur.com/W9rodmy.png", "https://i.imgur.com/qw4xG5H.png"] var changeBanner = () => { bannerArr+=1 document.getElementById("header").src=bannerlist[bannerArr % bannerlist.length] } document.getElementById("header").src=bannerlist[0] footer = $(".footer")[0] var button = document.createElement("button") // button.style = `font-weight: bold; height:19.49px; position: static; right: 770px; top: 0px;` button.innerHTML = "Change banner" footer.insertBefore(button, footer.firstChild); button.onclick = changeBanner; $("#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() { musicBox.children[2].src = soundtracks[e.selectedSoundtrack].tracklist[this.value].url musicBox.children[2].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: "1956", tracklist: [ { name: "The Still of the Night - The Five Satins", url: "https://itsastronomical.com/assets/1956/StillOfTheNight.mp3", }, { name: "Heartbreak Hotel - Elvis Presley", url: "https://itsastronomical.com/assets/1956/HeartbreakHotel.mp3", }, { name: "Why Do Fools fall in Love? - Frankie Lymon & The Teenagers ", url: "https://itsastronomical.com/assets/1956/WhyDoFools.mp3", }, { name: "Be-Bop-A-Lula - Gene Vincent", url: "https://itsastronomical.com/assets/1956/BeBopALula.mp3", }, { name: "Day O (Banana Boat Song) - Harry Belafonte", url: "https://itsastronomical.com/assets/1956/DayO.mp3", }, { name: "I Like Ike! - Dwight Eisenhower", url: "https://itsastronomical.com/assets/1956/ILikeIke.mp3", }, { name: "Adlai for President - Adlai Stevenson", url: "https://itsastronomical.com/assets/1956/AdlaiForPresident.mp3", }, { name: "Stevenson, Stevenson - Volunteers for Stevenson", url: "https://itsastronomical.com/assets/1956/Stevenson.mp3", }, ], }, } newMusicPlayer() campaignTrail_temp.modBoxTheme = { "header_color": "#ab6d54", "header_text_color": "#ffffff", "description_text_color": "#000000", "description_background_color": "#d7c6ac", "main_color": "#d7c6ac", "secondary_color": "#ab6d54", "ui_text_color": "#ffffff" } campaignTrail_temp.achievements = { "I Still Like Ike!" : { "image" : "https://itsastronomical.com/assets/1956/ach/ike.png", "description" : "As Eisenhower, win with over 470 electoral votes.", "cannotBeCheated" : true }, "Eggheads Unite!" : { "image" : "https://itsastronomical.com/assets/1956/ach/egg.png", "description" : "Pull off a win as Adlai Stevenson.", "cannotBeCheated" : true }, "Third Time's The Charm" : { "image" : "https://itsastronomical.com/assets/1956/ach/swap.png", "description" : "As Stevenson, change your VP twice.", "cannotBeCheated" : true } }