campaignTrail_temp.election_json = [ { "model": "campaign_trail.election", "pk": 3, "fields": { "year": 2026, "summary": "

The second year of Donald Trump’s second term has been nothing short of chaotic. Due to all of the ICE raids, the poor economy, the Epstein files, and the unpopular Iran war, Trump’s popularity has tanked nationwide, and it has also tanked in a state where MAGA holds strong, that being Texas.

\n", "image_url": "https://i.imgur.com/H9g2dig.png", "winning_electoral_vote_number": 270, "advisor_url": "https://i.postimg.cc/4NWZJ3Rb/HLy41l-Jbk-AACCQp.png", "recommended_reading": "

A Message From Ryker

Thanks everyone for playing! This is my first state mod, and I wanted to do something for the 2026 midterms. I considered doing Michigan (which I might do in the future) or Georgia, but I decided to go with Texas, simply because it was becoming more and more competitive in the polls than we all expected, especially with Talarico as the Democratic nominee. Ironically, it wasn’t close at all! I also wanted to do this because of how chaotic the race was, given Paxton’s corruption scandals, Talarico being a generational candidate, etc.

Anyways, thank you all for playing, and see you next year with Biden ‘12!


-Ryker


Special thanks to these Talafreakos

Barbecue Saucer (u/Evening_Wave_4174)

platypus

byur3n (u/PingPongProductions)

jacob (u/No-Creme1061)

seems

Culture Vulture

", "has_visits": 0, "no_electoral_majority_image": "https://www.jetsimon.com/public/static/images/2012-no-majority.jpg", "creator": "Dan Bryan", "display_year": "2026 TX Senate: Deep in the Heart" } } ] campaignTrail_temp.candidate_json = [ { "model": "campaign_trail.candidate", "pk": 16, "fields": { "first_name": "James", "last_name": "Talarico", "election": 3, "party": "Democrat", "state": "Travis", "priority": 1, "description": "

Over a decade ago, James Talarico was a middle school teacher at Rhodes Middle School in West San Antonio. In 2018, at only 29 years old, he was elected to the Texas State House, where he, among other things, passed reforms to the state's school finance system and combated high insulin drug prices. After appearing on The Joe Rogan Experience in 2025, he began to attract media attention and announced his candidacy for the U.S. Senate a few months later. After an interview that was prevented from being broadcast on The Late Show with Stephen Colbert amassed over five million views on YouTube in its first 24 hours, it boosted his name recognition, and he went on to win his primary against Congresswoman Jasmine Crockett.

Texas has not elected a Democrat to the U.S. Senate since 1988. However, with Trump’s unpopularity and a blue wave seeming inevitable, it’s entirely possible for Talarico to be the Democrat who pulls the sword out of the stone.

", "color_hex": "#3775CF", "secondary_color_hex": "#e5edf9", "is_active": 1, "image_url": "https://i.postimg.cc/3JgRDKFb/jamestalarico-v2.jpg", "electoral_victory_message": "

Congratulations! You have won the 2012 election.

In spite of a hard-fought challenge from Mitt Romney, you have held on to the Presidency.

On the political front, it appears that your health care legislation that was passed in early 2010 will survive and go into effect. While the economy has not yet recovered as strongly as you hoped and promised, you will now have four more years to leave a strong legacy to your Democratic successor.

", "electoral_loss_message": "

Sorry! You have lost the 2012 election.

In spite of your spirited defense, Mitt Romney has won the Presidency. Nearly two centuries after the ill-fated campaign of Joseph Smith, Romney will become America's first Mormon president.

On the political front, it appears that Romney will make a push for more tax cuts to revive the economy. He will also try to repeal your health care law. If your defeat was narrow enough, you may be able to attempt a comeback in 2016.

", "no_electoral_majority_message": "

Sorry! You have lost in a squeaker.

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

Given the incredibly close nature of the election, you can probably set your sights on a political comeback in 2016, if that is what you desire.

", "description_as_running_mate": null, "candidate_score": 1, "running_mate": false } }, { "model": "campaign_trail.candidate", "pk": 17, "fields": { "first_name": "Ken", "last_name": "Paxton", "election": 3, "party": "Republican", "state": "Collin", "priority": 2, "description": "

COMING SOON

After serving in both the Texas State House and State Senate, Ken Paxton was elected Attorney General of Texas in 2014. He became a staunch ally of President Donald Trump and backed him up in his attempts to overturn Joe Biden’s victory in the 2020 presidential election. In 2023, the GOP-controlled State House impeached Paxton on accounts of, among other things, taking bribes, obstruction of justice, and adultery. He was suspended from his position, but later acquitted by the State Senate.

Paxton, now challenging incumbent Senator John Cornyn in the Republican primary for the US Senate, was forced into a runoff with Cornyn after neither cleared the 50% needed to get the nomination. Donald Trump’s endorsement is crucial here, and could be a godsend in a state where MAGA is loyal to the president.", "color_hex": "#C9261A", "secondary_color_hex": "#fce8e6", "is_active": 1, "image_url": "https://i.postimg.cc/jdjNHnCv/kenpaxton.jpg", "electoral_victory_message": "

Congratulations! You have won the 2012 election.

In spite of a hard-fought campaign from Barack Obama, you have won the Presidency. Nearly two centuries after the ill-fated campaign of Joseph Smith, you will become America's first Mormon president. Your next steps are to select a cabinet and prepare a rousing inauguration speech. On the political front, you may have the support needed to overturn Obamacare. Or you could focus on tax cuts, or other policies entirely.

", "electoral_loss_message": "

Sorry! You have lost the 2012 election.

In spite of your best efforts, Barack Obama has been reelected to a second term as President.

On the political front, it appears that Obamacare will survive and go into effect. While the economy has not recovered as strongly as Obama hoped and promised, he will now have four more years to leave a strong legacy to his Democratic successor. No doubt the Republicans will learn from your failure and come back stronger in 2016.

", "no_electoral_majority_message": "

Wow! You have won a true nail-biter.

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 for you accordingly.

The important thing is that you won. Go about implementing your agenda accordingly, and pay no attention to Democrats and pundits who call for 'compromise' and 'conciliation'.

", "description_as_running_mate": null, "candidate_score": 0.8, "running_mate": false } }, { "model": "campaign_trail.candidate", "pk": 18, "fields": { "first_name": "Ted", "last_name": "Brown/Others", "election": 3, "party": "Libertarian", "state": "New Mexico", "priority": 3, "description": "

While his Libertarian views make him non-competitive in 2012, Gary Johnson hopes to use the election as a springboard for his party and ideology. The success of Ron Paul in the Republican primaries suggests a potential market for Johnson's views, but he realistically will be fortunate to win more than 2% of the popular vote.

", "color_hex": "#E4B82A", "secondary_color_hex": "#fcf8e9", "is_active": 0, "image_url": "https://www.jetsimon.com/public/static/images/gary-johnson-2012.jpg", "electoral_victory_message": "

It's a miracle! You have won the 2012 election.

Gary Johnson? Even the people who voted for you can't believe you won.

You are the first third-party candidate to ever win the Presidency. Now go enact that Libertarian agenda!

", "electoral_loss_message": "

Sorry! You have lost the 2012 election.

But what did you expect? Your main goal was to get the Libertarian agenda out there and hope for a miracle. The miracle never came.

", "no_electoral_majority_message": "

Sorry! You have lost the 2012 election.

No candidate achieved a majority of the electoral votes, marking the first time this has happened since 1824. However, this was entirely irrelevant to your chances as a third-party candidate.

Better luck next time.

", "description_as_running_mate": "

After his own failed run for the Republican nomination, Gary Johnson has the inside track on the Libertarian nomination. He also has proven experience as New Mexico's Governor.

By selecting Johnson, Ron Paul could avoid the splintering of his support to the Libertarian Party. He could also make an appeal to the socially liberal segment of the small government movement, insofar as Johnson is known to be pro-choice and independent of the religious right.

", "candidate_score": 1, "running_mate": true } }, { "model": "campaign_trail.candidate", "pk": 30, "fields": { "first_name": "Joe", "last_name": "Biden", "election": 3, "party": "Democrat", "state": "Delaware", "priority": 7, "description": "

V.P.

", "color_hex": "#1e6fa3", "secondary_color_hex": "#8eb7d1", "is_active": 0, "image_url": "https://www.jetsimon.com/public/static/images/joe-biden-2012.jpg", "electoral_victory_message": "n/a", "electoral_loss_message": "n/a", "no_electoral_majority_message": "n/a", "description_as_running_mate": "

Joe Biden is the current Vice President and Obama's presumptive pick for 2012. He served as a Senator from Delaware for many years.

Well connected to the mainstream Democratic establishment, there are few complaints about Biden's performance thus far, though he does have a reputation as being gaffe-prone.

", "candidate_score": 0, "running_mate": true } }, { "model": "campaign_trail.candidate", "pk": 32, "fields": { "first_name": "Libertarian Party of", "last_name": "Texas", "election": 3, "party": "Democrat", "state": "Delaware", "priority": 7, "description": "

V.P.

", "color_hex": "#D2C943", "secondary_color_hex": "#e8e4a1", "is_active": 0, "image_url": "https://www.jetsimon.com/public/static/images/joe-biden-2012.jpg", "electoral_victory_message": "n/a", "electoral_loss_message": "n/a", "no_electoral_majority_message": "n/a", "description_as_running_mate": "

Joe Biden is the current Vice President and Obama's presumptive pick for 2012. He served as a Senator from Delaware for many years.

Well connected to the mainstream Democratic establishment, there are few complaints about Biden's performance thus far, though he does have a reputation as being gaffe-prone.

", "candidate_score": 0, "running_mate": true } }, { "model": "campaign_trail.candidate", "pk": 31, "fields": { "first_name": "Paul", "last_name": "Ryan", "election": 3, "party": "Republican", "state": "Wisconsin", "priority": 8, "description": "

V.P.

", "color_hex": "#c83b3e", "secondary_color_hex": "#cd8c87", "is_active": 0, "image_url": "https://www.jetsimon.com/public/static/images/paul-ryan-2012.jpg", "electoral_victory_message": "n/a", "electoral_loss_message": "n/a", "no_electoral_majority_message": "n/a", "description_as_running_mate": "

Paul Ryan has gained national attention with his work on the federal budget as a Congressman from Wisconsin. His advocacy for deficit reduction appeals to a wide range of moderate conservatives, and his home state of Wisconsin promises to be a close call on election night.

On the other hand, Ryan has only served as a Congressman and has little experience running in a national or even a statewide election.

", "candidate_score": 0, "running_mate": true } } ] campaignTrail_temp.running_mate_json = [ { "model": "campaign_trail.running_mate", "pk": 1, "fields": { "candidate": 16, "running_mate": 30 } }, { "model": "campaign_trail.running_mate", "pk": 1, "fields": { "candidate": 18, "running_mate": 32 } }, { "model": "campaign_trail.running_mate", "pk": 3, "fields": { "candidate": 17, "running_mate": 31 } } ] campaignTrail_temp.credits = "Dan Bryan" campaignTrail_temp.global_parameter_json = [ { "model": "campaign_trail.global_parameter", "pk": 1, "fields": { "vote_variable": 1.18, "max_swing": 0.12, "start_point": 0.94, "candidate_issue_weight": 14, "running_mate_issue_weight": 3, "issue_stance_1_max": -0.71, "issue_stance_2_max": -0.3, "issue_stance_3_max": -0.125, "issue_stance_4_max": 0.125, "issue_stance_5_max": 0.3, "issue_stance_6_max": 0.71, "global_variance": 0.0075, "state_variance": 0.005, "question_count": 24, "default_map_color_hex": "#C9C9C9", "no_state_map_color_hex": "#999999" } } ] campaignTrail_temp.opponents_default_json = [ { "election": 3, "candidates": [ 16, 17, 18 ] } ] campaignTrail_temp.opponents_weighted_json = [ { "election": 3, "candidates": [ 16, 17, 18 ] } ] campaignTrail_temp.temp_election_list = [ { "id": 3, "year": 2026, "is_premium": 0, "display_year": "2026 TX Senate: Deep in the Heart" } ] jet_data = { "headerColor": "#4C454B", "windowColor": "#3775CF", "containerColor": "#D28D34", "innerWindowColor": "#3775CF", "bannerImageUrl": "https://i.postimg.cc/HkNfMrtQ/Untitled-25-July-2026-at-10-04-25-2.png", "backgroundImageUrl": "https://i.postimg.cc/YqS7bFLc/background-tx2026-5.jpg", "endingTextColor": "#FFFFFF", "customQuote": "" } campaignTrail_temp.achievements = { "High T": { "image": "https://i.postimg.cc/5NShHFVQ/james.webp", "description": "As James Talarico, win the election.", "cannotBeCheated": true }, "Double Blexas": { "image": "https://i.postimg.cc/W4dgyK6X/IMG-5133.jpg", "description": "Carry Gina Hinojosa over the finish line in the gubernatorial race.", "cannotBeCheated": true }, "Radical Liberal Jimmy": { "image": "https://i.postimg.cc/0jgTSYjS/images-(89).jpg", "description": "As James Talarico, massively shift to the left and win", "cannotBeCheated": true }, "The Return of Blue Dogs?": { "image": "https://i.postimg.cc/28nz06fz/IMG-5385.jpg", "description": "As James Talarico, break from the party ideology and win.", "cannotBeCheated": true }, "Red Fortress": { "image": "https://i.postimg.cc/XqyP7pgy/gettyimages-2294001946.png", "description": "As James Talarico, make sure Texas stays a red state", "cannotBeCheated": true } }; //#startcode corrr = '\n

DEEP IN THE HEART

\n'; nct_stuff.themes[nct_stuff.selectedTheme].coloring_title = "#4C454B"; document.body.style.backgroundSize = "cover" nct_stuff.themes[nct_stuff.selectedTheme].coloring_window = "#3775CF"; 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 = "#D28D34"; document.getElementById("header").src = "https://i.postimg.cc/fbn5D3Gn/5F150719-B504-4ED2-84E7-09BE0C700EBB.png"; document.body.background = "https://i.postimg.cc/YqS7bFLc/background-tx2026-5.jpg"; campaignTrail_temp.credits = "" window.credits = function () { const creditsList = ["Lead Developer:", "Ryker", " ", "Writers:", "Ryker", "barbecue_saucer", "byur3n", "seemsian", "culturevulture", "sailor_neptune_9", " ", "Coders:", "platypus5006", "viva_wellstone (Jacob)"] const text = "DEEP IN THE HEART:\n\n" + creditsList.join('\n'); alert(text); } document.head.innerHTML += ""; document.title = "2026 TX Senate: Deep in the Heart"; document.querySelectorAll("link[rel*='icon']").forEach(el => el.remove()); const favican = document.createElement("link"); favican.rel = "icon"; favican.type = "png"; favican.href = "https://i.postimg.cc/KzpQq6TR/5be1369c177d13ec66284aa3425846a7.webp"; document.head.appendChild(favican); RecReading=true HistHexcolour = [campaignTrail_temp.candidate_json[0].fields.color_hex, campaignTrail_temp.candidate_json[1].fields.color_hex, campaignTrail_temp.candidate_json[2].fields.color_hex]; HistName = ["James Talarico", "Ken Paxton", "Ted Brown/Others"]; HistEV = [40, 214, 0]; HistPV = ["5,444,982", "4,249,373", "195,349"]; HistPVP = ["55.0%", "42.9%", "1.9%"]; $("#site_credits p").css({"color": "white"}); $("#site_credits a").css({"color": "white"}); campaignTrail_temp.modBoxTheme = { "header_color": "#4C454B", "header_image_url": "", "header_text_color": "#fff", "description_text_color": "#000000", "description_background_color": "#f8f8f8", "main_color": "#3672C9", "secondary_color": "#C78A38", "ui_text_color": "#ffffff" } let style = document.createElement('style'); style.type = 'text/css'; style.id = 'dynamic-style'; style.innerHTML = ` .campaign_trail_start_emphasis { background-color: #4C454B; background-image: linear-gradient(to bottom, #4F484E, #494248); } #game_window { background: linear-gradient(to bottom, #3775CF 15%, #3672C9 50%, #3269BA 100%) !important; } .container { background-image: linear-gradient(to bottom, #D28D34, #CC8833); } #state_info h3, #overall_result h3, #state_result h3, .overlay_window h3, .inner_window_question h3 { background-color: #C38A38; background-image: linear-gradient(to bottom, #C38A38, #BA8233) !important; color: white; } .game_header, .container, #game_window, .content_single, .footer, .footer hr { border-color: white; } #visit_window button, #election_night_window button, #new_game_window button, #feedback_window button { margin: 0.5em 0; } .game_header { border-width: 3px; background-image: linear-gradient(to bottom, #4F484E, #494248); } .game_header h2 { font-style: normal; } .inner_window_sign_display { margin: 0; margin-right: 0.033px; margin-left: 0.033px; height: 28%; position: relative; width: 35%; background-color: #F8F8F8; background-image: linear-gradient(to bottom, #FAFAFA, #F5F5F5); margin-left: auto; margin-right: auto; border-style: double; border-color: #C9C9C9; } #final_results_description { color: #FFFFFF !important; } #results_container > .person_image.ending-portrait { float: left !important; box-sizing: border-box; width: min(34%, 380px) !important; height: auto !important; min-width: 0 !important; max-width: 34% !important; max-height: none !important; margin: 16px 20px 12px 15px !important; object-fit: contain; border: 3px double #D5DBE4 !important; box-shadow: none !important; } #map_footer { padding-top: 3em; } #ev_est, #overall_result p { display: none; } .footer { border-width: .375em 0 .1em; padding: .5em; margin-bottom: 1em; border-style: double none solid; } .footer hr { display: none; } .inner_window_question h3 { border-color: white; color: white; margin-top: .1em; } .inner_window_w_desc { border: none; } .inner_window_question { accent-color: #4C454B; } #overall_result_container, #state_result_container { background-color: #3775CF; background-image: linear-gradient(to bottom, #3775CF, #3570C5); } .inner_window_sign_display { top: 2em; } #running_mate_pic { height: 32%; margin-right: 10em; margin-top: 1em; } #candidate_pic { height: 32%; margin-left: 10em; margin-top: 1em; } #map_container { background: #F8F8F8; border-radius: 1px; box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08), 0 0 0 2px rgba(0, 0, 0, 0.04); overflow: hidden; } .overlay_window { height: auto; } #menu_container { background-color: #3775CF !important; background-image: linear-gradient(to bottom, #3775CF, #3570C5) !important; } a:-webkit-any-link { color: #4C454B; } `; document.head.appendChild(style); let achievementStyle = document.createElement("style"); achievementStyle.id = "texas-achievement-style"; achievementStyle.innerHTML = ` .achBox:has(img.achImage:is([src="https://i.postimg.cc/5NShHFVQ/james.webp"], [data-src="https://i.postimg.cc/5NShHFVQ/james.webp"], [src="https://i.postimg.cc/W4dgyK6X/IMG-5133.jpg"], [data-src="https://i.postimg.cc/W4dgyK6X/IMG-5133.jpg"], [src="https://i.postimg.cc/0jgTSYjS/images-(89).jpg"], [data-src="https://i.postimg.cc/0jgTSYjS/images-(89).jpg"], [src="https://i.postimg.cc/28nz06fz/IMG-5385.jpg"], [data-src="https://i.postimg.cc/28nz06fz/IMG-5385.jpg"], [src="https://i.postimg.cc/XqyP7pgy/gettyimages-2294001946.png"], [data-src="https://i.postimg.cc/XqyP7pgy/gettyimages-2294001946.png"])) { height: 260px !important; max-height: 260px !important; flex-direction: column !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: flex-start !important; } .achBox:has(img.achImage:is([src="https://i.postimg.cc/5NShHFVQ/james.webp"], [data-src="https://i.postimg.cc/5NShHFVQ/james.webp"], [src="https://i.postimg.cc/W4dgyK6X/IMG-5133.jpg"], [data-src="https://i.postimg.cc/W4dgyK6X/IMG-5133.jpg"], [src="https://i.postimg.cc/0jgTSYjS/images-(89).jpg"], [data-src="https://i.postimg.cc/0jgTSYjS/images-(89).jpg"], [src="https://i.postimg.cc/28nz06fz/IMG-5385.jpg"], [data-src="https://i.postimg.cc/28nz06fz/IMG-5385.jpg"], [src="https://i.postimg.cc/XqyP7pgy/gettyimages-2294001946.png"], [data-src="https://i.postimg.cc/XqyP7pgy/gettyimages-2294001946.png"])) .achTitle { flex: 0 0 auto !important; width: 100% !important; height: auto !important; max-height: none !important; margin: 0 0 10px !important; line-height: 1.1 !important; } .achBox:has(img.achImage:is([src="https://i.postimg.cc/5NShHFVQ/james.webp"], [data-src="https://i.postimg.cc/5NShHFVQ/james.webp"], [src="https://i.postimg.cc/W4dgyK6X/IMG-5133.jpg"], [data-src="https://i.postimg.cc/W4dgyK6X/IMG-5133.jpg"], [src="https://i.postimg.cc/0jgTSYjS/images-(89).jpg"], [data-src="https://i.postimg.cc/0jgTSYjS/images-(89).jpg"], [src="https://i.postimg.cc/28nz06fz/IMG-5385.jpg"], [data-src="https://i.postimg.cc/28nz06fz/IMG-5385.jpg"], [src="https://i.postimg.cc/XqyP7pgy/gettyimages-2294001946.png"], [data-src="https://i.postimg.cc/XqyP7pgy/gettyimages-2294001946.png"])) .achImageHolder { box-sizing: border-box !important; display: flex !important; align-items: center !important; justify-content: center !important; flex: 0 0 110px !important; width: 110px !important; height: 110px !important; margin: 0 auto 10px !important; } .achBox:has(img.achImage:is([src="https://i.postimg.cc/5NShHFVQ/james.webp"], [data-src="https://i.postimg.cc/5NShHFVQ/james.webp"], [src="https://i.postimg.cc/W4dgyK6X/IMG-5133.jpg"], [data-src="https://i.postimg.cc/W4dgyK6X/IMG-5133.jpg"], [src="https://i.postimg.cc/0jgTSYjS/images-(89).jpg"], [data-src="https://i.postimg.cc/0jgTSYjS/images-(89).jpg"], [src="https://i.postimg.cc/28nz06fz/IMG-5385.jpg"], [data-src="https://i.postimg.cc/28nz06fz/IMG-5385.jpg"], [src="https://i.postimg.cc/XqyP7pgy/gettyimages-2294001946.png"], [data-src="https://i.postimg.cc/XqyP7pgy/gettyimages-2294001946.png"])) img.achImage { display: block !important; width: 100px !important; height: 100px !important; max-width: 100% !important; max-height: 100% !important; object-fit: contain !important; object-position: center !important; box-sizing: border-box !important; padding: 2px !important; border: 2px solid #3775CF !important; background-color: #F8F8F8 !important; border-radius: 2px !important; } .achBox:has(img.achImage:is([src="https://i.postimg.cc/5NShHFVQ/james.webp"], [data-src="https://i.postimg.cc/5NShHFVQ/james.webp"], [src="https://i.postimg.cc/W4dgyK6X/IMG-5133.jpg"], [data-src="https://i.postimg.cc/W4dgyK6X/IMG-5133.jpg"], [src="https://i.postimg.cc/0jgTSYjS/images-(89).jpg"], [data-src="https://i.postimg.cc/0jgTSYjS/images-(89).jpg"], [src="https://i.postimg.cc/28nz06fz/IMG-5385.jpg"], [data-src="https://i.postimg.cc/28nz06fz/IMG-5385.jpg"], [src="https://i.postimg.cc/XqyP7pgy/gettyimages-2294001946.png"], [data-src="https://i.postimg.cc/XqyP7pgy/gettyimages-2294001946.png"])) .achText { box-sizing: border-box !important; flex: 0 1 auto !important; height: auto !important; min-height: 28px !important; max-height: 54px !important; width: 100% !important; margin: auto 0 0 !important; padding: 4px 5px !important; overflow-x: hidden !important; overflow-y: auto !important; font-size: 12px !important; line-height: 1.25 !important; scrollbar-width: thin; scrollbar-color: #3775CF #F8F8F8; } `; document.head.appendChild(achievementStyle); // This is a recreation of the music player // showcased in the mod Project 2024 sneak peeks. class Song { constructor(title, artist, coverLink, audioLink) { this.title = title; this.artist = artist; this.coverLink = coverLink; this.audioLink = audioLink; } getTitle() { return this.title; } getArtist() { return this.artist; } getCoverLink() { return this.coverLink; } getAudioLink() { return this.audioLink; } } class Playlist { constructor() { this.songs = []; this.currentSongIndex = 0; } addSong(song) { this.songs.push(song); } getCurrentSong() { return this.songs[this.currentSongIndex]; } playNext() { if (this.songs.length === 0) return; this.currentSongIndex = (this.currentSongIndex + 1) % this.songs.length; } playPrevious() { if (this.songs.length === 0) return; this.currentSongIndex = (this.currentSongIndex - 1 + this.songs.length) % this.songs.length; } } window.Playlist = Playlist; window.Song = Song; let activePlaylist = new Playlist(); let audioInstance = null; let currentVolume = 0.5; // assets const ASSETS = { bg: "https://raw.githubusercontent.com/StrawberryMaster/womble/refs/heads/main/images/p24_background.png", btnPrev: ``, btnNext: ``, btnPlay: ``, btnPause: ``, volLow: ``, volHigh: `` }; // helpers function getAudioElement() { if (!audioInstance) { audioInstance = document.createElement("audio"); audioInstance.id = "audio"; document.body.appendChild(audioInstance); } return audioInstance; } function updatePlayPauseIcon(isPlaying) { const btn = document.getElementById("playPauseButton"); if (btn) btn.innerHTML = isPlaying ? ASSETS.btnPause : ASSETS.btnPlay; } function changePlaylist(newPlaylist) { activePlaylist = newPlaylist; activePlaylist.currentSongIndex = 0; updateUI(activePlaylist); const audio = getAudioElement(); const song = activePlaylist.getCurrentSong(); if (song) { audio.src = song.audioLink; audio.play().catch(e => console.log("Autoplay blocked", e)); updatePlayPauseIcon(true); } } window.changePlaylist = changePlaylist; function updateUI(playlist) { const currentSong = playlist.getCurrentSong(); const player = document.getElementById("player"); if (!player || !currentSong) return; const cover = player.querySelector("#cover"); const title = player.querySelector("#title"); const artist = player.querySelector("#artist"); if (cover) cover.src = currentSong.getCoverLink(); if (title) title.textContent = currentSong.getTitle(); if (artist) artist.textContent = currentSong.getArtist(); } window.updateUI = updateUI; function setSliderFill(slider, cssVar) { const val = (slider.value - slider.min) / (slider.max - slider.min) * 100; slider.style.setProperty(cssVar, `${val}%`); } // setup function setupMusicPlayer() { const gameWindow = document.getElementById("game_window"); if (!gameWindow) return; if (document.getElementById("player")) return; const defaultSongs = [ ["Amarillo By Morning", "George Strait", "https://i.postimg.cc/Xvj0sgq2/1200x1200bf-60.jpg", "https://audio.jukehost.co.uk/019fe948-84de-7180-b750-6915d7bd78e4"], ["These Boots Are Made For Walkin'", "Nancy Sinatra", "https://i.postimg.cc/bdc7kxKX/71l4Jku5yu-L-SL1200.jpg", "https://audio.jukehost.co.uk/019fe94c-33cd-711e-b2e0-2c14a1732c6a"], ["Ring Of Fire", "Johnny Cash", "https://i.postimg.cc/8c2Sw-Qfq/249479.jpg", "https://audio.jukehost.co.uk/019fe95c-d9ac-7161-a304-aca53e4f6736"], ["Snowqueen Of Texas", "The Mamas & Papas", "https://i.postimg.cc/pT1xhn23/r-584021-1560007496-1920.jpg", "https://audio.jukehost.co.uk/019fe95f-d58f-7097-9320-7cb74a55e195"], ["Southern Nights", "Glen Campbell", "https://i.postimg.cc/T1D8K7NK/1200x1200bf-60-(1).jpg", "https://audio.jukehost.co.uk/019fe961-c259-70f9-a9b6-192371878333"] ]; if (activePlaylist.songs.length === 0) { defaultSongs.forEach(data => activePlaylist.addSong(new Song(...data))); } // inject CSS const style = document.createElement("style"); style.textContent = ` #player { display: flex; flex-direction: row; width: 100%; height: 173px; background-image: url("${ASSETS.bg}"); background-size: cover; background-position: center; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: white; user-select: none; overflow: hidden; margin: 6.5px 0; border: 3px solid white; } #display-box { display: flex; align-items: center; } #cover { height: 173px; width: 173px; object-fit: cover; box-shadow: 2px 0 10px rgba(0,0,0,0.4); } #info-container { display: flex; height: 173px; width: 127px; margin-top: 3px; color: white; } #song-info { width: 100%; padding: 5px; box-sizing: border-box; } #title { font-size: 1.17em; font-weight: bold; margin-block-start: 1em; margin-block-end: 0.5em; } #artist { margin: 0; font-size: 12px; opacity: 0.9; } #controls-container { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; } #controls-wrapper { display: flex; flex-direction: column; align-items: center; gap: 15px; margin-top: -60px; } #controls { display: flex; align-items: center; gap: 0; } .transport-btn { background: none; border: none; padding: 0; cursor: pointer; color: #a3a3a3; transition: color 0.1s ease, transform 0.1s ease; display: flex; align-items: center; justify-content: center; } .transport-btn:hover { color: #ffffff; } .transport-btn:active { transform: scale(0.9); } #playPauseButton { color: #ffffff; } #volume-container { display: flex; align-items: center; gap: 12px; } .vol-icon { display: flex; color: #8c8c8c; } input[type=range] { -webkit-appearance: none; background: transparent; outline: none; cursor: pointer; margin: 0; } input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; background: #ffffff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.5); } #volumeSlider { width: 110px; height: 10px; } #volumeSlider::-webkit-slider-runnable-track { height: 5px; border-radius: 2px; background: linear-gradient(to right, #b0b0b0 var(--vol-pos, 50%), #555555 var(--vol-pos, 50%)); } #volumeSlider::-webkit-slider-thumb { width: 10px; height: 10px; background: #bebebe; margin-top: -3px; } #progress-bar-container { position: absolute; bottom: -3px; left: 0; width: 81%; margin-left: .1em; height: 10px; display: flex; align-items: center; } #progress-bar { width: 100%; height: 10px; } #progress-bar::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, #b8b8b8 var(--prog-pos, 0%), #e7e7e7 var(--prog-pos, 0%)); } #progress-bar::-webkit-slider-thumb { background: #bebebe; width: 10px; height: 10px; margin-top: -3px; opacity: 0; transition: opacity 0.2s; } #progress-bar:hover::-webkit-slider-thumb { opacity: 1; } `; document.head.appendChild(style); // create HTML const playerContainer = document.createElement("div"); playerContainer.id = "player"; playerContainer.innerHTML = `

${ASSETS.volLow}
${ASSETS.volHigh}
`; gameWindow.insertAdjacentElement("afterend", playerContainer); // set up audio & logic const audio = getAudioElement(); const startSong = activePlaylist.getCurrentSong(); if (startSong) audio.src = startSong.audioLink; audio.volume = currentVolume; const playPauseBtn = document.getElementById("playPauseButton"); const prevBtn = document.getElementById("prevButton"); const nextBtn = document.getElementById("nextButton"); const progressBar = document.getElementById("progress-bar"); const volumeSlider = document.getElementById("volumeSlider"); setSliderFill(volumeSlider, '--vol-pos'); playPauseBtn.addEventListener("click", () => { if (audio.paused) { audio.play(); updatePlayPauseIcon(true); } else { audio.pause(); updatePlayPauseIcon(false); } }); const playSongAtIndex = () => { updateUI(activePlaylist); audio.src = activePlaylist.getCurrentSong().audioLink; audio.play(); updatePlayPauseIcon(true); }; nextBtn.addEventListener("click", () => { activePlaylist.playNext(); playSongAtIndex(); }); prevBtn.addEventListener("click", () => { activePlaylist.playPrevious(); playSongAtIndex(); }); audio.addEventListener("timeupdate", () => { if (Number.isFinite(audio.duration)) { const progress = (audio.currentTime / audio.duration) * 100; progressBar.value = progress; setSliderFill(progressBar, '--prog-pos'); } }); audio.addEventListener("ended", () => { activePlaylist.playNext(); playSongAtIndex(); }); progressBar.addEventListener("input", (e) => { if (Number.isFinite(audio.duration)) { audio.currentTime = (e.target.value / 100) * audio.duration; setSliderFill(progressBar, '--prog-pos'); } }); volumeSlider.addEventListener("input", (e) => { currentVolume = parseFloat(e.target.value); audio.volume = currentVolume; setSliderFill(volumeSlider, '--vol-pos'); }); updateUI(activePlaylist); audio.play() .then(() => updatePlayPauseIcon(true)) .catch(() => updatePlayPauseIcon(false)); } setupMusicPlayer(); const startScreenUpdater = setInterval(function() { const goBackButton = document.getElementById("candidate_id_back"); const candidateButton = document.getElementById("candidate_id_button"); const runningMateButton = document.getElementById("running_mate_id_button"); const finalScreenBB = document.getElementById("opponent_selection_id_back"); const finalScreenID = document.getElementById("opponent_selection_id_button"); const candidateSelect = document.getElementById("candidate_id"); if (candidateSelect && !runningMateButton) { // change theme on candidate viewing const c = candidateSelect.value; if (c == 16 && !candidateButton) { if (goBackButton) goBackButton.click(); const initContinue = document.getElementById("election_id_button"); if (initContinue) initContinue.click(); } else if (c == 17 ) { if (candidateButton) { candidateButton.remove(); } } } if (finalScreenID) { // delete back button and delete the interval if (finalScreenBB) { finalScreenBB.remove(); } clearInterval(startScreenUpdater); } }, 100); // Changing States to County if (!e.done) { e.done = true; styling = document.createElement("style"); document.head.appendChild(styling); styling.innerHTML = ` #opponent_selection_id_back { display: none; } ` let z = new MutationObserver((mutationsList, observer) => { let runningMateSummary = document.querySelector("#running_mate_summary"); if (runningMateSummary) { $("#running_mate_id_button").click(); observer.disconnect() } }); z.observe(document, { subtree: true, childList: true }); } e.HomeStateText = "Home County:"; const _originalQuestionHTML = window.questionHTML; window.questionHTML = function(...args) { _originalQuestionHTML.apply(this, args); const mapButton = document.getElementById("view_electoral_map"); const answerButton = document.getElementById("answer_select_button"); if (mapButton && answerButton) { mapButton.innerText = "Latest Polls/Election Map"; answerButton.innerText = "CONTINUE"; } }; document.getElementById("inner_window_1").children[0].innerHTML = `Do you have what it takes to win a State Election?` document.getElementById("inner_window_1").children[1].innerHTML = `
  • Select a year and a candidate to find out.
  • You will answer questions about your platform and positions, and also about your campaign strategy.
  • The answers will affect your popularity for better or worse, both state-wide and in individual counties.
  • Walk the fine line between appealing to your base and winning a majority of the votes.
  • ` function modifyForm() { try { const form = document.querySelector('form[name="game_type_selection"]'); const select = form.querySelector('select[name="game_type_id"]'); // change option value const option = select.querySelector('option[value="1"]'); option.textContent = 'Default (Plurality Voting)'; // Remove second option select.querySelector('option[value="2"]').remove(); } catch {} } window.setInterval(modifyForm,200) function changeOpponentSelectionDescription() { try { const opponentSelectionDescription = document.getElementById("opponent_selection_description_window"); opponentSelectionDescription.innerHTML = `

    Use a plurality voting system.

    Ever since the ratification of the 17th Amendment in 1913, most states have used a plurality voting system to elect U.S. senators. This means the election is essentially a popularity contest -- whichever candidate receives the most votes wins.

    This method can make it hard for third-party candidates to win and can encourage tactical voting and wasted votes. On the other hand, it can provide swift and simple election results and makes every vote equal.

    `; } catch {} } window.setInterval(changeOpponentSelectionDescription,200) let observerRunning = false; let processedNodes = new Set(); const scrollableElementIds = ["overall_result", "state_result", "state_info", "main_content_area", "final_results_description"]; let campaign_sign = null; async function handleMutations(mutationsList, observer) { if (observerRunning) return; observerRunning = true; // stop observing observer.disconnect(); try { const pvswitcher_button = document.getElementById("pvswitcher"); if (pvswitcher_button) { if (pvswitcher_button.textContent === "PV Estimate") { pvswitcher_button.textContent = "PV Estimate"; } else if (pvswitcher_button.textContent === "Switch to State Estimate") { pvswitcher_button.textContent = "Switch to County Estimate"; } } const replaceUpTo = "Electoral Votes".length; // replace "electoral votes" with "seats" const ev_button = document.getElementById("ev_est"); const seat_text = "Counties Won Estimate"; if (ev_button && ev_button.textContent !== seat_text) { ev_button.textContent = seat_text; } const state_info = document.getElementById("state_info") if (state_info) { const state_info_header = state_info.children[0]; if (state_info_header && state_info_header.textContent.includes("STATE SUMMARY")) { state_info_header.textContent = "COUNTY SUMMARY"; } const ev_number = state_info.children[3]; if (ev_number && ev_number.textContent.slice(0, replaceUpTo) === "Electoral Votes") { ev_number.textContent = " "; } } const overall_result = document.getElementById("overall_result"); if (overall_result) { const overall_result_header = overall_result.children[0]; if (overall_result_header && (overall_result_header.textContent.includes("ELECTORAL VOTES") || overall_result_header.textContent.includes("DELEGATES"))) { overall_result_header.textContent = "TOTAL PERCENTAGE"; } } const state_result = document.getElementById("state_result"); if (state_result) { const state_result_header = state_result.children[0]; if (state_result_header && state_result_header.textContent.includes("STATE RESULTS")) { state_result_header.textContent = "COUNTY RESULTS"; } const state_result_text = state_result.children[1]; if (state_result_text) { if (state_result_text.textContent === "Click on a state to view final results.") { state_result_text.textContent = "Click on a county to view final results."; } else if (state_result_text.textContent === "Click on a state to view detailed results (once returns for that state arrive).") { state_result_text.textContent = "Click on a county to view detailed results (once returns for that county arrive)."; } else if (state_result_text.textContent === "Returns for this state are not yet available!") { state_result_text.textContent = "Returns for this county are not yet available!"; } } const state_result_evs = state_result.children[2]; if (state_result_evs && state_result_evs.textContent.slice(0, replaceUpTo) === "Electoral Votes") { state_result_evs.textContent = " "; state_result_evs.textContent.slice(replaceUpTo); } } const endingImage = document.querySelector("#results_container > .person_image"); if (endingImage && document.getElementById("final_results_description") && campaignTrail_temp.endingImage) { if (endingImage.getAttribute("src") !== campaignTrail_temp.endingImage) { endingImage.classList.add("ending-portrait"); endingImage.src = campaignTrail_temp.endingImage; } } const final_results = document.getElementsByClassName("final_results_table"); if (final_results && final_results.length > 0) { replaceTableHeaders(final_results[0], true) } const overall_details = document.querySelectorAll("#overall_election_details, #state_result_data_summary"); for (const table_container of overall_details) { replaceTableHeaders(table_container.children[1], table_container.id === "overall_election_details" && table_container.firstElementChild.textContent.includes("This Game")) } const state_results_button = document.getElementById("state_results_button"); if (state_results_button && state_results_button.textContent === "Results by State") { state_results_button.textContent = "Results by County"; } const headers = document.getElementsByClassName("title_h3"); for (const header of headers) { if (header.textContent === "Election Results and Data by State") { header.textContent = "Election Results and Data by County"; } } const sort_tab = document.getElementById("sort_tab"); if (sort_tab && sort_tab.querySelector('option[value="2"]')) { const queryTwo = sort_tab.querySelector('option[value="2"]'); if (queryTwo) { queryTwo.remove(); } } if (sort_tab && sort_tab.querySelector('option[value="3"]')) { const queryThree = sort_tab.querySelector('option[value="3"]'); if (queryThree.textContent === "Closest States") { queryThree.textContent = "Closest Counties" } } const sort_tab_area = document.getElementById("sort_tab_area"); if (sort_tab_area && sort_tab_area.firstElementChild) { const sort_text = sort_tab_area.firstElementChild.firstChild; if (sort_text && sort_text.textContent && sort_text.textContent.startsWith("View states by:")) { sort_text.textContent = "View counties by:" + sort_text.textContent.slice("View states by:".length); } } const state_tab_area = document.getElementById("state_tab_area"); if (state_tab_area && state_tab_area.firstElementChild) { const state_text = state_tab_area.firstElementChild.firstChild; if (state_text && state_text.textContent && state_text.textContent.startsWith("Select a state:")) { state_text.textContent = "Select a County:" + state_text.textContent.slice("Select a state:".length); } } } catch (err) { console.error("Observer error:", err); } finally { observer.observe(document.documentElement, { childList: true, subtree: true }); observerRunning = false; } } function replaceTableHeaders(table, showCounties = false) { if (table && table.firstElementChild && table.firstElementChild.firstElementChild) { const table_headers_container = table.firstElementChild.firstElementChild; if (showCounties && table_headers_container.children[1]?.textContent.trim() === "Popular Votes") { const countyWins = {}; for (const county of campaignTrail_temp.final_state_results || []) { const ranked = county.result.slice().sort((a, b) => b.votes - a.votes); if (ranked.length && ranked[0].votes > (ranked[1]?.votes || 0)) { const winner = ranked[0].candidate; countyWins[winner] = (countyWins[winner] || 0) + 1; } } const header = document.createElement("th"); header.textContent = "Counties Won"; table_headers_container.insertBefore(header, table_headers_container.children[1]); for (const row of Array.from(table.rows).slice(1)) { if (row.cells.length !== 3) continue; const name = row.cells[0].textContent.replace(/^[-\s]+/, "").trim(); const candidate = campaignTrail_temp.candidate_json.find(c => `${c.fields.first_name} ${c.fields.last_name}` === name); if (!candidate) continue; row.insertCell(1).textContent = countyWins[candidate.pk] || 0; } } const ev_header = table_headers_container.children[1]; if (ev_header && ev_header.textContent === "Electoral Votes") { ev_header.textContent = "Counties Won"; } const ev_header_alt = table_headers_container.children[3]; if (ev_header_alt && ev_header_alt.textContent === "Electoral Votes") { ev_header_alt.textContent = "Counties Won"; } } } let singleObserver = new MutationObserver(handleMutations); singleObserver.observe(document.documentElement, { childList: true, subtree: true }); //#endcode