/* * Mod Title: 2020 Lithuania - Plagues and Plaques * Mod Author: Augenis * Mod Version: 1.0.0 * Mod Description: 2020 Lithuanian parliamentary election * * Coding License: Apache License 2.0 * Writing License: Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) * * For the coding in this mod, I hereby release the code under the terms and conditions of the Apache License 2.0. The full text of the license can be found at: * https://choosealicense.com/licenses/apache-2.0/ * * For the writing in this mod, including documentation, text files, and other non-software written works, I hereby release the content under the terms and conditions of the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) license. The full text of the license can be found at: * https://creativecommons.org/licenses/by-nc/4.0/legalcode * * By using, distributing, or modifying this mod, you agree to abide by the terms and conditions of both the Apache License 2.0 and the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) license. */ campaignTrail_temp.modBoxTheme = { "header_color": "#FDB913", "header_text_color": "#000000", "description_text_color": "#000000", "description_background_color": "#00ea96", "main_color": "#009d65", "secondary_color": "#C1272D", "ui_text_color": "#fefcfc" } function updateCandidateForm() { try { const form = document.querySelector("#candidate_form form"); const heading = form.querySelector("h3"); heading.textContent = "Please select your party:"; } catch {} } window.setInterval(updateCandidateForm,200) function updateRunningMateForm() { try { const form = document.querySelector("#running_mate_form form"); const heading = form.querySelector("h3"); heading.textContent = "Please select your chairman:"; } catch {} } window.setInterval(updateRunningMateForm,200) function removeCandidateSummary() { try { const candidateSummary = document.querySelector("#candidate_summary"); if (candidateSummary) { const ulList = candidateSummary.querySelector("ul"); if (ulList) { candidateSummary.removeChild(ulList); } } } catch {} } window.setInterval(removeCandidateSummary,200) let z = new MutationObserver((mutationsList, observer) => { let runningMateSummary = document.querySelector("#running_mate_summary"); if (runningMateSummary && runningMateSummary.children[0].children[2].innerHTML != runningMateSummary.children[0].children[2].innerHTML.replaceAll("Home State", "Constituency")) { runningMateSummary.children[0].children[2].innerHTML = runningMateSummary.children[0].children[2].innerHTML.replaceAll("Home State", "Constituency"); } }); z.observe(document, { subtree: true, childList: true }); 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 (Parallel Vote)'; // Remove second option select.querySelector('option[value="2"]').remove(); // change h3 text const h3 = form.querySelector('h3'); h3.textContent = 'How would you like the seats to be allocated?'; } catch {} } window.setInterval(modifyForm,200) function changeOpponentSelectionDescription() { try { const opponentSelectionDescription = document.getElementById("opponent_selection_description_window"); opponentSelectionDescription.innerHTML = `

Use the default method of allocating seats in the Lithuanian Seimas.

Lithuania uses a system of parallel voting. This means that half of the seats (70 of 141) are distributed with a nationwide list-based proportional system, with a 5 percent threshold, while the other half (71 of 141) are elected in single-member constituencies. Citizens receive two ballots on the first election day on October 11th, then, if their constituency has a second round election, vote a second time on October 25th.

This method means that some proportionality is retained, but minor parties can still win some single-member constituencies and enter parliament regardless. Winning a majority of the seats is very difficult.

Alongside gathering votes, your answers in the game will also affect which parties' voters will be more likely to vote for your candidates in the second round.

`; } catch {} } window.setInterval(changeOpponentSelectionDescription,200) campaignTrail_temp.election_json = JSON.parse("[{\"model\": \"campaign_trail.election\", \"pk\": 9, \"fields\": {\"year\": 2020, \"summary\": \"The 'revolt' of the Peasants in 2016 ushered in a government led by the Union of Farmers and Greens, in coalition with Social Democrats and various populist forces. Worldwide economic upturn has left the economy growing and migration to the West decreasing, but the cabinet has gone through several humiliating scandals and internal crises.

As 2020 approaches, the Peasants are attacked from the 'Right' and their fellow 'Left'. The Homeland Union seeks to paint their opponents as incompetent pro-Russian populists, while the Social Democrats have split from their former allies and chart an attempt to recover their position. In a campaign that is about to be interrupted by the COVID-19 pandemic, will the 'Right' return to power after eight years in opposition, or will they falter at the finish line once more?

\", \"image_url\": \"https://i.imgur.com/E0CRiOp.png\", \"winning_electoral_vote_number\": 270, \"advisor_url\": \"https://jetsimon.com/cts-media/public/2020LT_init_0.png\", \"recommended_reading\": \"


Thank you for playing 2020 Lithuania!

This is a scenario that seeks to simulate the 2020 Lithuanian parliamentary election, the most recent parliamentary election in Lithuania. Lithuania is my home country, and I had considered a scenario set in one of our elections for a while. However, I was held back, first by our complex electoral system (that is still inaccurate in this mod - it assumes that proportional and constituency votes are the same, when in fact there's a lot of split-ticket voting), and second by worry that our political system, topics and questions would be too obscure for anyone to be interested to play this. Yet, if you are reading this, it seems I succeeded! Feel free to ping me on the TCT server or message me with thoughts or feedback on this mod!

If you liked this mod, then make sure to also try my other scenario on the loader - 1993: Post-Communist USA (or, if you already played it, perhaps you noticed the allusions in some of the questions 😉). Also, give a look to my other scenario, that is not on the loader - 1930 Weimar - which deals with a heavier topic, namely the rise of National Socialism in Weimar Germany.

Further Reading

Basic information (English):

Mindaugas Jurkynas, 'Change in a Time of Pandemic: the 2020 parliamentary elections in Lithuania'
'Who's who in Lithuania's 2020 parliamentary election – explainer'
Konrad-Adenauer-Stiftung, 'Lithuania Has Voted for Change'

In-depth introduction (Lithuanian):

Ainė Ramonaitė, 'Political Anatomy of Post-Soviet Lithuania'
Mažvydas Jastramskis, 'Is It Possible to Predict Seimas Elections? The Three-Body Problem in Lithuanian Politics'

Where are they now?

So what is the historical result? Who actually won, and what happened to all the characters you can play as?

The election: An intense race that started as a seemingly inevitable TS-LKD victory and ended up a nail-biter due to LVŽS recovering in the polls. Still, it was won by the 'Right'. A coalition of TS-LKD, LRLS and Freedom (so Conservatives and Liberals) was formed and remains the incumbent government.

The Šimonytė Cabinet: Immediately after the election, quarantine was imposed, causing wide controversy. Same-sex partnership law was proposed in the Seimas several times, but has (as of time of writing, September 2023) failed every single time due to opposition from TS-LKD's 'Christian Democrat' wing. The same happened to attempts to decriminalize marijuana. As a result, tensions between TS-LKD and Freedom have mounted and internal conflicts happen almost daily.

The government's pro-LGBT stance was answered by the formation of a wide anti-LGBT, anti-vaccination and anti-'Right' movement, the Lithuanian Family Movement, which organizes protests and has splintered into several political parties.

Gabrielius Landsbergis: After the election, he was appointed Minister of Foreign Affairs. Under his leadership, Lithuania challenged China over the Taiwan question, leading to a conflict that became international news, and it also became a vanguard of pro-Ukrainian policy in NATO during the Russian invasion of Ukraine. However, his popularity has plummeted and it is believed that he intends to resign from his party's leadership sometime before or after 2024.

Ramūnas Karbauskis: After losing the election, he resigned from his parliamentary seat in protest, turned sharply towards anti-LGBT rhetoric and pulled out of the National Agreement on Defense in 2022. His party split - Saulius Skvernelis left in 2021 and established the 'Union of Democrats', a party which intends to be a more moderate continuation of LVŽS' 'statist' economic policy.

Gintautas Paluckas: After losing the election, he resigned as chairman in early 2021. A leadership race took place between Juozas Olekas, the candidate of the conservative wing, and Vilija Blinkevičiūtė - the latter won, and she is the incumbent chairman. She retained some of Paluckas' reform (Gudžinskas is one of her vice-chairpeople), but is considered more in the party centre. Under her leadership, thanks to her personal popularity, the party regained its popularity and is now first in the polls. It is widely believed that the Social Democrats will win the 2024 election.

Plaque of Jonas Noreika: It's still there.

Statue to Petras Cvirka: Removed in 2021.

The electoral threshold: The LVŽS attempted to lower it to 3% and received a presidential veto. They failed to overturn the veto by one vote. It is currently still at 5%.

The National Development Bank: More or less forgotten, even by the LVŽS itself, even though it was their big agenda in 2020.

Non-Lithuanian letters in documents: The language war was finally finished by the Šimonytė Cabinet. Non-Lithuanian letters in documents have been legalized and society has basically forgotten the question, it is no longer on the agenda.



\", \"has_visits\": 0, \"no_electoral_majority_image\": \"/static/images/2012-no-majority.jpg\", \"site_description\":\"It is finally 2020. The Conservatives and the Social Democrats rise in rebellion against the Peasants' government in Lithuania.
In a campaign that is about to be interrupted by the COVID-19 pandemic, will the 'Right' return to power after eight years in opposition, or will they falter at the finish line once more?\", \"site_image\": \"https://i.imgur.com/TWYvCmD.jpg\"}}]"); RecReading=true campaignTrail_temp.candidate_json = JSON.parse("[{\"model\": \"campaign_trail.candidate\", \"pk\": 77, \"fields\": {\"first_name\": \" \", \"last_name\": \"TS-LKD\", \"election\": 9, \"party\": \"Republican\", \"state\": \"Ohio\", \"priority\": 1, \"description\": \"Playable.
  • Name: Homeland Union - Lithuanian Christian Democrats (TS-LKD)
  • The Homeland Union, also known as the Conservatives, is the successor to the Sąjūdis, the anti-communist movement which led Lithuania towards independence in 1990 and reorganized into a conservative party. It was traditionally supported by loyal urban voters, former deportees, religious voters and nationalists - however, since 2015, when Gabrielius Landsbergis was elected chairman, it began to pivot towards young liberal voters in Vilnius.

    The TS-LKD received the largest amount of votes in 2016, but lost to LVŽS in single-member constituencies and was forced into opposition. Antagonism between the two parties has increasingly turned this election into a two-way race between pro-Western urban liberalism and pragmatic ruralism. Can the TS-LKD avoid the mistakes of 2016 and form a large liberal-conservative bloc, or will it falter to 'the Left' once again?


    \", \"color_hex\": \"#00A59B\", \"secondary_color_hex\": \"#00A59B\", \"is_active\": 1, \"image_url\": \"https://i.imgur.com/70jKvNm.jpg\", \"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\": \" \", \"last_name\": \"LVŽS\", \"election\": 9, \"party\": \"Democrat\", \"state\": \"Alaska\", \"priority\": 2, \"description\": \"Playable.
  • Name: Lithuanian Farmers and Greens Union (LVŽS)
  • The Lithuanian Farmers and Greens Union, commonly known as the Peasants, is the largest party in the Seimas and the leading force in the Skvernelis Cabinet. It was a minor party until 2016, when it suddenly surged to dominance due to dissatisfaction with the party system and the support of popular independent former Minister of Interior Saulius Skvernelis, who is the current Prime Minister.

    Joined by many new figures during this surge, the LVŽS is heterodox, but promised a technocratic government of ‘change’ and was mainly supported by older, rural, socially conservative 'Left' voters. Can it retain its positions in spite of falling support and the COVID pandemic, and prove wrong the unspoken law of Lithuanian politics - that incumbents never get reelected?


    \", \"color_hex\": \"#00A651\", \"secondary_color_hex\": \"#00A651\", \"is_active\": 1, \"image_url\": \"https://i.imgur.com/rf7ul11.jpg\", \"electoral_victory_message\": \"

    Congratulations! You have won the 2000 election.

    You have an agenda to fulfill and a Real America to defend for the next four years. Will you follow through with the concessions to progressives on universal healthcare, or will you focus on your own planks like education reform and the Equal Rights Amendment? If you are as successful as Clinton, 2004 will be a cakewalk.

    Radical Rex and his paleoconservative agenda will, hopefully, be repudiated by the Republicans in 2004. Let's hope he does not enter history as another Goldwater, shaping his party into a right-wing turn in spite of his loss.

    \", \"electoral_loss_message\": \"

    Sorry! You have lost the 2000 election.

    It just seems all the little things affecting your campaign were too much to handle. Maybe you should have emphasized your relation to Clinton more. Maybe you should have moved politically left to mend fences with Fitzgerald's clique. Maybe you should have moved politically RIGHT to get more rural votes. Whatever it is, Rex Martin will be the next president. As it has since 94, the House and Senate will remain Republican, and Radical Rex will have a mostly free hand to enact his extreme agenda.

    You are still Governor of Alaska, but who knows if you will keep that position for long? The next elections are in 2002, and Alaska looks quite red... A run in 2004 is not impossible, but it's not likely that the party will give you or your faction another shot. It seems Fitzgerald or another more progressive candidate will position themselves as the frontrunner then.

    \", \"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 Rex Martin and a Republican majority, the United States can expect to experience his radical agenda in the next four years. At least you are still Governor of Alaska.

    \", \"description_as_running_mate\": \"''\", \"candidate_score\": 1.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 79, \"fields\": {\"first_name\": \" \", \"last_name\": \"LSDP\", \"election\": 9, \"party\": \"Green\", \"state\": \"Connecticut\", \"priority\": 3, \"description\": \"Playable.
  • Name: Social Democratic Party of Lithuania (LSDP)
  • The Social Democratic Party of Lithuania is the oldest party in the country, refounded in 1989 by several activists and anti-Soviet dissidents. It merged with the successor party to the Communists, the LDDP, in 2001 and led several governments since. However, the rise of the LVŽS undercut their support, and they were forced to accept a lesser role in the Skvernelis Cabinet.

    The LSDP’s new chairman, Gintautas Paluckas, ended their partnership with the Peasants in 2017 and turned the party to a more genuine social democratic course, which caused much of the party's old guard to split into the LSDDP. It enters the 2020 election as a distant third to the Conservatives and Peasants - can it redeem itself and regain the power it held before 2016?


    \", \"color_hex\": \"#FF0000\", \"secondary_color_hex\": \"#FF0000\", \"is_active\": 1, \"image_url\": \"https://i.imgur.com/E5GTkEf.png\", \"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\": \" \", \"last_name\": \"LRLS\", \"election\": 9, \"party\": \"Reform\", \"state\": \"Alabama\", \"priority\": 4, \"description\": \"Not playable, context only.
  • Name: Liberal Movement of the Republic of Lithuania (LRLS)
  • The Liberal Movement is an economically and socially liberal party which was founded in 2006. In 2015, it was a top contender in popularity polls, but collapsed after its leader, Eligijus Masiulis, was caught taking bribes from the influential MG Baltic conglomerate and was forced to resign.

    After changes in leadership and party splits, the Liberals have finally recovered somewhat under the leadership of Viktorija Čmilytė-Nielsen, but remain a secondary force in Lithuanian politics. They collect votes from affluent urban voters, but also run ‘agrarian liberal’ candidates who downplay the party’s social liberalism in several rural constituencies. It is a traditional ally of the TS-LKD, but could consider alternative allies.

    \", \"color_hex\": \"#F48100\", \"secondary_color_hex\": \"#F48100\", \"is_active\": 1, \"image_url\": \"https://i.imgur.com/hEowF4i.png\", \"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\": \"Gabrielius\", \"last_name\": \"Landsbergis\", \"election\": 9, \"party\": \"TS-LKD\", \"state\": \"Centras-Žaliakalnis\", \"priority\": 5, \"description\": \"''\", \"color_hex\": \"#FF0000\", \"secondary_color_hex\": \"#FFA0A0\", \"is_active\": 0, \"image_url\": \"https://i.imgur.com/MbMbly1.jpg\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

    Gabrielius Landsbergis is the chairman of the TS-LKD and grandson of Vytautas Landsbergis, leader of the Lithuanian independence movement in 1989-1991. Assuming the position in 2015, he has turned the party towards liberalism, such as for same-sex partnerships, while also keeping the party Europhilic, pro-free market and hawkish towards Russia and China.

    Landsbergis is not the party's Prime Minister candidate - he conceded the position to the popular independent former Minister of Finance and 2019 presidential candidate, Ingrida Šimonytė, as his family name makes him controversial among many demographics. However, he intends to guide the next government and especially its foreign policy.

    \", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 82, \"fields\": {\"first_name\": \"Gintautas\", \"last_name\": \"Paluckas\", \"election\": 9, \"party\": \"LSDP\", \"state\": \"Utena\", \"priority\": 6, \"description\": \"''\", \"color_hex\": \"#FF0000\", \"secondary_color_hex\": \"#FFA0A0\", \"is_active\": 0, \"image_url\": \"https://i.imgur.com/ss0p6bm.jpg\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

    Gintautas Paluckas is the current chairman of the LSDP and has held the position since 2017. He represents the growing ‘genuine’ social democratic wing of the party, which accepts a certain level of social liberalism such as LGBT rights and decriminalization of marijuana, while also being a lot more progressive on economic affairs. His leadership is controversial within the old guard, but gathers support from the party grassroots.

    Paluckas’ decision to split with the Peasants has alienated a potential coalition partner and caused old guard members to split into the Social Democratic Labour Party, or LSDDP, but he is confident that he can replace these losses with gains in the election. Otherwise, his brief leadership of the party might become shaky.

    \", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 83, \"fields\": {\"first_name\": \"Jessica\", \"last_name\": \"Dorsey\", \"election\": 9, \"party\": \"Republican\", \"state\": \"Maryland\", \"priority\": 7, \"description\": \"''\", \"color_hex\": \"#FF0000\", \"secondary_color_hex\": \"#FFA0A0\", \"is_active\": 0, \"image_url\": \"https://jetsimon.com/cts-media/public/2020LT_init_1.jpg\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

    Jessica Dorsey is a long-time moderate Republican representative from Maryland, who disagrees with Martin on most of his platform, lacks name recognition, and represents a state which is unlikely to swing Republican in this election.

    Choosing her as running mate would mainly be an attempt to stunt Bailey's gains from the historical achievement of being the first woman nominee of a major political party.

    \", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 84, \"fields\": {\"first_name\": \"Viktor\", \"last_name\": \"Uspaskich\", \"election\": 9, \"party\": \"Labour\", \"state\": \"Not running in election\", \"priority\": 8, \"description\": \"''\", \"color_hex\": \"#FF0000\", \"secondary_color_hex\": \"#FFA0A0\", \"is_active\": 0, \"image_url\": \"https://i.imgur.com/7W32YVM.jpg\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

    Viktor Uspaskich is a millionaire businessman of Russian birth who founded the Labour Party in 2003 and led it to immediate success by taking advantage of frustration with the party system, populist appeals and a successful media campaign. In a few years, it split apart and nearly disintegrated, and Uspaskich fled to Russia to hide from an arrest for tax fraud. Yet, Labour survived and entered a coalition with LSDP in 2012, while Uspaskich gained legal immunity by being elected to the European Parliament, where he sits to this day.

    Having temporarily given away leadership of the party, Uspaskich has recently returned and brought the party back from a second near death. With poll numbers surging, he is confident that his supporters will carve out a large parliamentary group and return to power once more - perhaps with the Peasants, or maybe even with the Conservatives.

    \", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 85, \"fields\": {\"first_name\": \"Ramūnas\", \"last_name\": \"Karbauskis\", \"election\": 9, \"party\": \"LVŽS\", \"state\": \"Multi-member constituency\", \"priority\": 9, \"description\": \"''\", \"color_hex\": \"#0000FF\", \"secondary_color_hex\": \"#90C0FF\", \"is_active\": 0, \"image_url\": \"https://i.imgur.com/PA3m9tE.jpg\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

    Ramūnas Karbauskis has been the chairman of LVŽS since 2009. He is a millionaire businessman and anti-alcohol activist, who was also formerly eurosceptic and allied with right-wing nationalists, but moderated his positions. He does not hold a position in the Skvernelis Cabinet, but serves as the government’s ‘grey eminence’ and spokesman.

    Within the LVŽS, he stands on the right, and tensions are slowly growing between him and Prime Minister Skvernelis. However, these two personalities are willing to work together in this election if it means that they can remain in power and stop the Conservatives.

    \", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 86, \"fields\": {\"first_name\": \"Alex\", \"last_name\": \"Markoff\", \"election\": 9, \"party\": \"Democrat\", \"state\": \"North Dakota\", \"priority\": 10, \"description\": \"''\", \"color_hex\": \"#0000FF\", \"secondary_color_hex\": \"#90C0FF\", \"is_active\": 0, \"image_url\": \"https://jetsimon.com/cts-media/public/2020LT_init_2.png\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

    Alex Markoff is a Russian-American Senator for North Dakota and a representative of the conservative wing of the party - focused on economic concerns while either pushing back against social issues or seeking to keep them in the back burner. He endorsed Bailey in the primaries and agrees with her on several policy points.

    Choosing Markoff as her running mate would double down on rural, vaguely socially conservative populism, and inevitably lead to the left abandoning the ticket. Bailey's aim would then be to cause a realignment in the party system at large.

    \", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 87, \"fields\": {\"first_name\": \"Aušrinė\", \"last_name\": \"Armonaitė\", \"election\": 9, \"party\": \"Freedom\", \"state\": \"Lithuanians Abroad\", \"priority\": 11, \"description\": \"''\", \"color_hex\": \"#0000FF\", \"secondary_color_hex\": \"#90C0FF\", \"is_active\": 0, \"image_url\": \"https://i.imgur.com/6aasavu.jpg\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

    Aušrinė Armonaitė is the current chairwoman of the Freedom Party and a former Liberal Movement member of the Seimas. At 31 years old, she is the youngest leader of any political party active in Lithuania. In the party, she shares power with Remigijus Šimašius, who is the incumbent Mayor of Vilnius. In the Seimas, she was one of the Liberal Movement's most progressive representatives.

    She carries high support among the educated youth in Vilnius, which further adds upon Freedom's weakness - or strength - that being its focus on liberal, urban, Western values voters.

    \", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 88, \"fields\": {\"first_name\": \"Tucker\", \"last_name\": \"Reed\", \"election\": 9, \"party\": \"Democrat\", \"state\": \"West Virginia\", \"priority\": 12, \"description\": \"''\", \"color_hex\": \"#0000FF\", \"secondary_color_hex\": \"#90C0FF\", \"is_active\": 0, \"image_url\": \"https://jetsimon.com/cts-media/public/2020LT_init_3.jpg\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

    Tucker Reed is a Senator for West Virginia who endorsed Bailey early in the Democratic primaries. He represents a similar working class populist current as her, but has a more progressive record, which would help mend fences with the party's left somewhat. West Virginia is likely to be a swing state in this election.

    However, Reed is a staunch foreign policy hawk, and in a race which is likely to be defined by Martin's interventionist foreign policy proposals and their backlash, this can either help or hurt Bailey depending on her strategy.

    \", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 89, \"fields\": {\"first_name\": \"Winona\", \"last_name\": \"LaDuke\", \"election\": 9, \"party\": \"Green\", \"state\": \"Minnesota\", \"priority\": 13, \"description\": \"''\", \"color_hex\": \"#00C100\", \"secondary_color_hex\": \"#A1FFA1\", \"is_active\": 0, \"image_url\": \"/static/images/winona-laduke-2000.jpg\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

    Winona LaDuke is a Native American activist of Ojibwe ancestry. She lives in Minnesota and has been active in attempts to regain land that once belonged to various American Indian tribes. She has written a book and started organizations in support of this issue.

    \", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 90, \"fields\": {\"first_name\": \"Viktorija\", \"last_name\": \"Čmilytė-Nielsen\", \"election\": 9, \"party\": \"LRLS\", \"state\": \"Old Town-Žvėrynas\", \"priority\": 14, \"description\": \"

    Viktorija Čmilytė-Nielsen is a former competitive chess player who has served as the chairwoman of the Liberal Movement since 2019. She entered politics in 2015, when she replaced Remigijus Šimašius as Member of the Seimas after he was elected mayor of Vilnius - however, unlike many other Vilnius liberals, she did not leave the LRLS for the Freedom Party and instead amassed power within it. In 2019, she briefly served as Leader of the Opposition.

    As chairwoman, Čmilytė successfully managed the fallout of the Freedom Party split and managed to keep the party alive in spite of pessimistic predictions of its death ever since the Masiulis corruption scandal in 2015. Relations between the two parties are surprisingly amicable, and Čmilytė expects them both to join forces with an empowered TS-LKD after the election for a centre-right coalition.

    \", \"color_hex\": \"#FFFF00\", \"secondary_color_hex\": \"#FFFFC0\", \"is_active\": 0, \"image_url\": \"https://i.imgur.com/LmcQxUh.jpg\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"

    Viktorija Čmilytė-Nielsen is a former competitive chess player who has served as the chairwoman of the Liberal Movement since 2019. She entered politics in 2015, when she replaced Remigijus Šimašius as Member of the Seimas after he was elected mayor of Vilnius - however, unlike many other Vilnius liberals, she did not leave the LRLS for the Freedom Party and instead amassed power within it. In 2019, she briefly served as Leader of the Opposition.

    As chairwoman, Čmilytė successfully managed the fallout of the Freedom Party split and kept the party alive in spite of pessimistic predictions of its death ever since the Masiulis corruption scandal in 2015. Relations between the two parties are surprisingly amicable, and Čmilytė expects them both to join forces with an empowered TS-LKD after the election for a centre-right coalition.\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 13761, \"fields\": {\"first_name\": \" \", \"last_name\": \"Freedom\", \"election\": 9, \"party\": \"Reform\", \"state\": \"Alabama\", \"priority\": 4, \"description\": \"Not playable, context only.

  • Name: Freedom Party
  • The Freedom Party was established by former Liberals in Vilnius, including Mayor Remigijus Šimašius, in 2019. It is unabashedly socially liberal, the first party in the country to demand same-sex marriage, and follows a liberal platform of drug decriminalization, carbon neutrality, and limited taxation. The majority of its voters are in Vilnius, educated and leaning young.

    Though election observers are sceptical about its chances, Freedom organizes a very energetic and optimistic campaign and aims to put the issues it represents on the national agenda. It is untested in the national arena, but it is presumed that they will lean towards cooperation with TS-LKD.

    \", \"color_hex\": \"#F6005E\", \"secondary_color_hex\": \"#F6005E\", \"is_active\": 1, \"image_url\": \"https://i.imgur.com/G6yC2l1.png\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"''\", \"candidate_score\": 1.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 13838, \"fields\": {\"first_name\": \" \", \"last_name\": \"LLRA-KŠS\", \"election\": 9, \"party\": \"LLRA-KŠS\", \"state\": \"Alabama\", \"priority\": 4, \"description\": \"''\", \"color_hex\": \"#781323\", \"secondary_color_hex\": \"#781323\", \"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\": 13915, \"fields\": {\"first_name\": \" \", \"last_name\": \"Labour\", \"election\": 9, \"party\": \"Reform\", \"state\": \"Alabama\", \"priority\": 4, \"description\": \"Not playable, context only.
  • Name: Labour Party
  • The Labour Party was established by millionaire Russian businessman Viktor Uspaskich in 2003. Through dissatisfaction with the party system and populist appeals, it became one of the largest parties in the country, but was soon taken down by corruption and tax fraud scandals.

    It limped on until last year, when Uspaskich, who had previously fled the country to avoid prosecution, returned and gave the party a boost through his name recognition. It is supported by lower class, poorer and rural voters nostalgic towards the Soviet era, and though it currently supports LVŽS in the Seimas, it is flexible enough to work with almost any coalition for power.

    \", \"color_hex\": \"#1D578C\", \"secondary_color_hex\": \"#1D578C\", \"is_active\": 1, \"image_url\": \"https://i.imgur.com/zCF6Exd.png\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"''\", \"candidate_score\": 1.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 13992, \"fields\": {\"first_name\": \" \", \"last_name\": \"LSDDP\", \"election\": 9, \"party\": \"Reform\", \"state\": \"Alabama\", \"priority\": 4, \"description\": \"''\", \"color_hex\": \"#C1272D\", \"secondary_color_hex\": \"#C1272D\", \"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\": 14069, \"fields\": {\"first_name\": \" \", \"last_name\": \"CP-Taut.\", \"election\": 9, \"party\": \"Reform\", \"state\": \"Alabama\", \"priority\": 4, \"description\": \"''\", \"color_hex\": \"#799B6F\", \"secondary_color_hex\": \"#799B6F\", \"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\": 14146, \"fields\": {\"first_name\": \" \", \"last_name\": \"NS\", \"election\": 9, \"party\": \"Reform\", \"state\": \"Alabama\", \"priority\": 4, \"description\": \"''\", \"color_hex\": \"#FF8080\", \"secondary_color_hex\": \"#FF8080\", \"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\": 14223, \"fields\": {\"first_name\": \" \", \"last_name\": \"LT\", \"election\": 9, \"party\": \"Reform\", \"state\": \"Alabama\", \"priority\": 4, \"description\": \"''\", \"color_hex\": \"#FBBA00\", \"secondary_color_hex\": \"#FBBA00\", \"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\": 14300, \"fields\": {\"first_name\": \" \", \"last_name\": \"LŽP\", \"election\": 9, \"party\": \"Reform\", \"state\": \"Alabama\", \"priority\": 4, \"description\": \"''\", \"color_hex\": \"#92C83E\", \"secondary_color_hex\": \"#92C83E\", \"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\": 14377, \"fields\": {\"first_name\": \" \", \"last_name\": \"Minor/Indep.\", \"election\": 9, \"party\": \"Reform\", \"state\": \"Alabama\", \"priority\": 4, \"description\": \"''\", \"color_hex\": \"#808080\", \"secondary_color_hex\": \"#808080\", \"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\": 91, \"fields\": {\"first_name\": \"Winona\", \"last_name\": \"LaDuke\", \"election\": 9, \"party\": \"Green\", \"state\": \"Minnesota\", \"priority\": 13, \"description\": \"''\", \"color_hex\": \"#00C100\", \"secondary_color_hex\": \"#A1FFA1\", \"is_active\": 0, \"image_url\": \"/static/images/winona-laduke-2000.jpg\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"''\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 92, \"fields\": {\"first_name\": \"Winona\", \"last_name\": \"LaDuke\", \"election\": 9, \"party\": \"Green\", \"state\": \"Minnesota\", \"priority\": 13, \"description\": \"''\", \"color_hex\": \"#00C100\", \"secondary_color_hex\": \"#A1FFA1\", \"is_active\": 0, \"image_url\": \"/static/images/winona-laduke-2000.jpg\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"''\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 93, \"fields\": {\"first_name\": \"Winona\", \"last_name\": \"LaDuke\", \"election\": 9, \"party\": \"Green\", \"state\": \"Minnesota\", \"priority\": 13, \"description\": \"''\", \"color_hex\": \"#00C100\", \"secondary_color_hex\": \"#A1FFA1\", \"is_active\": 0, \"image_url\": \"/static/images/winona-laduke-2000.jpg\", \"electoral_victory_message\": \"''\", \"electoral_loss_message\": \"''\", \"no_electoral_majority_message\": \"''\", \"description_as_running_mate\": \"''\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 94, \"fields\": {\"first_name\": \" \", \"last_name\": \"Other Parties\", \"election\": 9, \"party\": \"Green\", \"state\": \"Minnesota\", \"priority\": 13, \"description\": \"Not playable, context only.







    \", \"color_hex\": \"#00C100\", \"secondary_color_hex\": \"#A1FFA1\", \"is_active\": 1, \"image_url\": \"https://i.imgur.com/LTs0OYw.jpg\", \"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\": 991, \"fields\": {\"candidate\": 77, \"running_mate\": 81}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 995, \"fields\": {\"candidate\": 78, \"running_mate\": 85}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 998, \"fields\": {\"candidate\": 79, \"running_mate\": 82}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 999, \"fields\": {\"candidate\": 80, \"running_mate\": 90}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 1000, \"fields\": {\"candidate\": 13761, \"running_mate\": 87}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 1001, \"fields\": {\"candidate\": 13838, \"running_mate\": 83}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 1002, \"fields\": {\"candidate\": 13915, \"running_mate\": 84}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 1003, \"fields\": {\"candidate\": 13992, \"running_mate\": 86}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 1004, \"fields\": {\"candidate\": 14069, \"running_mate\": 88}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 1005, \"fields\": {\"candidate\": 14146, \"running_mate\": 89}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 1006, \"fields\": {\"candidate\": 14233, \"running_mate\": 91}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 1007, \"fields\": {\"candidate\": 14300, \"running_mate\": 92}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 1008, \"fields\": {\"candidate\": 14377, \"running_mate\": 93}}]"); campaignTrail_temp.opponents_default_json = JSON.parse("[{\"election\": 9, \"candidates\": [77, 78, 79, 80, 13761, 13838, 13915, 13992, 14069, 14146, 14223, 14300, 14377]}]"); campaignTrail_temp.temp_election_list = [{"id": 9, "year": 2020, "is_premium": 0, "display_year": "2020LT"}]; 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\": 1, \"candidate_issue_weight\": 10.0, \"running_mate_issue_weight\": 0.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.01, \"state_variance\": 0.005, \"question_count\": 25, \"default_map_color_hex\": \"#C9C9C9\", \"no_state_map_color_hex\": \"#999999\"}}]"); campaignTrail_temp.credits = ""; credits = function() { credits = ["Coded, researched and written by", "Augenis", "", "Playtesters", "The EG Emporium community, Thomahawk2k, Rickroll999, and several other people I sent the mod for testing", "", "Special thanks to", "Nina for the two-round constituency system and other advanced scripting", "The 2025NL team for inspiration and the D'Hondt electoral system code", "The 2000N team for the endings system, theme switching, CYOA and other code tricks", "TSPMI, for injecting with lifelong interest (or a curse) in my country's politics", "", "Music credits", "Dviračio žinios (Himnas apie konservatorius and Daina apie socialdemokratus), Gliorija (Naisių tvirtovė), Auksiniai svogūnai 2019 (Į durnių laivą rinkimai atkeliavo)", "", "Banner credits", "15min.lt", ""] text = "CREDITS:\n\n" for (i in credits) { text += credits[i] + "\n" } alert(text) } next0 = function() { document.getElementById("screen0").style.display = "none" document.getElementById("screen1").style.display = "initial" } next1 = function() { document.getElementById("screen0").style.display = "none" document.getElementById("screen2").style.display = "initial" } next2 = function() { document.getElementById("screen0").style.display = "none" document.getElementById("screen3").style.display = "initial" } next3 = function() { document.getElementById("screen0").style.display = "none" document.getElementById("screen4").style.display = "initial" } next4 = function() { document.getElementById("screen0").style.display = "none" document.getElementById("screen5").style.display = "initial" } next5 = function() { document.getElementById("screen0").style.display = "none" document.getElementById("screen6").style.display = "initial" } next6 = function() { document.getElementById("screen7").style.display = "none" document.getElementById("screen8").style.display = "initial" } next7 = function() { document.getElementById("screen9").style.display = "none" document.getElementById("screen10").style.display = "initial" } next8 = function() { document.getElementById("screen11").style.display = "none" document.getElementById("screen12").style.display = "initial" } next9 = function() { document.getElementById("screen13").style.display = "none" document.getElementById("screen14").style.display = "initial" } back0 = function() { document.getElementById("screen0").style.display = "initial" document.getElementById("screen1").style.display = "none" document.getElementById("screen2").style.display = "none" document.getElementById("screen3").style.display = "none" document.getElementById("screen4").style.display = "none" document.getElementById("screen5").style.display = "none" document.getElementById("screen6").style.display = "none" } back1 = function() { document.getElementById("screen7").style.display = "initial" document.getElementById("screen8").style.display = "none" } back2 = function() { document.getElementById("screen9").style.display = "initial" document.getElementById("screen10").style.display = "none" } back3 = function() { document.getElementById("screen11").style.display = "initial" document.getElementById("screen12").style.display = "none" } back4 = function() { document.getElementById("screen13").style.display = "initial" document.getElementById("screen14").style.display = "none" } nct_stuff.quotes=[`“Shut the mouth of that man.” - Saulius Skvernelis`,`“Even the largest breasts in the world couldn't cover up the issues in the Eurozone.” - Ingrida Šimonytė`,`“If you run out of Russian swear words, talk to Viktor Uspaskich.” - Rimvydas Paleckis`,`“We worked so hard that we didn't even have time to go to the toilet.” - Ramūnas Karbauskis`,`“I'm not God, just the Prime Minister.” - Algirdas Brazauskas`] quotnum = Math.floor((Math.random() * nct_stuff.quotes.length)) quote = nct_stuff.quotes[quotnum] corrr = `

    NAUJOJI RINKIMŲ KAMPANIJA

    ` + quote + `` HistHexcolour=["#00A59B","#00A651","#FF0000","#808080"]; HistName=[" Centre-Right Coalition - TS-LKD, LRLS, Freedom"," LVŽS"," LSDP"," Other"]; HistEV=[74,32,13,22]; HistPV=["478,792","204,791","108,649","345,329"]; HistPVP=["42.26%","18.07%","9.58%","30.09%"]; document.getElementById("header").src = "https://i.imgur.com/PpOkPoh.jpg" nct_stuff.themes[nct_stuff.selectedTheme].coloring_title = "#7a3c61" nct_stuff.themes[nct_stuff.selectedTheme].coloring_window = "#ab839b" $("#game_window")[0].style.backgroundColor = nct_stuff.themes[nct_stuff.selectedTheme].coloring_window; $(".footer a").css({"color":"#200000"}); document.getElementsByClassName("game_header")[0].style.backgroundColor = nct_stuff.themes[nct_stuff.selectedTheme].coloring_title $(".container")[0].style.backgroundColor = "#c6acbc" document.body.background = "https://i.imgur.com/zTYc1ki.jpg" document.body.style.backgroundRepeat = "no-repeat"; document.body.style.backgroundSize = "cover"; const bodyElement = document.body; bodyElement.style.backgroundAttachment = 'fixed'; $("#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: "Common", tracklist: [ { "name": "Arūnas Valinskas and others (Golden Onion 2019) - Elections in the Ship of Idiots!", "url": "https://audio.jukehost.co.uk/ekb3UCBnwviYH4cTH01yAptxFeEH61Vt" }, { "name": "Dviračio žinios - Hymn to the Conservatives", "url": "https://audio.jukehost.co.uk/iuhoCvvTpbCYBVL4eXk3bfUvXPMOu7nA" }, { "name": "Gliorija - Naisiai Fortress (Ode to Karbauskis)", "url": "https://audio.jukehost.co.uk/jMvTVX60tLJDXxwuXpgGOjII4QvlWpel" }, { "name": "Dviračio žinios - Song for the Social Democrats", "url": "https://audio.jukehost.co.uk/tsw0S37ygOB5F1VRlzAbWvHrVmsZinAz" } ] } } // Set up new music player newMusicPlayer()