campaignTrail_temp.modBoxTheme = { "header_color": "#37466d", "header_text_color": "#030303", "description_text_color": "#000000", "description_background_color": "#347298", "main_color": "#2a7293", "secondary_color": "#37466d", "ui_text_color": "#FFFFFF" } campaignTrail_temp.election_json = JSON.parse("[{\"model\": \"campaign_trail.election\", \"pk\": 9, \"fields\": {\"year\": 2020, \"summary\": \"

Nearly 8 years ago former Governor Mitt Romney narrowly defeated President Barack Obama, and 4 years ago he handedly beat Hillary Clinton, now the 2020 election season kicks off with the candidates entering the ring.

\", \"image_url\": \"https://i.imgur.com/fC1DQ7R.png\", \"winning_electoral_vote_number\": 270, \"advisor_url\": \"https://i.imgur.com/pa9ji8A.png\", \"recommended_reading\": \"

The Florida Recount / 2000 Election

Jeffrey Toobin - Too Close to Call: The Thirty-Six-Day Battle to Decide the 2000 Election
Andrew E. Busch & James W. Ceaser - The Perfect Tie: The True Story of the 2000 Presidential Election
Larry Sabato - Overtime! The Election 2000 Thriller

Books by the Candidates

George W. Bush - A Charge to Keep: My Journey to the White House
Al Gore - Earth in the Balance
The Ralph Nader Reader

Links

Digital History - The Disputed Election of 2000
Bush v. Gore
The Path to Florida
Al Gore Concedes the 2000 Election\", \"has_visits\": 1, \"no_electoral_majority_image\": \"/static/images/2012-no-majority.jpg\"}}]"); campaignTrail_temp.candidate_json = JSON.parse("[{\"model\": \"campaign_trail.candidate\", \"pk\": 77, \"fields\": {\"first_name\": \"Jason\", \"last_name\": \"Kander\", \"election\": 9, \"party\": \"Democratic\", \"state\": \"Missouri\", \"priority\": 1, \"description\": \"

Politicians never say never to anything.

Jason Kander represents something the Democratic party has been sorely lacking since 2012, hope. He embodies the spirits of former Presidents Obama and Kennedy, he’s young, energetic, a freshman Senator, and a veteran of Afghanistan who’s overcome great mental struggle.

Kander represents Missouri in the US Senate having narrowly won his seat back in 2016, in a state that went to Romney by nearly 20 points. In congress he solidified himself as a fighter for labor unions, veterans, healthcare and downtrodden. He has managed to help stabilize the Democratic party after a devise primary particularly with Terry McAuliffe and Elizabeth Warren and is renowned for his charisma.

Thanks to NiV-20 and his outsider status he’ll be entering with an early lead but only time will tell if he can retain it.

\", \"color_hex\": \"#0026ff\", \"secondary_color_hex\": \"#9ecaff\", \"is_active\": 1, \"image_url\": \"https://i.imgur.com/NKVEVQr.png\", \"electoral_victory_message\": \"

Congratulations! You have won the 2000 election.

Confounding the predictions of many experts, you were able to turn the tables on Al Gore, in spite of the economy and Clinton's popularity.

On the political front, you can push for tax cuts to spur the economy and return the budget surplus to the American people. You might also pursue education and immigration reform, individual Social Security accounts, and new laws to defend the family and the sanctity of life.

\", \"electoral_loss_message\": \"

Sorry! You have lost the 2000 election.

Perhaps it was always a long-shot, with the Democrats in such a commanding position after eight years of Bill Clinton. In any case, at least you are still the Governor of Texas.

Expect Al Gore to unleash a new round of government programs and environmental regulations. You are still youngish, however. If the election was close this time, perhaps you can run again in 2004, or work on behalf your brother Jeb.

\", \"no_electoral_majority_message\": \"

Wow! You have won in a squeaker.

No candidate achieved a majority of the electoral votes, marking the first time this has happened since 1824. Fortunately for you, the majority of U.S. states have Republican controlled congressional delegations, and they will cast their votes accordingly.

Given the incredibly close nature of the election, you will surely be expected to govern as a moderate, conciliatory President. Right??

\", \"description_as_running_mate\": \"''\", \"candidate_score\": 1.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 78, \"fields\": {\"first_name\": \"Paul\", \"last_name\": \"Ryan\", \"election\": 9, \"party\": \"Republican\", \"state\": \"Wisconsin\", \"priority\": 2, \"description\": \"

NOT YET PLAYABLE

We don't want to turn the safety net into a hammock that lulls able-bodied people into complacency and dependence.

The incumbent Vice President, Paul Ryan is a former representative and congressional leader from Wisconsin. Growing up with a strong conservative background he spent over a decade in congress before becoming Mitt Romney's running mate in 2012.

With his second term in the White House with President Romney almost complete Ryan can hold up a strong conservative record however that didn’t stop a chaotic primary. Which saw him defeat Trump backed Steve King, libertarian Rand Paul and centrist Kerry Healy in a race that saw him get less than 50% of the vote.

While he is the Vice President he starts out as the underdog and many doubt his ability to regain the lead.

\", \"color_hex\": \"#ff0000\", \"secondary_color_hex\": \"#ff9e9e\", \"is_active\": 1, \"image_url\": \"https://i.imgur.com/DAk0kif.jpg\", \"electoral_victory_message\": \"

Congratulations! You have won the 2000 election.

Though it was perhaps expected, you could have easily faltered at a number of points. Credit to you for pulling through.

On the political front, you can continue the Clinton legacy and strengthen Social Security for generations to come. Perhaps you can succeed on health care where Clinton came up short? Or maybe you can create a future of renewable energy for America. Just be wary of a (George or Jeb?) Bush challenge in 2004.

\", \"electoral_loss_message\": \"

Sorry! You have lost the 2000 election.

Surely the second-guessing will be intense, but if things were close you could probably run again in 2004.

It seems that with George W. Bush and a Republican majority, the United States can expect some conservative policy-making over the next four years. Hopefully Bush comes through on his promise to govern in a bipartisan, conciliatory manner. A lot should depend on the margin of his victory, and whether it was large or small.

\", \"no_electoral_majority_message\": \"

Sorry! You have lost in a squeaker.

No candidate achieved a majority of the electoral votes, for the first time since 1824. Unfortunately for you, a majority of states have Republican controlled congressional delegations.

It seems that with George W. Bush and a Republican majority, the United States can expect some conservative policy-making over the next four years. Hopefully Bush comes through on his promise to govern in a bipartisan, conciliatory manner.

\", \"description_as_running_mate\": \"''\", \"candidate_score\": 1.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 79, \"fields\": {\"first_name\": \"Robert\", \"last_name\": \"Kennedy\", \"election\": 9, \"party\": \"Independent\", \"state\": \"New York\", \"priority\": 3, \"description\": \"

NOT YET PLAYABLE

I'm comfortable reading science and dissecting it and discerning the difference between junk science and real science.

Robert Francis Kennedy Jr. is the heir to an illustrious legacy, the nephew of a martyred President and the son of a father who inspired a generation; his name carries with it great power. However Robert now seeks to define a legacy of his own, abandoning his family's traditional Democratic party and elitist ways he now runs as an independent candidate for President.

With a long environmentalist track record, populist credentials, the support of left and right wingers Kennedy hopes to make a grandstand against the establishment, however for this to succeed he’ll need to handle his many controversial statements and stances.

If you can get above 10% you're bound to change the status quo for years to come, for better or worse.

\", \"color_hex\": \"#fff6c7\", \"secondary_color_hex\": \"#fffae0\", \"is_active\": 1, \"image_url\": \"https://i.imgur.com/W1sMlad.jpg\", \"electoral_victory_message\": \"

Congratulations! You have won the 2000 election.

This was definitely not supposed to happen. Good luck!

\", \"electoral_loss_message\": \"

As expected, you have lost the 2000 election.

The legacy of this campaign depends on a couple of factors. First of all, did you receive 5% of the popular vote? If so, congratulations! You will enable the Green Party to run a vigorous campaign in 2004 and present a true choice to the American people. Also, the Democrats were a little peeved that you \\\"stole\\\" votes from them in this election. Hopefully that doesn't lead to a backlash.

\", \"no_electoral_majority_message\": \"

Wow! No candidate received 270 electoral votes, but the House will elect George W. Bush as President.

Did you receive 5% of the popular vote? If so, congratulations! You will enable the Green Party to run a vigorous campaign in 2004 and present a true choice to the American people. Also, the Democrats were a little peeved that you \\\"stole\\\" votes from them in this election. Hopefully that doesn't lead to a backlash, especially since they will lose the vote in the House.

\", \"description_as_running_mate\": \"''\", \"candidate_score\": 1.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 80, \"fields\": {\"first_name\": \"Adam\", \"last_name\": \"Kokesh/Others\", \"election\": 9, \"party\": \"Libertarian\", \"state\": \"South Carolina\", \"priority\": 4, \"description\": \"''\", \"color_hex\": \"#f5eb3b\", \"secondary_color_hex\": \"#fff98c\", \"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\": 81, \"fields\": {\"first_name\": \"Catherine Cortez\", \"last_name\": \"Masto\", \"election\": 9, \"party\": \"Democratic\", \"state\": \"Nevada\", \"priority\": 5, \"description\": \"''\", \"color_hex\": \"#FF0000\", \"secondary_color_hex\": \"#FFA0A0\", \"is_active\": 0, \"image_url\": \"https://i.imgur.com/7CLgkPa.png\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

I loved thinking about how the law could be used to help others.

Catherine Cortez Masto is a Senator from the western state of Nevada entering the Senate in the same year as Kander; they have a good working relationship. Masto is known for her expertise in the legal field having previously served as Attorney General of Nevada which could help among middle class voters particularly those concerned with Republican rhetoric on Dems being weak on crime.

Being a Latina and Catholic she will help greatly with the voting blocs you're going to need if you want to pull off a victory, especially women upset at Hillarys loss a few years ago. including Nevada which is looking especially close.

\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 82, \"fields\": {\"first_name\": \"Deval\", \"last_name\": \"Patrick\", \"election\": 9, \"party\": \"Democratic\", \"state\": \"Massachusetts\", \"priority\": 6, \"description\": \"''\", \"color_hex\": \"#FF0000\", \"secondary_color_hex\": \"#FFA0A0\", \"is_active\": 0, \"image_url\": \"https://i.imgur.com/raZ99aP.png\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

I very much believe in values-based leadership and that the values that I believe in and try to govern by are transcendent values.

The former Governor of Massachusetts and one of your opponents in the primaries, Deval Patrick is a mainstream Democrat, and like you is reminiscent of former President Obama. Elected Governor in 2006 succeeding then Governor Mitt Romney Patrick served unremarkably however he does have a strong record on education which could play to your benefit.

Patrick all in all would be a solid pick, with his executive experience, broad appeal and support among African-Americans in particular he could pull you over the finish line in a number of states.

\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 83, \"fields\": {\"first_name\": \"Charlie\", \"last_name\": \"Crist\", \"election\": 9, \"party\": \"Democratic\", \"state\": \"Florida\", \"priority\": 7, \"description\": \"''\", \"color_hex\": \"#FF0000\", \"secondary_color_hex\": \"#FFA0A0\", \"is_active\": 0, \"image_url\": \"https://i.imgur.com/A5zriO0.png\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

I'm pro-life. I'm pro-gun. I'm pro-family. And I'm pro-business.

Charlie Crist would certainly be, well, a choice? The former Governor of Florida as well as a former Republican, Crist, then Governor, left the Republican party back in 2010 to run for the Senate as an independent. In 2012 he not only endorsed Barack Obama but spoke at the DNC, and in 2014 he was elected Governor again, this time as a Democrat.

Crist could potentially help with moderates and could even carry Florida but his image as an opportunist and his centrist record would be a turn off to many progressives.

\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 84, \"fields\": {\"first_name\": \"Kamala\", \"last_name\": \"Harris\", \"election\": 9, \"party\": \"Democratic\", \"state\": \"California\", \"priority\": 8, \"description\": \"''\", \"color_hex\": \"#FF0000\", \"secondary_color_hex\": \"#FFA0A0\", \"is_active\": 0, \"image_url\": \"https://i.imgur.com/3S57A6x.png\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

I was raised to be an independent woman, not the victim of anything.

The junior Senator from California like you Kamala Harris entered the Senate in 2017, and you two have a decent relationship? She’s previously served as California's Attorney General and be aware there may be some old scandals from her time in that role you’ll have to handle.

Harris does have good minority appeal and her status as a mixed African-Indian woman will provide a good boost among those groups. She is overall a moderate so do be warned progressives won’t be very happy with her.

\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 85, \"fields\": {\"first_name\": \"Kelly\", \"last_name\": \"Ayotte\", \"election\": 9, \"party\": \"Republican\", \"state\": \"New Hampshire\", \"priority\": 9, \"description\": \"''\", \"color_hex\": \"#0000FF\", \"secondary_color_hex\": \"#90C0FF\", \"is_active\": 0, \"image_url\": \"https://i.imgur.com/5icCoIO.png\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

I think that passion is the secret ingredient that drives hard work and excellence.

Kelly Ayotte is the sitting junior Senator from New Hampshire and a known figure in US politics thanks to her ability to narrowly hold on to her Senate seat in a state ever leaning blue. She’s known for her moderate beliefs and supported Kerry Healy in the primary which will help bring in his supporters however it will anger more populistic voters in the party who are already threatening to stay home.

Many in the party have placed great trust in her ability to win over women voters and Ryan himself is hoping to make New Hampshire competitive despite the doubters.

\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 86, \"fields\": {\"first_name\": \"Tim\", \"last_name\": \"Scott\", \"election\": 9, \"party\": \"Republican\", \"state\": \"South Carolina\", \"priority\": 10, \"description\": \"''\", \"color_hex\": \"#0000FF\", \"secondary_color_hex\": \"#90C0FF\", \"is_active\": 0, \"image_url\": \"https://i.imgur.com/28JYHNJ.png\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

We have to attack those things which stand in the way of America's progress.

Tim Scott is a Senator from South Carolina as well as the only black Republican in the Senate. Scott is known as a strong supporter of President Romney's agenda. Proving himself to be quite loyal to the President and party, on policy he is a strong conservative but one with moderate appeal.

Scott would overall be a sound uncontroversial choice, though his lack of marriage could be a weak spot among evangelical voters.

\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 87, \"fields\": {\"first_name\": \"Kris\", \"last_name\": \"Kobach\", \"election\": 9, \"party\": \"Republican\", \"state\": \"Missouri\", \"priority\": 11, \"description\": \"''\", \"color_hex\": \"#0000FF\", \"secondary_color_hex\": \"#90C0FF\", \"is_active\": 0, \"image_url\": \"https://i.imgur.com/LpJdWBB.png\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

And when a few noncitizens vote, those can swing a close election.

Kris Kobach is the current Governor of Kansas and a firm supporter of your party's right wing. Even going as far as backing Trump in 2016 and campaigning for Scalise during the primary against you. He’s known for his hardline views on immigration and voting rights which could be toxic to both minorities and moderates.

Kobach is also known for his many controversial statements, even questioning former President Obama’s citizenship. Overall Kobach could serve to unify the party but he would be an incredibly toxic choice for your average voter and I highly warn against him.

\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 88, \"fields\": {\"first_name\": \"Nikki\", \"last_name\": \"Haley\", \"election\": 9, \"party\": \"Republican\", \"state\": \"South Carolina\", \"priority\": 12, \"description\": \"''\", \"color_hex\": \"#0000FF\", \"secondary_color_hex\": \"#90C0FF\", \"is_active\": 0, \"image_url\": \"https://i.imgur.com/Trgs3eR.jpg\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

I wear heels, and it's not for a fashion statement - it's ammunition.

Nimrata or “Nikki” Haley is the current Secretary of State and former Governor of South Carolina. A woman of Indian descent she’s known for Governing as a moderate in South Carolina while acting as a staunch hawk as Secretary of State.

She would help drive up your support among Asians and women and would drive out your base, do be warned, the populist and more isolationist minded wing of the party view her with great disgust.

\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 89, \"fields\": {\"first_name\": \"Artur\", \"last_name\": \"Davis\", \"election\": 9, \"party\": \"Independent\", \"state\": \"Alabama\", \"priority\": 13, \"description\": \"''\", \"color_hex\": \"#00C100\", \"secondary_color_hex\": \"#A1FFA1\", \"is_active\": 0, \"image_url\": \"https://i.imgur.com/gjFzcc5.png\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

This time, instead of moving oceans and healing planets, let's get our bills in order and pay down the debt so we control our own future.

Artur Davis has had to say the least an interesting career? Originally a Blue Dog Representative from Alabama he made a name for himself as the only member of the Black Congressional Caucus to vote against Obamacare, and by endorsing Mitt Romney in 2012 over his now former partys nominee Barrack Obama. While fiercely independent and typically a moderate conservative Davis has shifted in much more of a populist direction in recent years.

He would be an overall good choice helping draw from both parties and raising your numbers with minorities while combating racism allegations, though his inconsistency and flip flopping could prove to be a huge liability.

\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 91, \"fields\": {\"first_name\": \"Doug\", \"last_name\": \"Mastriano\", \"election\": 9, \"party\": \"Republican\", \"state\": \"Pennsylvania\", \"priority\": 13, \"description\": \"''\", \"color_hex\": \"#00C100\", \"secondary_color_hex\": \"#A1FFA1\", \"is_active\": 0, \"image_url\": \"https://i.imgur.com/9yruSgV.png\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

We know scientifically when there’s conception, that’s one unique individual that never exists again in eternity.

One of the most controversial members of Congress Douglas Vincent Mastriano is a former US Army Colonel and a Representative from Pennsylvania. Narrowly winning his primary in the 2018 midterms Mastriano has made a name for himself in D.C. as a populist, ultra conservative, pro life advocate and supporter of the likes of Donald Trump and Steve King.

His selection would firmly cement you as a right wing populist and much of the Republican far right would join you at the expense of left wingers, do be warned, Mastriano, like you, holds many controversial views…

\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 92, \"fields\": {\"first_name\": \"Nina\", \"last_name\": \"Turner\", \"election\": 9, \"party\": \"Green\", \"state\": \"Ohio\", \"priority\": 13, \"description\": \"''\", \"color_hex\": \"#00C100\", \"secondary_color_hex\": \"#A1FFA1\", \"is_active\": 0, \"image_url\": \"https://i.imgur.com/tdNqv4L.png\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

The same way we can bail out Wall Street, we have to put a downpayment on Wall Street.

Nina Turner is a prominent activist and member of the Green party, originally a Democrat and State Senator from Cleveland she worked on the Warren campaign and refused to endorse Hillary following her primary defeat in 2016. She ran for Governor in 2018 narrowly losing the primary to Tim Ryan and finally leaving the party, with many speculating she would run for the House in 2020 .

Getting her on the ticket could mean an endorsement from the Green party who happen to have nationwide ballot access, and greater appeal among women and African Americans however this will come at the cost of your right wing support base.

\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 93, \"fields\": {\"first_name\": \"Paul\", \"last_name\": \"Vallas\", \"election\": 9, \"party\": \"Democratic\", \"state\": \"Illinois\", \"priority\": 13, \"description\": \"''\", \"color_hex\": \"#00C100\", \"secondary_color_hex\": \"#A1FFA1\", \"is_active\": 0, \"image_url\": \"https://i.imgur.com/UjJ12in.png\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

She has not been aggressive at keeping dangerous criminals off the street, and the data clearly states it.

Paul Vallas would be an interesting choice for Vice President? He’s a rather moderate Democrat, the former Lieutenant Governor of Illinois and the almost Mayor of Chicago? He also has a long career in public education where he pushed for charter schools and privatization which could play to your benefit.

Like Davis he would be useful for keeping your coalition united, though his views are uninspiring for much of your base, his status as an enemy of the Madigan machine would help cement you as an anti establishment voice.

\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 90, \"fields\": {\"first_name\": \"Spike\", \"last_name\": \"Cohen\", \"election\": 9, \"party\": \"Libertarian\", \"state\": \"South Carolina\", \"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}}]"); 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\": 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\": 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\": 99, \"fields\": {\"candidate\": 152, \"running_mate\": 157}}, {\"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\": 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\": 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\": 152, \"fields\": {\"candidate\": 200, \"running_mate\": 206}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 153, \"fields\": {\"candidate\": 200, \"running_mate\": 207}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 154, \"fields\": {\"candidate\": 200, \"running_mate\": 208}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 157, \"fields\": {\"candidate\": 201, \"running_mate\": 211}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 159, \"fields\": {\"candidate\": 201, \"running_mate\": 213}}, {\"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\": 158, \"fields\": {\"candidate\": 201, \"running_mate\": 212}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 156, \"fields\": {\"candidate\": 201, \"running_mate\": 210}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 75, \"fields\": {\"candidate\": 106, \"running_mate\": 115}}, {\"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\": 79, \"running_mate\": 91}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 209, \"fields\": {\"candidate\": 300, \"running_mate\": 313}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 202, \"fields\": {\"candidate\": 79, \"running_mate\": 92}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 203, \"fields\": {\"candidate\": 300, \"running_mate\": 307}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 204, \"fields\": {\"candidate\": 79, \"running_mate\": 93}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 206, \"fields\": {\"candidate\": 301, \"running_mate\": 310}}]"); campaignTrail_temp.opponents_default_json = JSON.parse("[{\"election\": 9, \"candidates\": [77, 78, 79, 80]}]"); campaignTrail_temp.opponents_weighted_json = JSON.parse("[{\"election\": 9, \"candidates\": [78, 77, 79, 80]}]"); campaignTrail_temp.difficulty_level_json = JSON.parse("[{\"model\": \"campaign_trail.difficulty_level\", \"pk\": 1, \"fields\": {\"name\": \"Easy\", \"multiplier\": 1.1}}, {\"model\": \"campaign_trail.difficulty_level\", \"pk\": 3, \"fields\": {\"name\": \"Normal\", \"multiplier\": 0.97}}, {\"model\": \"campaign_trail.difficulty_level\", \"pk\": 4, \"fields\": {\"name\": \"Hard\", \"multiplier\": 0.95}}, {\"model\": \"campaign_trail.difficulty_level\", \"pk\": 5, \"fields\": {\"name\": \"Impossible\", \"multiplier\": 0.9}}]"); 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.0, \"state_variance\": 0.0, \"question_count\": 32, \"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": 9, "year": 2020, "is_premium": 0, "display_year": "2020Realign"}]; campaignTrail_temp.show_premium = true; campaignTrail_temp.premier_ab_test_version = -1; campaignTrail_temp.credits = "infernalsquad (Story), kaiserinellen, (Writing) & catboxxd (Coding).
2000N for music player"; document.getElementById("header").src = "https://i.imgur.com/rRTfi17.jpg"; document.body.background = "https://i.imgur.com/D7qcUI5.png" document.body.style.backgroundSize="cover" 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 = "#003673"; $("#game_window")[0].style.borderColor = "#003673" $(".container")[0].style.backgroundColor = "#586ba3" $("#game_window")[0].style.backgroundColor = "#001555" nct_stuff.themes[nct_stuff.selectedTheme].coloring_title = "#004da3" nct_stuff.themes[nct_stuff.selectedTheme].coloring_window = "#ffffff" nct_stuff.themes[nct_stuff.selectedTheme].text_col = "white" HistHexcolour=["#0026ff","#ff0000","#fff6c7","#f5eb3b"]; HistName=[" Jason Kander"," Paul Ryan"," Robert Kennedy"," Adam Kokesh/Others"]; HistEV=[311,222,3,2]; HistPV=["69,791,778","64,290,875","7,274,492","3,147,760"]; HistPVP=["48.3%","44.5%","5.0%","2.1%"]; musicMode = () => { // 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: "Kander", tracklist: [ { name: "American Pie - Don McLean", url: "https://files.catbox.moe/do1q79.mp3", }, { name: "Fight Song - Rachel Platten", url: "https://files.catbox.moe/qxxtmu.mp3", }, { name: "Fortunate Son - Creedence Clearwater Revival", url: "https://files.catbox.moe/vet4x8.mp3", }, { name: "Believer - Imagine Dragons", url: "https://files.catbox.moe/23mvp5.mp3", }, { name: "Born in the USA - Bruce Springsteen", url: "https://files.catbox.moe/llr0fs.mp3", }, { name: "We Didn't Start The Fire - Billy Joel", url: "https://files.catbox.moe/raipd2.mp3", }, ], }, 1: { name: "Ryan", tracklist: [ { name: "Hip To Be Square - Huey Lewis & The News", url: "https://files.catbox.moe/w1db7c.mp3", }, { name: "God Bless The USA - Len Greenwood", url: "https://files.catbox.moe/j4wftj.mp3", }, { name: "Freedom - Rage Against The Machine", url: "https://files.catbox.moe/m638be.mp3", }, { name: "Mitt Romney Style - College Humor", url: "https://files.catbox.moe/d1kq9q.mp3", }, { name: "Ragged Old Flag - Johnny Cash", url: "https://files.catbox.moe/kvcozq.mp3", }, { name: "Courtesy Of The Red White And Blue - Toby Keith", url: "https://files.catbox.moe/5co2hn.mp3", }, ], }, 2: { name: "Kennedy", tracklist: [ { name: "Kennedy For Me - Campaign Song", url: "https://files.catbox.moe/aqt8fy.mp3", }, { name: "Rich Men North Of Richmond - Oliver Anthony", url: "https://files.catbox.moe/8qvhi5.mp3", }, { name: "Sympathy for the Devil - The Rolling Stones", url: "https://files.catbox.moe/adn3zl.mp3", }, { name: "Chicago - Graham Nash", url: "https://files.catbox.moe/0hdieh.mp3", }, { name: "I Shot the Sheriff - Eric Clapton", url: "https://files.catbox.moe/dqx4py.mp3", }, { name: "American Badass - Kid Rock", url: "https://files.catbox.moe/vxragj.mp3", }, ], }, } newMusicPlayer() } $("#game_start").click((event) => { event.preventDefault(); $("#election_id_button").click((event) => { musicMode() setInterval(changeFontColour, 200) }) })