musicMode = () => {
songsPlayed = 0;
// 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 = `
With Ronald Reagan's popular leadership coming to an end, the country seems evermore likely to continue his line of politics going into the 90's. Why? I'll tell you.
The majority opinion is betting on Bush, but if he isn't careful, he could end up how Dewey did in 48'.
", "image_url": "https://i.imgur.com/PPxNWcJ.png", "winning_electoral_vote_number": 270, "advisor_url": "https://i.imgur.com/zxypxor.png", "recommended_reading": "
Hey guys, Jimbo here, and I just wanted to say thank you for playing my 9th mod. This mod was just something to do really for the hell of it and I think it came out nicely.
George Herbert Walker Bush will win this election - there's no way he can't - A strong economy, a popular vice-presidency , an even more popular boss, moderate dogma and we haven't even mentioned the sheer unpopularity of his opponent in the general - Jesse Jackson. Despite the seeming probability of his win, Bush does have a few options if he really wants to give the Democrats a run for their money. He could tap into white backlash, or he could pivot to get moderate Dems on board. Any option is really free, as there is no way he can lose. There is no way that Jackson can pull a Truman out of his ass - there's just no way.
", "color_hex": "#96152f", "secondary_color_hex": "#FFA0A0", "is_active": 0, "image_url": "https://www.jetsimon.com/public/static/images/george-bush-1988.jpg", "electoral_victory_message": "In spite of a desperate challenge from Jesse Jackson, you have gone and succeeded Ronald Reagan.
This was the expectant result. As Jackson was too polarizing for American society. On the political front, you can continue the policies of Reagan or turn in a more moderate direction. Internationally, you can hopefully oversee a period of relaxed tension with the Soviet Union.
", "electoral_loss_message": "This was a serious shock, Jackson was very unpopular. Maybe people were ready to move on from Reagan, or perhaps you made one too many gaffes.
Time will tell if Jackson governs as a moderate, a liberal, or a progressive. A lot can happen in four years, but the early gossip is that Bob Dole has the inside track for the 1992 nomination. Your presidential ambitions have ended here.
", "no_electoral_majority_message": "Although the Electoral College was tied, the Democrats have won a solid majority in the House, and will elevate Jesse Jackson to the Presidency. Although you could probably peel a few southern conservatives away.
Time will tell if Jackson governs as a moderate, a liberal, or a progressive. A lot can happen in four years, but the early gossip is that Bob Dole has the inside track for the 1992 nomination. Your presidential ambitions have ended here.
", "description_as_running_mate": "'", "candidate_score": 1, "running_mate": false } }, { "model": "campaign_trail.candidate", "pk": 153, "fields": { "first_name": "Jesse", "last_name": "Jackson", "election": 15, "party": "Democratic", "state": "District of Columbia", "priority": 2, "description": "By god, Jesse Louis Jackson has finally won the Democratic nomination following a stunning performance on Super Tuesday. Famous - or infamous - in the American public as an avid liberal, Jackson advocates for many progressive platforms such as ratifying the ERA, cutting defense spending, and reviving various other New Deal-esque programs to help the economy. Jackson would be the first African-American on a major ticket.
Unfortunately, Jackson is very unpopular with many key voting groups he'll need to win over this year, chief among them is the Jewish community, whom he has offended in the past. Not only that, but his skin color will be used in dirty ways by the Bush campaign, and Jackson himself has never been elected to a political office - a weak spot for Jesse. Jackson will need to put in the lord's work to make this race close, but by god - he's going to do it.",
"color_hex": "#709cdf",
"secondary_color_hex": "#90C0FF",
"is_active": 1,
"image_url": "https://i.imgur.com/tlV1H1r.png",
"electoral_victory_message": "
In spite of a hard-fought challenge from George Bush, you have held on to succeed Ronald Reagan.
You were always the favorite to win, but a lot could have gone wrong. On the political front, you can work a Democratic House to overturn the worst excesses of Reagan. Internationally, you can hopefully oversee a period of relaxed tension with the Soviet Union.
", "electoral_loss_message": "In spite of you being the favorite, things just never seemed to click once the real campaigning began.
Time will tell if Bush governs as a moderate, or a staunch conservative. Many Democrats feel that this election was yours to lose, and it seems unlikely that you will be welcome to run again in four years. Your term as Governor, however, runs through 1991.
", "no_electoral_majority_message": "Although the Electoral College was tied, the Democrats have won a solid majority in the House, and will elevate Michael Dukakis to the Presidency.
On the political front, you can work a Democratic House to overturn the worst excesses of Reagan. Internationally, you can hopefully oversee a period of relaxed tension with the Soviet Union.
", "description_as_running_mate": "'", "candidate_score": 1, "running_mate": false } }, { "model": "campaign_trail.candidate", "pk": 154, "fields": { "first_name": "Ron", "last_name": "Paul", "election": 15, "party": "Libertarian", "state": "Texas", "priority": 3, "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": 1, "running_mate": false } }, { "model": "campaign_trail.candidate", "pk": 155, "fields": { "first_name": "Lyndon", "last_name": "LaRouche/Other", "election": 15, "party": "Independent", "state": "Virginia", "priority": 4, "description": "'", "color_hex": "#37c127", "secondary_color_hex": "#A1FFA1", "is_active": 0, "image_url": "'", "electoral_victory_message": "'", "electoral_loss_message": "'", "no_electoral_majority_message": "'", "description_as_running_mate": "'", "candidate_score": 1, "running_mate": false } }, { "model": "campaign_trail.candidate", "pk": 156, "fields": { "first_name": "Dan", "last_name": "Quayle", "election": 15, "party": "Republican", "state": "Indiana", "priority": 5, "description": "'", "color_hex": "#FF0000", "secondary_color_hex": "#FFA0A0", "is_active": 0, "image_url": "https://www.jetsimon.com/public/static/images/dan-quayle-1988.jpg", "electoral_victory_message": "'", "electoral_loss_message": "'", "no_electoral_majority_message": "'", "description_as_running_mate": "Dan Quayle is a great choice for Vice-President - on paper. I mean, he does have some good things about him, he turns out the base, he's young, and he's a Reaganite. However, he can't give a good speech to save his life and he does little to appeal to moderates. Regardless, he should be a fine choice if you don't give him too many major speaking roles.", "candidate_score": 0, "running_mate": true } }, { "model": "campaign_trail.candidate", "pk": 159, "fields": { "first_name": "Carl", "last_name": "Levin", "election": 15, "party": "Democratic", "state": "Michigan", "priority": 8, "description": "'", "color_hex": "#0000FF", "secondary_color_hex": "#90C0FF", "is_active": 0, "image_url": "https://i.imgur.com/Ju0rQ3h.png", "electoral_victory_message": "'", "electoral_loss_message": "'", "no_electoral_majority_message": "'", "description_as_running_mate": "
It's no secret that party leaders view you with discontent, and the inverse with you. But, they still feel that this race is worth salvaging, and have given you a few options - chief among them is the junior senator from Michigan: Carl Milton Levin. Levin's biggest upside is that he would excel in reclaiming lost support from moderates, and his religion would be invaluable given your terrible relationship with the Jews nationwide. He is also liberal and gives you good geographic balance in Michigan and the Rustbelt, although your bona fides on unions are pretty good anyway.
However, it must be stated that Levin is very averse to the idea of serving as your running mate, but combined pressure from party leaders combined with a sense of duty has forced him to acquiesce, so he might not be the most energetic campaigner. He's also not a miracle worker, you need to work with the Jewish community as well.",
"candidate_score": 0,
"running_mate": true
}
},
{
"model": "campaign_trail.candidate",
"pk": 160,
"fields": {
"first_name": "Pat",
"last_name": "Leahy",
"election": 15,
"party": "Democratic",
"state": "Vermont",
"priority": 9,
"description": "'",
"color_hex": "#0000FF",
"secondary_color_hex": "#90C0FF",
"is_active": 0,
"image_url": "https://i.imgur.com/9sKCebX.pngww.jetsimon.com/public/static/images/john-glenn-1988.jpg",
"electoral_victory_message": "'",
"electoral_loss_message": "'",
"no_electoral_majority_message": "'",
"description_as_running_mate": "
It's no secret that party leaders view you with discontent, and the inverse with you. But, they still feel that this race is worth salvaging, and have given you a few options - one of them being the senior senator from Vermont, Patrick Joseph Leahy. Leahy would be a fine running mate in all capacity, having the experience needed to beat back Bush's inexperience argument. Leahy would give your campaign good rural appeal, as well as secure Vermont and some New England states. Also, a vocal supporter of yours, Burlington Mayor Sanders approves of him.
Unfortunately, given his strongly liberal voting record, he doesn't appeal to moderates very well, despite his status as chair of the Senate Agricultural Committee. And apart from Vermont, he doesn't give a whole lot of geographic balance, New England will swing to your column if you run a good campaign anyways, barring New Hampshire.",
"candidate_score": 0,
"running_mate": true
}
},
{
"model": "campaign_trail.candidate",
"pk": 161,
"fields": {
"first_name": "Claiborne",
"last_name": "Pell",
"election": 15,
"party": "Democratic",
"state": "Rhode Island",
"priority": 10,
"description": "'",
"color_hex": "#0000FF",
"secondary_color_hex": "#90C0FF",
"is_active": 0,
"image_url": "https://i.imgur.com/sLUCLm6.png",
"electoral_victory_message": "'",
"electoral_loss_message": "'",
"no_electoral_majority_message": "'",
"description_as_running_mate": "
It's no secret that party leaders view you with discontent, and the inverse with you. But, they still feel that this race is worth salvaging, and have given you a few options - one of them being the senior senator of Rhode Island, Claiborne de Borda Pell. Pell would come as a shock, given his desire to stay out of the spotlight, but he could come in handy if Bush seeks to make experience a main issue in the campaign, as Pell has served in the Senate since 1961. Like Leahy, Pell would help you in New England but could help on both the coasts as well, if you wish.
However, Pell isn't Jewish and is a bit of an eccentric person, which could come up. Pell also suffers from a lack of moderate appeal, and while his foreign policy chops could make up for it, many people see him as a walking talking example of the stereotype of the Democratic Party being the party for the liberal, coastal elite. RI is also safely blue.",
"candidate_score": 0,
"running_mate": true
}
},
{
"model": "campaign_trail.candidate",
"pk": 162,
"fields": {
"first_name": "Fritz",
"last_name": "Hollings",
"election": 15,
"party": "Democratic",
"state": "South Carolina",
"priority": 11,
"description": "'",
"color_hex": "#0000FF",
"secondary_color_hex": "#90C0FF",
"is_active": 0,
"image_url": "https://i.imgur.com/nYRNPOn.png",
"electoral_victory_message": "'",
"electoral_loss_message": "'",
"no_electoral_majority_message": "'",
"description_as_running_mate": "
It's no secret that party leaders view you with discontent, and the inverse with you. But, they still feel that this race is worth salvaging, and have given you a few options - one of them being the junior senator from South Carolina, Ernest Frederick \"Fritz\" Hollings. Despite serving with Strom Thurmond, Hollings is a key ally of yours, being one of the only white southern congressmen to openly endorse you this year. Hollings would assuage concerns of your \"radicalness\" and block off that avenue of attack from the Bush campaign. He can also help with the South.
It must be stated though that Hollings isn't Jewish, and he does carry many conservative beliefs, such as on social issues. Additionally, he would sharply disappoint your youthful, activist base, and many of your stark policy differences could be opened further if Bush seeks to twist the knife. South Carolina might be too far gone as well. ",
"candidate_score": 0,
"running_mate": true
}
},
{
"model": "campaign_trail.candidate",
"pk": 163,
"fields": {
"first_name": "Andre",
"last_name": "Marrou",
"election": 15,
"party": "Libertarian",
"state": "Alaska",
"priority": 12,
"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,
"running_mate": true
}
},
{
"model": "campaign_trail.candidate",
"pk": 164,
"fields": {
"first_name": "Other",
"last_name": "Other",
"election": 15,
"party": "Independent",
"state": "Pennsylvania",
"priority": 13,
"description": "'",
"color_hex": "#00C100",
"secondary_color_hex": "#A1FFA1",
"is_active": 0,
"image_url": "'",
"electoral_victory_message": "'",
"electoral_loss_message": "'",
"no_electoral_majority_message": "'",
"description_as_running_mate": "'",
"candidate_score": 0,
"running_mate": true
}
}
]
campaignTrail_temp.running_mate_json = [
{
"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": 101,
"fields": {
"candidate": 153,
"running_mate": 159
}
},
{
"model": "campaign_trail.running_mate",
"pk": 98,
"fields": {
"candidate": 152,
"running_mate": 156
}
},
{
"model": "campaign_trail.running_mate",
"pk": 102,
"fields": {
"candidate": 153,
"running_mate": 160
}
},
{
"model": "campaign_trail.running_mate",
"pk": 103,
"fields": {
"candidate": 153,
"running_mate": 161
}
},
{
"model": "campaign_trail.running_mate",
"pk": 104,
"fields": {
"candidate": 153,
"running_mate": 162
}
}
]
campaignTrail_temp.credits = "WNDIUA (Jimbo), original mod by @viviankesandre"
campaignTrail_temp.global_parameter_json = [
{
"model": "campaign_trail.global_parameter",
"pk": 1,
"fields": {
"vote_variable": 1.125,
"max_swing": 0.15,
"start_point": 0.94,
"candidate_issue_weight": 10,
"running_mate_issue_weight": 3,
"issue_stance_1_max": -0.71,
"issue_stance_2_max": -0.3,
"issue_stance_3_max": -0.125,
"issue_stance_4_max": 0.125,
"issue_stance_5_max": 0.3,
"issue_stance_6_max": 0.71,
"global_variance": 0.01,
"state_variance": 0.005,
"question_count": 30,
"default_map_color_hex": "#C9C9C9",
"no_state_map_color_hex": "#999999"
}
}
]
campaignTrail_temp.opponents_default_json = [
{
"election": 15,
"candidates": [
152,
153,
154,
155
]
}
]
campaignTrail_temp.opponents_weighted_json = [
{
"election": 15,
"candidates": [
152,
153,
154,
155
]
}
]
campaignTrail_temp.temp_election_list = [
{
"id": 15,
"year": 1988,
"is_premium": 0,
"display_year": "1988RB"
}
]
jet_data = {
"headerColor": "#70006d",
"windowColor": "#f5e3ff",
"containerColor": "#8d8dcc",
"innerWindowColor": "#e2d3c7",
"bannerImageUrl": "https://i.imgur.com/Ooe208H.png",
"backgroundImageUrl": "https://media-cldnry.s-nbcnews.com/image/upload/t_fit-760w,f_auto,q_auto:best/newscms/2019_20/2862801/190519-black-vote-jesse-jackson-shirley-chisholm-cs-957a.jpg",
"endingTextColor": "#000000",
"customQuote": "If you fall behind, run faster. Never give up, never surrender, and rise up against the odds.",
"gameTitle": "THE RAINBOW TRAIL"
}
//#startcode
campaignTrail_temp.modBoxTheme = {
"header_color": "#70006d",
"header_text_color": "#ffffff",
"description_text_color": "#000000",
"description_background_color": "#f5e3ff",
"main_color": "#f5e3ff",
"secondary_color": "#8d8dcc",
"ui_text_color": "#FFFFFF"
}
corrr = '\n