e = campaignTrail_temp;
nct_stuff.themes[nct_stuff.selectedTheme].coloring_title = "#565758";
nct_stuff.themes[nct_stuff.selectedTheme].coloring_window = "#8a8a8a";
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 = "#08007a";
document.getElementById("header").src = "https://raw.githubusercontent.com/1989Modder/Swift2028/main/e5vcf4jjfm6c1.png";
document.body.background = "../static/images/mlk.jpg";
e.election_json = [{"model":"campaign_trail.election","pk":3,"fields":{"year":2012,"summary":"
After defeating Joe Biden in the 2024 Election, Donald Trump neutered congress with the help of a complicit SCOTUS. A year and a half of inept semi-dictatorship followed under the aegis of Project 2025. After some protests at the White House in April 2026, Trump chose to disconnect America from the internet to \\\"calm people down\\\". A short but bloody uprising followed, resembling Ukraine's Euromaidan: 100 dead, 94 of whom were demonstrators. After a few days, the military refused Trump's orders to crack down further. Trump and his VP Vivek Ramaswamy fled to Saudi Arabia, where he remains, despite no formal charges being filed against him. Hakeem Jeffries, Democratic Party Leader, has served as interim president since. He has lead a largely apolitical placeholder presidency, and plans to let the people decide whether to restore Republican rule or move forward with the Democrats. Many fear this will be the last Presidential election either way.
Republican Tucker Carlson, Donald Trump's former Chief of Staff, inherits the mantle of his predecessor's abortive dictatorship. He will have to persuade the American people that Trump was a more stable option than the chaotic past two years- and that he can achieve the goal that Project 2025 sought to. Democrat and legendary musician Taylor Swift has emerged from a brokered convention as a consensus candidate. Despite her lack of experience, Swift is enormously popular, and her multi-generational fanbase gives her an ace up her sleeve in the ground game. The candidates must not only seek to win the presidency, but a potential war post-election. Who will come out victorious from this boiling soup of chaos?
","image_url":"https://media.zenfs.com/en/the_huffington_post_584/89eb1c8057539f915c1e4d4e9bc9b708","winning_electoral_vote_number":270,"advisor_url":"https://penntoday.upenn.edu/sites/default/files/spotlight_thumbnail/PORES_NBC_GroupDecision-a.jpg","recommended_reading":"","has_visits":1,"no_electoral_majority_image":"../static/images/2012-no-majority.jpg"}}];e.temp_election_list = [{"id":3,"year":2012,"is_premium":0,"display_year":"2028"}];e.credits = "1989Modder, nephrenkur, ingjon, ltdan65, spacenerd4, itsarm";e.global_parameter_json = [{"model":"campaign_trail.global_parameter","pk":1,"fields":{"vote_variable":1.125,"max_swing":0.0,"start_point":0.94,"candidate_issue_weight":10,"running_mate_issue_weight":3,"issue_stance_1_max":-0.71,"issue_stance_2_max":-0.3,"issue_stance_3_max":-0.125,"issue_stance_4_max":0.125,"issue_stance_5_max":0.3,"issue_stance_6_max":0.71,"global_variance":0.00,"state_variance":0.000,"question_count":25,"default_map_color_hex":"#C9C9C9","no_state_map_color_hex":"#999999"}}];e.candidate_json = [{"model":"campaign_trail.candidate","pk":16,"fields":{"first_name":"Taylor","last_name":"Swift","election":3,"party":"Democratic Party","state":"Tennessee","priority":1,"description":"Taylor Swift, a legendary musician, seeks to unite the Anti-Trump coalition against Tucker Carlson, a man who many see as a puppet for the return of Donald Trump. Swift will have to overcome concerns about her lack of political experience, as well as her ability to secure the nation. On the positive side, Swift has the fanatical support of many voters of the middle-aged Millennial generation, as well as the younger Gen Z. In fact, Swift's DC concert in March of 2026 is often credited with inspiring the April Revolution.
","color_hex":"#0000ff","secondary_color_hex":null,"is_active":1,"image_url":"https://www.onthisday.com/images/people/taylor-swift.jpg?w=360","electoral_victory_message":"REAL PATRIOT DUMMY EXAMPLE SWEEPS ","electoral_loss_message":"Fake News? ","no_electoral_majority_message":"DUMMY EXAMPLE RETURNS TO HELL ","description_as_running_mate":null,"candidate_score":1,"running_mate":false,"scrollable":true}},{"model":"campaign_trail.candidate","pk":17,"fields":{"first_name":"Tucker","last_name":"Carlson","election":3,"party":"Republican Party","state":"California","priority":1,"description":"","color_hex":"#ff0000","secondary_color_hex":null,"is_active":1,"image_url":"https://upload.wikimedia.org/wikipedia/commons/7/7a/Tucker_Carlson_%2853067283901%29_%28cropped%29.jpg","electoral_victory_message":"REAL PATRIOT DUMMY EXAMPLE SWEEPS ","electoral_loss_message":"Fake News? ","no_electoral_majority_message":"DUMMY EXAMPLE RETURNS TO HELL ","description_as_running_mate":null,"candidate_score":1,"running_mate":false,"scrollable":true}},{"model":"campaign_trail.candidate","pk":18,"fields":{"first_name":"Right","last_name":"Opposition","election":3,"party":"Rightists","state":"Everywhere","priority":1,"description":"","color_hex":"#fff700","secondary_color_hex":null,"is_active":0,"image_url":"https://render.fineartamerica.com/images/rendered/default/print/6/8/break/images/artworkimages/medium/1/dunce-cap-emily-kelley.jpg","electoral_victory_message":"REAL PATRIOT DUMMY EXAMPLE SWEEPS ","electoral_loss_message":"Fake News? ","no_electoral_majority_message":"DUMMY EXAMPLE RETURNS TO HELL ","description_as_running_mate":null,"candidate_score":1,"running_mate":false,"scrollable":true}},{"model":"campaign_trail.candidate","pk":19,"fields":{"first_name":"Left","last_name":"Opposition","election":3,"party":"Leftists","state":"Everywhere","priority":1,"description":"None","color_hex":"#01b20d","secondary_color_hex":null,"is_active":0,"image_url":"https://render.fineartamerica.com/images/rendered/default/print/6/8/break/images/artworkimages/medium/1/dunce-cap-emily-kelley.jpg","electoral_victory_message":"REAL PATRIOT DUMMY EXAMPLE SWEEPS ","electoral_loss_message":"Fake News? ","no_electoral_majority_message":"DUMMY EXAMPLE RETURNS TO HELL ","description_as_running_mate":null,"candidate_score":1,"running_mate":false,"scrollable":false}},{"model":"campaign_trail.candidate","pk":1005,"fields":{"first_name":"Gretchen","last_name":"Whitmer","election":3,"party":"Democratic Party","state":"Michigan","priority":1,"description":"Former Michigan Governor Gretchen Whitmer is either a hero or traitor, depending on who you ask. During the April Revolution, Whitmer established a Democratic Volunteer Militia to counter Michigan's infamous right-wing militias. This action is still considered by many to be the main factor in Trump's decision to abdicate. Whitmer's skill will lead some to believe she would be the woman behind the curtain of a Swift presidency.
","color_hex":"#0000ff","secondary_color_hex":null,"is_active":0,"image_url":"https://upload.wikimedia.org/wikipedia/commons/6/65/Gretchen_Whitmer_%282021%29_%28cropped%29.jpg","electoral_victory_message":"REAL PATRIOT DUMMY EXAMPLE SWEEPS ","electoral_loss_message":"Fake News? ","no_electoral_majority_message":"DUMMY EXAMPLE RETURNS TO HELL ","description_as_running_mate":"Former Michigan Governor Gretchen Whitmer is either a hero or traitor, depending on who you ask. During the April Revolution, Whitmer established a Democratic Volunteer Militia to counter Michigan's infamous right-wing militias. This action is still considered by many to be the main factor in Trump's decision to abdicate. Whitmer's skill will lead some to believe she would be the woman behind the curtain of a Swift presidency.
","candidate_score":1,"running_mate":true,"scrollable":true,"partner":"0"}},{"model":"campaign_trail.candidate","pk":1006,"fields":{"first_name":"Paul","last_name":"Gosar","election":3,"party":"Republican Party","state":"Arizona","priority":1,"description":"What part of \"not playable\" didn't you understand?
","color_hex":"#ff0000","secondary_color_hex":null,"is_active":0,"image_url":"https://upload.wikimedia.org/wikipedia/commons/c/cd/Paul_Gosar_official_portrait_September_2016.jpg","electoral_victory_message":"REAL PATRIOT DUMMY EXAMPLE SWEEPS ","electoral_loss_message":"Fake News? ","no_electoral_majority_message":"DUMMY EXAMPLE RETURNS TO HELL ","description_as_running_mate":"What part of \"not playable\" didn't you understand?
","candidate_score":1,"running_mate":true,"scrollable":true,"partner":"1"}}];e.running_mate_json = [{"model":"campaign_trail.running_mate","pk":2001,"fields":{"candidate":16,"running_mate":1005}},{"model":"campaign_trail.running_mate","pk":2002,"fields":{"candidate":17,"running_mate":1006}}];
$("#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 += ``+soundtracks[e.selectedSoundtrack].name+" "
for (i in soundtracks) {
if (soundtracks[e.selectedSoundtrack] != soundtracks[i]) {
z += ``+soundtracks[i].name+` `
}
}
z += ` `
// Option 1
for (i in soundtracks[e.selectedSoundtrack].tracklist) {
let a = soundtracks[e.selectedSoundtrack].tracklist[i]
let b = ` `+a.name+` `
z += b
}
z += "
"
trackSel.innerHTML = z
// select correct song
musicBox.appendChild(trackSel);
Array.from(document.getElementById("trackSel").children).filter(f=>{
return f.tagName == "LABEL"
}).map(f=>f.children[0])[0].checked = true
// set soundtrack changer
soundtrackSelector = document.getElementById("selectSoundtrack")
soundtrackSelector.onchange = function() {
for (i in soundtracks) {
if (soundtracks[i].name == soundtrackSelector.value) {
e.selectedSoundtrack = i
break
}
}
document.getElementById("trackSelParent").remove()
newMusicPlayer()
}
var matches = document.querySelectorAll('.trackSelector');
for (match in matches) {
matches[match].onchange = function() {
musicBox.children[2].src = soundtracks[e.selectedSoundtrack].tracklist[this.value].url
musicBox.children[2].currentTime = 0
}
}
musicBox.children[2].loop = false
musicBox.children[2].src = soundtracks[e.selectedSoundtrack].tracklist[0].url
musicBox.children[2].onended = function() {
console.log("next track")
let selected = Number(document.querySelector('input[name="trackSelector"]:checked').value);
let newSel = clamp(selected+1, soundtracks[e.selectedSoundtrack].tracklist.length-1, 0)
let buttons = Array.from(document.getElementById("trackSel").children).filter(f=>{
return f.tagName == "LABEL"
}).map(f=>f.children[0])
//let selectedIndex = buttons.map(f=>f.children[0]).map(f=>f.checked)
buttons[newSel].click()
}
for (w = 0; w < 7; w++) {
document.getElementById("trackSelParent").appendChild(document.createElement("br"))
}
generateTime();
}
clamp = function(a, max, min, overflow=true) {
if (overflow) {
return a > max ? min : a < min ? max : a;
}
return a > max ? max : a < min ? min : a;
}
// Track list
var soundtracks = {
0: {
name: "2028Wave",
tracklist: [
{
name: "Taylor Swift - Look What You Made Me Do",
url: "https://ia903006.us.archive.org/9/items/taylor-swift-look-what-you-made-me-do/taylor-swift-look-what-you-made-me-do.mp3",
},
{
name: "The Weeknd - Blinding Lights",
url: "https://ia803404.us.archive.org/24/items/the-weeknd-blinding-lights-official-audio_202103/The%20Weeknd%20-%20Blinding%20Lights%20%28Official%20Audio%29.mp3",
},
{
name: "Taylor Swift - Anti-Hero",
url: "https://ia902602.us.archive.org/7/items/anti-hero-taylor-swift-trao-luu-nhac-hot-v.-a-playlist-nhac-cua-tui/Anti-hero%20-%20Taylor%20Swift%20-%20Tr%C3%A0o%20L%C6%B0u%20Nh%E1%BA%A1c%20Hot%20-%20V.A%20-%20Playlist%20NhacCuaTui.mp3",
},
{
name: "Soundgarden - Black Hole Sun",
url: "https://ia800200.us.archive.org/18/items/107BlackHoleSun/1-07%20Black%20Hole%20Sun.mp3",
},
{
name: "Taylor Swift - The Archer",
url: "https://ia601803.us.archive.org/18/items/taylor-swift-lover/05%20The%20Archer.mp3",
},
],
},
}
newMusicPlayer()