-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCode1.txt
More file actions
1916 lines (1731 loc) · 157 KB
/
Code1.txt
File metadata and controls
1916 lines (1731 loc) · 157 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Mod Title: Germany 2021 - Between Decades
* Mod Author: Nina, Jaeckex
* Mod Version: 1.0.1
* Mod Description: German Federal Election of 2021
*
* 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.election_json = JSON.parse("[{\"model\": \"campaign_trail.election\", \"pk\": 9, \"fields\": {\"year\": 2021, \"summary\": \"<h2><b>Germany 2021 - Between Decades</b></h2><p>Germany stands at a crossroads. For the last 16 years, it has been governed by the popular <b>Angela Merkel</b> - a figure some describe as patient, rational and gravitational, larger than life. Others believe her to be a “chancellor of standstill”, responsible for the economic and cultural malaise in which the largest economy of Europe finds itself at the onset of the 2020’s. After leading four cabinets, she is now preparing to step down - a historic milestone in the history of the Republic, as the <b>Federal Election of 2021</b> is poised to be the first in which no incumbent chancellor will be defending their position. Not only that: it seems as though three parties might be able to lead the next government, with different characters vying to reform the country in their own image, to lead Germany into a <i>Decade</i> of their own vision.</p><p>All of this happens as the <b>SARS-CoV-2</b> virus ravages the country, changing the lives of people around the world like few crises of this century. Not only that: the cultural cleavage, the persistent development of a split in western societies, permeates Germany just as much. The number one issue for many cosmopolitanists is <b>climate change</b> and the transition to renewable energies, catapulting the Greens to the front of the political scene. On the other side, many blue collar workers and rural traditionalists feel <b>alienated</b>, particularly in East Germany - culminating in the electoral success of the AfD.<br>Anyone seeking to succeed Merkel will have to navigate this unique political moment between <b>Unity, <span style='color: red;'>Justice</span> and <span style='color: #8B8000;'>Freedom</span></b>.</p>\", \"image_url\": \"https://jetsimon.com/cts-media/public/2021DE_init_0.png\", \"winning_electoral_vote_number\": 368, \"advisor_url\": \"https://i.ibb.co/PQrG6fR/advisors.jpg\", \"recommended_reading\": \"\", \"has_visits\": 0, \"no_electoral_majority_image\": \"/static/images/2012-no-majority.jpg\", \"site_description\":\"After 16 years of Angela Merkel's stable but stagnant stewardship of Germany, the country stands at a crossroads.<br>As Covid-19 dominates everyday life, as populism takes hold in alienated parts of society and awareness about climate change grows in others, three candidates are battling it out to determine the future of the Federal Republic.<br>Which party will lead the country to frame the next decade? The incumbent CDU/CSU, the ailing Social Democrats or the ascendant Greens?<br>Determine it yourself in this extensive mod, full of unique gameplay.\"}}]");
campaignTrail_temp.candidate_json = JSON.parse("[{\"model\": \"campaign_trail.candidate\", \"pk\": 77, \"fields\": {\"first_name\": \"\", \"last_name\": \"CDU/CSU\", \"election\": 9, \"party\": \"Christian Democratic Union/Christian Social Union\", \"state\": \"-\", \"priority\": 1, \"description\": \"<i><b> <div style='text-align: center; color: #5A5A5A; margin-bottom:8px;'>“The creation of new things always takes a lot of patience.” - Konrad Adenauer</div></b></i> <ul class='my-ul'><li>Name: Christian Democratic Union / Christian Social Union</li><li>Abbreviation: CDU/CSU</li><li>Ideology: Christian Democracy</li></ul><p>The “Union”, consisting of the Christian Social Union (in Bavaria) and the Christian Democratic Union (everywhere else), is the dominant political power in Germany. They were founded in the aftermath of the Second World War, merging the remnants of the bourgeois camp and the Zentrumspartei of the Weimar Republic, uniting protestants and catholics. They’ve made it their task to represent “The Center” of German society, espousing a center-right conservatism based in Christian Humanism. Since 1949, they have dominated German politics - more often than not, the chancellor has been a member of the CDU.</p><p>For more than sixteen years now, Angela Merkel has been the face of the CDU, capturing solid electoral majorities, governing once with the Liberals, thrice with the Social Democrats. As the populace now slowly loses trust in the compromises of the so-called “Grand Coalition”, she has announced her retirement. However, her handpicked successor, Annegret Kramp-Karrenbauer, resigned as party leader less than a year before the election, making it unclear who will follow in her footsteps.</p><p>The Union has several competing wings - a moderate wing that wants to broadly continue Merkel’s policies, and a conservative wing that wants a return to rightist orthodoxy. Meanwhile, the Bavarian offshoot CSU - considered economically leftwards and culturally rightwards of its bigger sister - also harbors significant influence on the national stage. Whoever ends up being the chancellor candidate is starting with a solid lead in the polls - although in light of recent political developments, they have their work cut out to safeguard a <b><span style='color: #5A5A5A';>Christian-Democratic Decade</span></b>.</p>\", \"color_hex\": \"#28282B\", \"secondary_color_hex\": \"#77797D\", \"is_active\": 1, \"image_url\": \"https://i.imgur.com/XGtdJT9.jpg\", \"electoral_victory_message\": \" \", \"electoral_loss_message\": \" \", \"no_electoral_majority_message\": \"\", \"description_as_running_mate\": \"\", \"candidate_score\": 1.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 78, \"fields\": {\"first_name\": \"\", \"last_name\": \"SPD\", \"election\": 9, \"party\": \"Social Democratic Party\", \"state\": \"-\", \"priority\": 2, \"description\": \"<i><b> <div style='text-align: center; color: darkred; margin-bottom:8px;'>”Freedom and life can be taken from us, but not our honor.” - Otto Wels</div></b></i> <ul class='my-ul'><li>Name: Social Democratic Party of Germany</li><li>Abbreviation: SPD</li><li>Ideology: Social Democracy</li></ul><p>The Social Democratic Party of Germany (SPD) is not just one of the major political parties in Germany, it is the oldest one that’s still active. Since its establishment in 1875, the SPD has played a significant role in the country's political landscape - from the worker’s movement, the establishment of the Weimar Republic, the resistance against Hitler and the establishment of this iteration of the German state. Since the Second World War, it has provided three of the eight chancellors of Germany.</p><p>Since the defeat of chancellor Schröder against Merkel in 2005 though, the days of the party seem finally numbered. For the last eight years, it had the thankless job of being the junior coalition partner of the CDU/CSU - eroding their identity, suffering disastrous defeat after disastrous defeat, all in the name of good governance instead of ideology. Indeed, the SPD has become somewhat of a laughing stock, especially since the Greens have overtaken them in polls - a historical first. A lot of Social Democrats seek a return to a more leftist vision, as the rift between party base and party elites grows deeper and wider.</p><p>With how much the party is struggling and ailing - achieving not even 16% in the European Elections of 2019 - those who believe the tides can turn grow fewer and fewer. It will surely need a miracle for anyone to rise from the ashes, and despite the odds, forge a <b><span style='color: darkred;'>Social Democratic Decade</span></b>.</p>\", \"color_hex\": \"#D61A29\", \"secondary_color_hex\": \"#F5878F\", \"is_active\": 1, \"image_url\": \"https://upload.wikimedia.org/wikipedia/commons/thumb/2/2d/Sozialdemokratische_Partei_Deutschlands%2C_Logo_um_2000.svg/2048px-Sozialdemokratische_Partei_Deutschlands%2C_Logo_um_2000.svg.png\", \"electoral_victory_message\": \"\", \"electoral_loss_message\": \"\", \"no_electoral_majority_message\": \"\", \"description_as_running_mate\": \"\", \"candidate_score\": 1.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 79, \"fields\": {\"first_name\": \"\", \"last_name\": \"Green Party\", \"election\": 9, \"party\": \"Alliance 90/The Greens\", \"state\": \"-\", \"priority\": 3, \"description\": \"<b> <i><div style='text-align: center; color: darkgreen; margin-bottom:8px;'>“Whatever we’re inflicting on the world, we’re inflicting on ourselves.” - Petra Kelly</div></b></i><ul class='my-ul'><li>Name: Alliance 90 / The Greens</li><li>Abbreviation: Green Party</li><li>Ideology: Progressivism / Green politics</li></ul><p>The Green Party is relatively young, having been founded in 1980 as a consequence of the New Social Movements of the 60’s and 70’s. Combining idiosyncratic elements of the New Left, pacifist- and anti-nuclear-movements, social egalitarians as well as conservationists, the colorful mixture of a party was quarreling at every corner. Nonetheless, the Greens managed to enter parliament in 1983, solidifying themselves as the defining postmaterialist force in German politics. After reunification, they merged with Alliance 90, an East German civil rights party. Since then, they have broadened their appeal from purely pacifism and environmentalism to be a general center-left party, though their strongest focus remains on combating climate change.</p><p>Having taken responsibility during the Red-Green coalition from 1998-2005, the Greens have moderated quite a bit. Recently, they're on a surprising upwards trajectory, being involved in the majority of state governments, even leading one in Baden-Württemberg. With climate change increasing in salience since 2018, they have overtaken the SPD in polls - now, they find themselves the first ‘minor party’ to have a sensible shot at the chancellery. </p><p>However, the Green Party is known for having strong showings in the polls and being unable to actually convert that to votes come election day. For now, they look like the main contender against the CDU/CSU, but a lot can still change. Whoever ends up leading the Greens into battle - if they redefine the Greens as palatable to the average German, they have a unique chance to forge the 2020’s as the first <b><span style='color: darkgreen;'>Green Decade</span></b>.</p>\", \"color_hex\": \"#13A12D\", \"secondary_color_hex\": \"#8FDB8F\", \"is_active\": 1, \"image_url\": \"https://i.ibb.co/tQmtGBz/Greens.png\", \"electoral_victory_message\": \"\", \"electoral_loss_message\": \"\", \"no_electoral_majority_message\": \"\", \"description_as_running_mate\": \"'\", \"candidate_score\": 1.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 303, \"fields\": {\"first_name\": \"\", \"last_name\": \"FDP\", \"election\": 9, \"party\": \"Free Democratic Party\", \"state\": \"-\", \"priority\": 4, \"description\": \"'\", \"color_hex\": \"#F5F518\", \"secondary_color_hex\": \"#FAFA9B\", \"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\": 304, \"fields\": {\"first_name\": \"\", \"last_name\": \"The Left\", \"election\": 9, \"party\": \"The Left\", \"state\": \"-\", \"priority\": 5, \"description\": \"'\", \"color_hex\": \"#C910BA\", \"secondary_color_hex\": \"#F595ED\", \"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\": 305, \"fields\": {\"first_name\": \"\", \"last_name\": \"AfD\", \"election\": 9, \"party\": \"Alternative for Germany\", \"-\": \"New York\", \"priority\": 6, \"description\": \"'\", \"color_hex\": \"#2B8FE0\", \"secondary_color_hex\": \"#85BEED\", \"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\": 306, \"fields\": {\"first_name\": \"\", \"last_name\": \"Others\", \"election\": 9, \"party\": \"Minor Parties\", \"state\": \"-\", \"priority\": 7, \"description\": \"'\", \"color_hex\": \"#807E7F\", \"secondary_color_hex\": \"#C9C7C9\", \"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\": 307, \"fields\": {\"first_name\": \"Armin\", \"last_name\": \"Laschet\", \"election\": 9, \"party\": \"CDU\", \"state\": \"North Rhine-Westphalia\", \"priority\": 8, \"description\": \"'\", \"color_hex\": \"#0000FF\", \"secondary_color_hex\": \"#90C0FF\", \"is_active\": 0, \"image_url\": \"https://i.ibb.co/z4HQGwg/laschet2.jpg\", \"electoral_victory_message\": \"'\", \"electoral_loss_message\": \"'\", \"no_electoral_majority_message\": \"'\", \"description_as_running_mate\": \"<p> <i><b>”I may not be the man of perfect staging, but I am Armin Laschet, and you can count on that.”</b></i>Armin Laschet is the incumbent Minister President of Germany's most populous state, North Rhine-Westphalia. Governing the former SPD stronghold in a moderate-conservative Black-Yellow coalition of CDU and FDP, he was speculated to jump into the 2018 leadership race about Merkel's succession. He declined, but after party leader Annegret Kramp-Karrenbauer threw in the towel after three years, he is eager to join the new contest, taking over her lane as the „continuity-candidate“ – all the way up to the chancellor candidacy. <br>Whilst having the reputation of an integrous statesman, he is also quite gaffe-prone. If he can maneuver this weakness, he might be the best candidate to continue Merkel's style of governance.</p><p><i><b>”I may not be the man of perfect staging, but I am Armin Laschet, and you can count on that.”</b></i></p><p><b>Armin Laschet</b> had no ambition to be chancellor – until now.</p><p>Born into a devout catholic middle class family to a miner and his housewife in Aachen, “the heart of Europe“, the CDU politician started his career in the 1994 Bundestag election. After losing his mandate 4 years later, he started an accomplished foray into the European Parliament, after which he returned to his home state of North Rhine-Westphalia.</p><p>In 2017, he defeated popular SPD incumbent Hannelore Kraft, in what many consider the beginning of the end of the SPD federal election campaign that year. Since then, he has governed NRW, Germany's most populous state, in a CDU-FDP “Black-Yellow” coalition. His tenure turned out to fall straight into Angela Merkel's last term. </p><p>When the chancellor orchestrated Annegret Kramp-Karrenbauer to be her successor in 2018, many expected Laschet to throw his hat into the ring, as a compromise candidate between Kramp-Karrenbauer and the comeback of conservative insurgent Friedrich Merz. He declined, and Kramp-Karrenbauer’s leadership of the next 3 years proved wildly unpopular. In 2021, she finally decided to throw the towel. Even though his Covid-leadership has been shaky, the NRW-Minister President kept a good amount of respect among his peers – and in this new leadership contest, Laschet sees his time to have come.</p><p>Derided by some as a „backup“, he's widely expected to fill in the lane on which Kramp-Karrenbauer won in 2018 – as the „continuity-candidate“. His opponents, the returning Friedrich Merz and the disgraced Norbert Röttgen, are both symbols of the past – it is up to Armin Laschet to show that he can lead the party, and eventually the country, into the 2020’s.</p><p>It's up to you to deal with his controversies, his perceived aloofness and the unexpected political climate, especially since other figures of power seem to perceive a power vacuum…</p>\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 308, \"fields\": {\"first_name\": \"Friedrich\", \"last_name\": \"Merz\", \"election\": 9, \"party\": \"CDU\", \"state\": \"North Rhine-Westphalia\", \"priority\": 9, \"description\": \"'\", \"color_hex\": \"#0000FF\", \"secondary_color_hex\": \"#90C0FF\", \"is_active\": 0, \"image_url\": \"https://i.ibb.co/P4hnWXb/Merz.jpg\", \"electoral_victory_message\": \"'\", \"electoral_loss_message\": \"'\", \"no_electoral_majority_message\": \"'\", \"description_as_running_mate\": \"<p><i> “I left politics 10 years ago. I know the 20 year olds don’t know me. But the 30 year olds do well to remember - and the others are going to get to know me.” </i> Friedrich Merz was a formerly prominent CDU politician, who got outmaneuvered by Angela Merkel in the 2000's. After some time in exile, he returned in 2018, to head a leadership challenge from the right against Merkel's chosen successor, Annegret Kramp-Karrenbauer. He lost surprisingly narrowly, and after she faltered since the past three years, he now sees his chance come again.In the public, he's perceived as a bit out of touch for his wealth, and is seen as a man from the past, driven by revenge. If he wants to modernize Germany in the image of an orthodox conservative like him, he will have to combat this image.</p><p><b><i> “I left politics 10 years ago. I know the 20 year olds don’t know me. But the 30 year olds do well to remember - and the others are going to get to know me.” </i></b></p><p>Third time’s the charm - at least <b>Joachim-Friedrich Martin Josef Merz</b> seems to think so. </p><p>Growing up in a conservative jurist’s family, he transitioned from law to a swift CDU career starting in the EU parliament, coming into the Bundestag in 1994, and becoming leader of the opposition by 2000. As an expert on financial topics, he had big plans for Germany - which were promptly thwarted 2 years later.</p><p>CDU party chair Angela Merkel, homegrown as “Helmut Kohl’s girl”, had her own ambitions to dethrone SPD chancellor Gerhard Schröder - as did Edmund Stoiber, CSU Minister President of Bavaria. In what came to be known as the “Wolfratshausener breakfast”, they made a dirty deal, in which Stoiber was to become chancellor candidate for the election of 2002, and Merkel was to become the new party group leader - without asking Merz. He was unceremoniously cast aside, resigning from his seat in 2004, going into exile. Stoiber lost 2002, but Merkel’s gamble paid off, when she did defeat Schröder in 2005.</p><p>During Merkel’s chancellorship, he worked at a law office, at consulting firms and on supervisory boards, always wanting to get back at Merkel for stealing his limelight.In 2018, an opening presented itself- Merkel finally stepped back as party leader, orchestrating Annegret Kramp-Karrenbauer to be her successor. Merz saw his chance and announced his own candidacy, giving Kramp-Karrenbauer an unexpected scare.</p><p>Running on a right-wing, carefully Merkel-skeptic lane, the ‘new old face’ of the CDU demanded a return to conservative orthodoxy, to trickle-down-economics and a new outlook in politics. Initially just seen as a childish slight to Merkel, Merz amassed a surprising following and lost by just 3.5% at the convention.</p><p>Kramp-Karrenbauer’s leadership proved problematic, to say the least, and 3 years later, she threw in the towel. Friedrich Merz, still in the headlines as the new figurehead of the CDU’s right wing, now has another chance to win the party leadership - and with it, maybe, even the chancellery.</p><p>If he can manage to overcome his perception as a “sore loser”, “old-fashioned” and an “out of touch rich guy”, this might very well be his chance to finally escape from Merkel’s shadow and modernize Germany to his liking.</p>\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 309, \"fields\": {\"first_name\": \"Markus\", \"last_name\": \"Söder\", \"election\": 9, \"party\": \"CSU\", \"state\": \"Bavaria\", \"priority\": 10, \"description\": \"'\", \"color_hex\": \"#FF0000\", \"secondary_color_hex\": \"#FFA0A0\", \"is_active\": 0, \"image_url\": \"https://i.ibb.co/NZ4NSY9/Markus-S-der.jpg\", \"electoral_victory_message\": \"'\", \"electoral_loss_message\": \"'\", \"no_electoral_majority_message\": \"'\", \"description_as_running_mate\": \"<p><i>“Of course morality is no category in politics, except for when we want to harm someone.”</i>Markus Söder is the incumbent Minister President of Bavaria. As leader of the smaller sister of the Union, the CSU, he wants to capture the chancellor candidacy for himself. He is a cunning politician and tactician, with his favorability and polling numbers regularly above the possible CDU candidates.<br>His ideological line is quite idiosyncratic, with a hard line on refugees, A lockdown-focused Covid policy and a surprisingly significant environmentalist streak. His popularity could make him the 3rd ever Bavarian chancellor candidate. As long as his opportunism doesn't become too egregious, he might outmaneuver his opponents to become Merkel's successor.</p><p><b><i>“Of course morality is no category in politics, except for when we want to harm someone.”</i></b></p><p><b>Markus Thomas Theodor Söder</b> loves the cameras</p><p>Raised as a conservative protestant in Nürnberg by a family of artisans, he’s not just an cinephile, especially with Science Fiction; he also admired Franz Josef Strauß’ rhetorical talent as a teen, hanging up a big poster of the legendary Bavarian politician on his ceiling. He’s also known for his eccentric carnival costumes, be it Gandalf, Homer Simpson, Paul Stanley, or, yes, Mahatma Gandhi (in blackface). </p><p>He joined the JU and began his career in politics - always in his home state of Bavaria. And of course - always upwards. Ambition. Drive. First, chair of the JU Bavaria. Then, General Secretary of the CSU. Then, State Minister in 3 different departments. Always more.</p><p>Söder might be a man of power - but one who knows what the people want. His ideological idiosyncrasy can be identified as populism, both in ire and praise. Be it a hard line against immigration and refugees, advocating for crucifixes and singing the anthem in schools, or his advocacy for traditional values, or: praising gay marriage, introducing a bavarian Space Program (Bavaria One), and standing against nuclear energy. In the words of his biographer: “He has a baroque and sometimes bizarre enjoyment of self-presentation, always following the political climate.”</p><p>His cunning can’t be doubted, and he knows how to use it. In 2017, he pressured Minister-President Horst Seehofer, his mentor, from the office, taking it for himself. As the new Bavarian head of government, he ran a hard line on Covid. More importantly though, he pushed the line on climate action within his conservative party - already in 2007 he demanded a ban on admitting new cars with combustion engines come 2020. He wants to save the bees, he advocates for an early exit from coal and for a climate-neutral Bavaria until 2040. Enshrining environmental protection within the constitution, even.</p><p>For his opponents, it’s clear what he’s doing - cold opportunism. But is it really wrong, if it produces results? Markus Söder is one of the most popular politicians in the country, respected among evangelical church goers and environmentalist soccer moms alike. In fact, many people - including within the Union - see him as a good choice for an even higher office.</p><p>Only two CSU politicians were ever chancellor candidates, Söders icon Strauß, and another mentor of his, Edmund Stoiber. Both lost: but Söder knows not to repeat their mistakes. He knows the country yearns for change. He knows the country wants a strong man, a bombastic man, a charismatic man, a good looking man.</p><p>And he, he thinks, is the only one who can deliver. </p>\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 310, \"fields\": {\"first_name\": \"Olaf\", \"last_name\": \"Scholz\", \"election\": 9, \"party\": \"SPD\", \"state\": \"Hamburg\", \"priority\": 11, \"description\": \"'\", \"color_hex\": \"#FF0000\", \"secondary_color_hex\": \"#FFA0A0\", \"is_active\": 0, \"image_url\": \"https://i.ibb.co/z735fdt/Scholz.jpg\", \"electoral_victory_message\": \"'\", \"electoral_loss_message\": \"'\", \"no_electoral_majority_message\": \"'\", \"description_as_running_mate\": \"<p><i>”You can nag about everything. You could sit in a corner and say; surely everything is going to end badly. But honestly, with that attitude, you can't govern a country.”</i>Olaf Scholz is the incumbent Vice Chancellor and Minister of Finance of the SPD, serving in the Grand Coalition under Merkel. Having an illustrious career since the Red-Green coalition, serving in several roles over two decades, most prominently Mayor of Hamburg, he is known for a calm, technocratic demeanor, dubbed the “Scholzomat” - drawing comparisons to Merkel herself. Critics call him boring, admirers call him rational. Despite once being a firebrand leftist in his younger days, he has since become a leading voice of the moderate wing of the SPD. With his impressive resumé and unwavering patience, he urgently has to renew the image of his ailing party, whilst utilizing his Merkel-esque attitude to rescue the Social Democrats from their identity crisis and a historic low in polling.</p><p><b><i>”You can nag about everything. You could sit in a corner and say; surely everything is going to end badly. But honestly, with that attitude, you can't govern a country.”</i></b></p><p><b>Olaf Scholz</b> is as boring as his three-syllabled name. <p>He’s a self-avowed technocrat, embracing the nickname “Scholzomat”. He has “die Ruhe weg” (meaning he’s always calm), he has a small statue, a nondescript face, a bald head, a small black briefcase, he thinks politics is “fun” and in his free time, he enjoys reading specialized non-fiction fact books.</br>Nonetheless, or perhaps because of that, he is the most likely choice to become chancellor candidate of the Social Democratic Party of Germany.</p><p>It wasn’t always like that. Born to a family of textile workers, growing up in Osnabrück and Hamburg, when he was twelve, his career aspiration was “chancellor”. He entered the Jusos, the youth wing of the SPD, and became a leading voice in its left leftwing “Stamokap”-wing. He quit the church, he held speeches against Nato, against capitalism and against the social-liberal coalition of SPD and FDP. He even undertook several trips to East Germany, maintaining relationships with the communist cadres of the dictatorship.</p><p> Be it due to opportunism, a change in attitude after reunification, or simply due to growing up; he quickly abandoned those tendencies when working as a practitioner of labor law. He rose through the ranks of the SPD Hamburg, becoming MP in Gerhard Schröder’s landslide in 1998, vehemently defending the third-way-neoliberal agenda of the Red-Green coalition, even becoming. Schröders General-Secretary. In 2004, he quit, alongside the former chancellor himself. It wasn’t long until newly elected chancellor Angela Merkel saw his potential, giving him her Ministry of Labor for two years.</p><p> Afterwards, his impressive resumé for the time made him Mayor of Hamburg, giving him the keys to the Senate of Germany’s second biggest city from 2011-2018. His tenure was known for a big increase in housing construction - but also several scandals, including a botched response to the G20-summit of 2017 and a shady role during the cum-ex scandals of the prominent Warburg-bank.</p><p> His leadership role in the party only increased when he became Minister of Finances and Vice Chancellor in Merkel's unpopular third Grand Coalition. Since Schröders defeat in 2005, the trajectory of his party led downwards, coinciding with a general trend of an identity crisis within European Social Democracy. The SPD reached a low of 20% in the elections of 2017, and after entering another unpopular coalition anyways, now bled to third place, behind The Greens. Internal disagreements ultimately made party chair Andrea Nahles quit her place, leaving a power vacuum in the ailing “oldest party of Germany”.</p><p>Olaf Scholz is now perceived as the leader of the moderate wing of the party - with his unwavering loyalty and rationality, he needs to give a new shine to the SPD, whilst cleverly utilizing his Merkel-esque technocratic brand - to become her successor after all, laying the foundations of an unlikely Social Democratic decade.</p>\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 313, \"fields\": {\"first_name\": \"Rolf\", \"last_name\": \"Mützenich\", \"election\": 9, \"party\": \"SPD\", \"state\": \"North Rhine-Westphalia\", \"priority\": 11, \"description\": \"'\", \"color_hex\": \"#FF0000\", \"secondary_color_hex\": \"#FFA0A0\", \"is_active\": 0, \"image_url\": \"https://i.ibb.co/z735fdt/Scholz.jpg\", \"electoral_victory_message\": \"'\", \"electoral_loss_message\": \"'\", \"no_electoral_majority_message\": \"'\", \"description_as_running_mate\": \"<p>Rolf who?</p>\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 311, \"fields\": {\"first_name\": \"Annalena\", \"last_name\": \"Baerbock\", \"election\": 9, \"party\": \"Greens\", \"state\": \"Brandenburg\", \"priority\": 12, \"description\": \"'\", \"color_hex\": \"#FFFF00\", \"secondary_color_hex\": \"#FFFFC0\", \"is_active\": 0, \"image_url\": \"https://i.ibb.co/MP0P2yQ/Baerbock.jpg\", \"electoral_victory_message\": \"'\", \"electoral_loss_message\": \"'\", \"no_electoral_majority_message\": \"'\", \"description_as_running_mate\": \"<p><i>“Climate Action is the challenge of our time, the challenge of my generation.”</i>Annalena Baerbock is the female co-chair of The Greens. She is knowledgeable on climate policies and foreign policy. A member of the moderate Realo-wing, she has ambitions to become the first Green chancellor candidate, after the party shot up in polling over the last 3 years – especially since she's the only woman between the possible contenders. If she can make the case for an energized campaign with a strong female lead over the government experience of her colleague, Robert Habeck, she might be able to snatch the nomination – and, if she stays popular, lead Germany into a whole new age.</p><p><b><i>“Climate Action is the challenge of our time, the challenge of my generation.”</i></b></p><p><b>Annalena Charlotte Alma Baerbock</b> knows she can do it. No - as a young woman between old men, she knows she<i> has</i> to do it. Even though, no, <i>because</i> she’s a newcomer on the political scene.</p><p>Some might say, Baerbock was homegrown into The Greens. As a kid, her parents took her to demonstrations against Nuclear weapons and for Peace in the 1980’s. She grew up on a farm with two sisters; she wished for a Greenpeace-Book for her birthday, she wrote for a newspaper and had a small but successful trampolining career. It is from there that she learned to “have courage, to overcome yourself, to dare something new”.</p><p>After university, she officially joined the Greens in 2005. Only four years later, she was the female chair of The Greens in Brandenburg. Serving in different functions for the Federal and European Green Party, by 2013, she won a mandate into the Bundestag, as climate-political speaker for her party group. She participated at the failed Jamaica talks in 2017 and one year later - was voted to be the party’s female co-chair.</p><p>Baerbock is a “Realo”, a member of the moderate, governance-focused wing of The Greens. Traditionally, their dual leadership consists of a moderate “Realo” and a leftist “Fundi”: but in 2018, when the popular Robert Habeck, also a Realo, was voted to be party chair - Baerbock still won out to be his co-lead, over her left-wing opponent Anja Piel. And it wasn't just to be second fiddle to the prominent Habeck: “We aren’t just voting for the woman on Roberts side, but the new Federal party chair of Alliance 90 / The Greens!”, as she said. Habeck got the message, and they worked well together, being reelected as party chairs with a record 97.1% one year later.</p><p>It wasn’t just coincidence that the ‘dynamic duo’ got such a good result - over the course of 2018, frustration with the Status Quo and the explosion of pent-up environmentalist outrage of an oft-forgotten German youth erupted in a polling surge for The Greens. Winning a meager 8.9% in 2017, suddenly, two years later, the party found itself rivaling even the CDU for first place. Something seemed feasible, that most would’ve thought absurd just months before; <i>The Greens have a shot at the chancellery</i>. Since Covid hit, the narrative moved on, with Merkel profiting from a rally-around-the-flag surge. But nonetheless, The Greens remain in second place, finding a footing in the German middle class that positions them to be the top challenger for whoever the CDU puts up. And after Kramp-Karrenbauer faltered, it’s probably gonna be another man.</p><p>This is Baerbocks shot. As a young woman, people will be fierce on her lack of experience, on her lack of “Gravitas”. She might not be able to afford many mistakes. But she thinks she can do it: as long as Robert understands that this race needs a woman - she might very well become the youngest, the second female, and the first Green chancellor of Germany.</p>\", \"candidate_score\": 0.0}}, {\"model\": \"campaign_trail.candidate\", \"pk\": 312, \"fields\": {\"first_name\": \"Robert\", \"last_name\": \"Habeck\", \"election\": 9, \"party\": \"Greens\", \"state\": \"Schleswig-Holstein\", \"priority\": 13, \"description\": \"'\", \"color_hex\": \"#00C100\", \"secondary_color_hex\": \"#A1FFA1\", \"is_active\": 0, \"image_url\": \"https://i.ibb.co/VBZWCSM/habeck.jpg\", \"electoral_victory_message\": \"'\", \"electoral_loss_message\": \"'\", \"no_electoral_majority_message\": \"'\", \"description_as_running_mate\": \"<p><i>”We sometimes have this tendency to make arguments immune within an academically coloured language. We’ll have to work on that.”</i>Robert Habeck is the former Minister of Agriculture from Schleswig-Holstein, and the male co-chair of The Greens. The learned philosopher and philologist has earned valuable experience serving in that capacity, commanding respect beyond party lines. He calls himself a „pragmatic idealist“ - and after The Greens shot up in polling over the last 3 years, he has ambitions to finally get them into the government. If his worldview can prove to be more salient than the gender question, he might win over his colleague, Annalena Baerbock, to become the first Green chancellor candidate – and if he manages to stay the patient listener he has a reputation to be, has a good shot at the top government post.</p><p><b><i>”We sometimes have this tendency to make arguments immune within an academically coloured language. We’ll have to work on that.”</i></b><p><p>If there was ever someone who could be described as a “photogenically brash intellectual with a rustic northern attitude”, they’re probably quite similar to <b>Robert Habeck</b>.</p><p>Habeck was born to a pair of pharmacists in Lübeck, in the North of Germany. Perhaps somewhat stereotypical for a Green, he studied Germanistics, Philosophy and Philology. During a foreign exchange year to Denmark, he was deeply impressed by the Nordic systems. It was there where he developed a (perhaps somewhat oxymoronic) “pragmatic idealism”, personally and politically. He also got to know his wife there, with whom he successfully published literature since the 90’s, mostly children’s books, adult fiction and translations of english lyricism. Living in his home state of Schleswig-Holstein with his family, he shares deep cultural ties to Northern Germany and the Danish minority population.</p><p>It was there where his political career took off rather abruptly. Joining the Green party in 2002, he immediately got introduced into local leadership circles, becoming Schleswig-Holstein’s Green party chair only two years later. Over the next 10 years, he gathered valuable experience in local politics, culminating in him becoming the state’s Vice Minister President in 2012, and with it, taking the mantle of “Minister of Agriculture, Energy Transition, the Environment and Rural Spaces”. His tenure was considered quite successful - his “no-bullshit”-attitude proved popular with broody farmers and fishermen, which helped to make Schleswig-Holstein’s agricultural sector more ecologically sustainable.</p><p>In his stride, he tried to bring his visions to a national level, running for The Green’s top candidacy in 2017, losing by an unexpectedly narrow margin. In 2018, his charisma and outsized credentials made him co-party chair, alongside Annalena Baerbock. Habeck’s pragmatism met the mood of the party - it was the first time The Greens had two members of its moderate Realo-wing at its helm, caught by an eagerness to govern.</p><p>And this ambition became increasingly probable. During this time, frustrations with the political Status Quo and the meager progress on climate action made Germany’s youth protest in the streets, with a generation of parents just as disappointed with the third Grand Coalition within 20 years. The dynamic duo of Habeck and Baerbock met the moment of this longing for change, and the Greens shot up in polling, overtaking the ailing SPD, rivaling the governing CDU/CSU for first place.</p><p>Since then, the polling highs subsided, due to Covid taking over the political discourse - but Habeck knows, this is his time. He wants to serve. Although Annalena Baerbock has her own ambitions, with The Greens eager for a new chapter in Germany’s governance, “pragmatic idealism” and governing experience might just win out over the Gender question, handing Robert Habeck the keys to the nomination and - if he doesn’t lose patience with himself and the German electorate - all the way to the chancellery.</p>\", \"candidate_score\": 0.0}}]");
campaignTrail_temp.running_mate_json = JSON.parse("[{\"model\": \"campaign_trail.running_mate\", \"pk\": 47, \"fields\": {\"candidate\": 77, \"running_mate\": 307}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 56, \"fields\": {\"candidate\": 77, \"running_mate\": 308}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 76, \"fields\": {\"candidate\": 77, \"running_mate\": 309}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 106, \"fields\": {\"candidate\": 78, \"running_mate\": 310}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 105, \"fields\": {\"candidate\": 79, \"running_mate\": 311}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 81, \"fields\": {\"candidate\": 79, \"running_mate\": 312}}, {\"model\": \"campaign_trail.running_mate\", \"pk\": 821111111111, \"fields\": {\"candidate\": 78, \"running_mate\": 313}}]");
campaignTrail_temp.opponents_default_json = JSON.parse("[{\"election\": 9, \"candidates\": [77, 78, 79, 303, 304, 305, 306]}]");
campaignTrail_temp.opponents_weighted_json = JSON.parse("[{\"election\": 9, \"candidates\": [77, 78, 79, 303, 304, 305, 306]}]");
campaignTrail_temp.global_parameter_json = JSON.parse("[{\"model\": \"campaign_trail.global_parameter\", \"pk\": 1, \"fields\": {\"vote_variable\": 1.125, \"max_swing\": 0.12, \"start_point\": 0.94, \"candidate_issue_weight\": 10.0, \"running_mate_issue_weight\": 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\": 35, \"default_map_color_hex\": \"#C9C9C9\", \"no_state_map_color_hex\": \"#999999\"}}]");
campaignTrail_temp.candidate_dropout_json = JSON.parse("[{\"model\": \"campaign_trail.candidate_dropout\", \"pk\": 1, \"fields\": {\"candidate\": 36, \"affected_candidate\": 18, \"probability\": 1.0}}]");
campaignTrail_temp.temp_election_list = [{"id": 9, "year": 2021, "is_premium": 0, "display_year": "2021DE"}];
campaignTrail_temp.show_premium = true;
campaignTrail_temp.modBoxTheme = {
"header_color": "#bcbcbc",
"header_text_color": "#151045",
"description_text_color": "#000000",
"description_background_color": "#e1b0b0",
"main_color": "#c45b5b",
"secondary_color": "#f8f46d",
"ui_text_color": "#000651"
}
campaignTrail_temp.premier_ab_test_version = -1;
RecReading = true;
campaignTrail_temp.election_json[0].fields.recommended_reading = "<div style='color: black; overflow: auto'><h3 style='margin-top: 0.5em;'>Do you want to learn more about...</h4><b>The German electoral system?</b><br><a href='https://www.bmi.bund.de/EN/topics/constitution/electoral-law/voting-system/voting-system-node.html' target='_blank'>Brief explanation (English)</a><br><a href='https://www.wahlrecht.de/bundestag/index.htm' target='_blank'>Thourough explanation (German)</a><br><br><b>The Parties?</b><br><a href='https://www.dw.com/en/spd-green-party-fdp-cdu-left-party-afd/a-38085900' target='_blank'>Overview over all major parties (English)</a><br><a href='https://archiv.wahl-o-mat.de/bundestagswahl2021/app/main_app.html' target='_blank'>Wahl-O-Mat - What do all parties think and who matches best with you (German)</a><br><a href='https://www.bundestagswahl-bw.de/wahlprogramm-cdu' target='_blank'>CDU/CSU electoral program 2021 (German)</a><br><a href='https://www.cdu-dresden.de/aktuelles/2021/cdu-csu-wahlprogramm-englisch' target='_blank'>CDU/CSU electoral program 2021 short version (English)</a><br><a href='https://www.spd.de/programm/zukunftsprogramm' target='_blank'>SPD electoral program 2021 (German/English)</a><br><a href='https://www.gruene.de/artikel/wahlprogramm-zur-bundestagswahl-2021' target='_blank'>Greens electoral program 2021 (German/English)</a><h3> Do you want to see another side of the candidates?</h3><b>Interviews without words</b><br><a href='https://sz-magazin.sueddeutsche.de/sagen-sie-jetzt-nichts/armin-laschet-interview-kanzler-merz-88875' target='_blank'>Armin Laschet (2020)</a><br><a href='https://sz-magazin.sueddeutsche.de/sagen-sie-jetzt-nichts/ist-schwarz-gruen-die-zukunft-78094' target='_blank'>Markus Söder (2011)</a><br><a href='https://sz-magazin.sueddeutsche.de/sagen-sie-jetzt-nichts/olaf-scholz-interview-ohne-worte-90544' target='_blank'>Olaf Scholz (2021)</a><br><a href='https://sz-magazin.sueddeutsche.de/sagen-sie-jetzt-nichts/gruenen-annalena-baerbock-politik-87359' target='_blank'>Annalena Baerbock (2019)</a><br><a href='https://sz-magazin.sueddeutsche.de/ein-interview-ohne-worte/sagen-sie-jetzt-nichts-robert-habeck-84368' target='_blank'>Robert Habeck (2017)</a><br>Thank you for playing this mod. We hope you learned something and had as much fun playing it as we did creating it - <i>Nina & Jaeckex </i> </div>"
campaignTrail_temp.credits = "<button onclick='funcredits()'>Nina&Jaeckex</button>";
funcredits = function() {
credits = ["Lead Writer, Graphics, Music:", "Jaeckex", "", "Coding, Additional Writing:", "Nina", "", "Banner by Calgar and Jaeckex", "", "Playtesting:", "Rickroll999, rnmgaming5068, TPLeo, Tomahawk2k, Leon Trotsky, Pompf, Ivorycore, Anne H, Jackalopemaster, EUIV ETS2", "","#1 Achievement Hunter", "Onkel Danny", "", "Music Player adapted from 2000N", "Advisor Mode inspired by Sea to Shining Sea", ""]
text = "CREDITS:\n\n"
for (i in credits) {
text += credits[i] + "\n"
}
alert(text)
}
campaignTrail_temp.coalitionDifficulty = 1;
campaignTrail_temp.difficulty_level_json = JSON.parse("[{\"model\": \"campaign_trail.difficulty_level\", \"pk\": 1, \"fields\": {\"name\": \"Cakewalk\", \"multiplier\": 1.4}}, {\"model\": \"campaign_trail.difficulty_level\", \"pk\": 2, \"fields\": {\"name\": \"Very Easy\", \"multiplier\": 1.25}}, {\"model\": \"campaign_trail.difficulty_level\", \"pk\": 3, \"fields\": {\"name\": \"Easy\", \"multiplier\": 1.1}}, {\"model\": \"campaign_trail.difficulty_level\", \"pk\": 4, \"fields\": {\"name\": \"Normal\", \"multiplier\": 0.97}}, {\"model\": \"campaign_trail.difficulty_level\", \"pk\": 5, \"fields\": {\"name\": \"Hard\", \"multiplier\": 0.92}}, {\"model\": \"campaign_trail.difficulty_level\", \"pk\": 6, \"fields\": {\"name\": \"Impossible\", \"multiplier\": 0.86}}, {\"model\": \"campaign_trail.difficulty_level\", \"pk\": 7, \"fields\": {\"name\": \"Unthinkable\", \"multiplier\": 0.8}}, {\"model\": \"campaign_trail.difficulty_level\", \"pk\": 8, \"fields\": {\"name\": \"Blowout\", \"multiplier\": 0.72}}, {\"model\": \"campaign_trail.difficulty_level\", \"pk\": 9, \"fields\": {\"name\": \"Disaster\", \"multiplier\": 0.64}}]");
e=campaignTrail_temp;
HistName=["Replace Me"];
e.collect_results = true;
$("#game_window")[0].style.backgroundImage = "url(https://i.ibb.co/3p8pgGF/tagesschau.jpg)";
backgroundGameWindow = "url(https://i.ibb.co/3p8pgGF/tagesschau.jpg)"
nct_stuff.themes[nct_stuff.selectedTheme].coloring_title = "#070785"
nct_stuff.themes[nct_stuff.selectedTheme].coloring_window = "#031299"
document.getElementsByClassName("game_header")[0].style.backgroundColor = nct_stuff.themes[nct_stuff.selectedTheme].coloring_title
$(".container")[0].style.backgroundColor = "#001f58"
document.body.background = "https://i.ibb.co/rFKgjtw/berlin-luft.jpg"
document.body.style.backgroundRepeat = "no-repeat";
document.body.style.backgroundSize = "cover";
document.getElementById("header").src = "https://jetsimon.com/cts-media/public/2021DE_init_1.png";
nct_stuff.themes[nct_stuff.selectedTheme].text_col = "white"
e.music = {};
e.music.shuffleEnabled = false;
e.music.Volume=0.3;
e.music.loopEnabled = false;
e.displayTooltips = true;
e.realisticPolls = true;
e.staff_mode = true;
e.electionNight=true;
quotes = [`"Wir schaffen das!" - Angela Merkel`, `"Scheitert der Euro, scheitert Europa." - Angela Merkel`, `"Das Internet ist für uns alle Neuland." - Angela Merkel`, `"Die Demokratie ist kein Supermarkt." - Frank-Walter Steinmeier`, `In my homeland Baden-Württemberg we are all sitting in one boat.`, `"Rechts von der CDU/CSU darf es keine demokratisch legitimierte Partei geben" - Franz-Joseph Strauß`, `"Jetzt wächst zusammen, was zusammen gehört" - Willy Brandt`, `Was kümmert mich mein Geschwätz von gestern? - Konrad Adenauer`, `"Wer Visionen hat, sollte zum Arzt gehen" - Helmut Schmidt`, `There will never be a revolution in Germany. The bureaucratic paperwork for it is missing.`, ]
customquote = quotes[Math.floor((Math.random() * quotes.length))]
corrr="\n<h2>NEUE WAHLKAMPF-TOUR</h2><font id='wittyquote' size='4' color='white'><em>" + customquote + "</em></font>"
var element = document.getElementById('my-invisible-element');
if (!element) {
// Get the reference to the bar
var bar = document.getElementById('bottomBar');
bar.style.display = 'block';
// Create the checkbox
var checkbox = document.createElement('input');
checkbox.type = 'checkbox';
checkbox.id = 'volumeCheckbox';
checkbox.checked = true; // Checked by default
// Create the label for the checkbox
var label = document.createElement('label');
label.htmlFor = 'volumeCheckbox';
label.style.fontSize = '18px'; // Increase the size of the text
label.style.fontWeight = 'bold'; // Make the text bold
label.appendChild(document.createTextNode('Enable Volume'));
// Wrap the checkbox and label in a div and style it
var wrapper = document.createElement('div');
wrapper.style.padding = '10px'; // Add some padding
wrapper.style.borderRadius = '10px'; // Round the corners
wrapper.style.backgroundColor = '#d3d3d3'; // Set the background color to the default button color
wrapper.style.border = '1px solid black'; // Add a black border
wrapper.appendChild(checkbox);
wrapper.appendChild(label);
// Position the wrapper in the middle of the bar
var div = document.createElement('div');
div.style.position = 'absolute';
div.style.left = '50%';
div.style.transform = 'translate(-50%, 0)'; // Center the div
div.appendChild(wrapper);
// Add the div to the bar
bar.appendChild(div);
// Add event listener to the checkbox
checkbox.addEventListener('change', function() {
if (!this.checked) {
e.music.Volume = 0; // Set the initial volume of the music player to 0
}
});
let trackIndices;
let shuffledIndices;
$("#game_start").click((event) => {
event.preventDefault();
musicMode()
})
musicMode = () => {
$("#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.id ='timeTracker'
timeTracker.style = `
text-align:left;
border-style:solid;
border-width:3px;
height:200px;
width:200px;
background-color:#6699CC;
float:right;
padding: 10px;
`
$("#trackSelParent")[0].prepend(timeTracker);
$("#trackSelParent")[0].prepend(document.createElement("br"));
var positionDisplay = document.createElement("gg");
positionDisplay.id = "position-display";
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 = "<b>Pause</b>"
pausePlay.style.width = "100%";
pausePlay.style.margin = "2px";
pausePlay.addEventListener("click", event => {
event.preventDefault();
updatePositionDisplay();
let audio = document.getElementById("campaigntrailmusic");
if (audio.paused) {
audio.play();
event.target.innerHTML = "<b>Pause</b>";
return;
}
audio.pause();
event.target.innerHTML = "<b>Play</b>";
return;
})
var shuffleButton = document.createElement("button");
shuffleButton.id = "shuffle-button";
shuffleButton.innerHTML = "<b>Shuffle</b>"
shuffleButton.style.width = "100%"
shuffleButton.style.margin = "2px";;
shuffleButton.addEventListener("click", event => {
event.preventDefault();
e.music.shuffleEnabled = !e.music.shuffleEnabled;
event.target.innerHTML = e.music.shuffleEnabled ? "<b>Unshuffle</b>" : "<b>Shuffle</b>";
if (e.music.shuffleEnabled) {
shuffledIndices = shuffle(trackIndices.slice());
let currentTrackIndex = Number(document.querySelector('input[name="trackSelector"]:checked').value);
shuffledIndices = shuffledIndices.filter(index => index !== currentTrackIndex);
shuffledIndices.unshift(currentTrackIndex);
}
});
var skipButton = document.createElement("button");
skipButton.id = "skip-button";
skipButton.innerHTML = "<b>Skip</b>"
skipButton.style.width = "100%";
skipButton.style.margin = "2px"; // Add margin
skipButton.addEventListener("click", event => {
event.preventDefault();
let selected = Number(document.querySelector('input[name="trackSelector"]:checked').value);
let newSel;
if (e.music.shuffleEnabled) {
if (!shuffledIndices) {
shuffledIndices = shuffle(trackIndices.slice());
}
let currentIndex = shuffledIndices.findIndex(index => index === selected);
if (currentIndex === shuffledIndices.length - 1) {
shuffledIndices = shuffle(trackIndices.slice());
currentIndex = -1;
}
newSel = shuffledIndices[currentIndex + 1];
} else {
newSel = selected + 1 === soundtracks[e.selectedSoundtrack].tracklist.length ? 0 : selected + 1;
}
let buttons = Array.from(document.getElementById("trackSel").children).filter(f => {
return f.tagName == "LABEL"
}).map(f => f.children[0])
buttons[newSel].click()
});
skipButton.style.width = "50%";
var loopButton = document.createElement("button");
loopButton.id = "loop-button";
loopButton.innerHTML = e.music.loopEnabled ? "<b>Unloop</b>" : "<b>Loop Song</b>"; // Check the initial loop state
loopButton.style.width = "50%"; // Match the width with skipButton
loopButton.style.margin = "2px";
loopButton.addEventListener("click", event => {
event.preventDefault();
e.music.loopEnabled = !e.music.loopEnabled;
let audio = document.getElementById("campaigntrailmusic");
audio.loop = e.music.loopEnabled; // Set the audio's loop property
event.target.innerHTML = e.music.loopEnabled ? "<b>Unloop</b>" : "<b>Loop Song</b>"; // Toggle the button text
});
var volumeLabel = document.createElement("gg");
volumeLabel.id = "volume-label";
volumeLabel.innerHTML = "<br><b>Volume: </b>"
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";
audio.volume= e.music.Volume;
volumeSlider.value = audio.volume;
timeTracker.appendChild(pausePlay);
if (audio.volume === 0) {
audio.pause();
pausePlay.innerHTML = "<b>Play</b>"; // Update the pause button text to "Play"
}
timeTracker.appendChild(shuffleButton);
var buttonContainer = document.createElement("div");
buttonContainer.style.display = "flex"; // Makes children inline
buttonContainer.style.justifyContent = "space-between";
skipButton.style.flex = "1"; // Makes it take up equal space
skipButton.style.marginRight = "5px"; // Adds some space between the buttons
loopButton.style.marginRight = "0px";
buttonContainer.appendChild(skipButton);
buttonContainer.appendChild(loopButton);
timeTracker.appendChild(buttonContainer); // Add the container to timeTracker instead of individual buttons
timeTracker.appendChild(positionDisplay);
timeTracker.appendChild(timeSlider);
timeTracker.appendChild(volumeLabel);
timeTracker.appendChild(volumeSlider);
updatePositionDisplay();
function updatePositionDisplay() {
positionDisplay.innerHTML = "<b>Time:</b> " + toTime(audio.currentTime) + "<br>";
timeSlider.value = audio.duration ? audio.currentTime / audio.duration : 0;
}
function changeTime() {
positionDisplay.innerHTML = "<b>Time:</b> " + toTime(audio.currentTime) + "<br>";
audio.currentTime = timeSlider.value * audio.duration;
}
updateVolume = event => {
audio.volume = event.target.value;
e.music.Volume=audio.volume;
}
setInterval(updatePositionDisplay, 1000);
timeSlider.addEventListener("input", changeTime);
volumeSlider.addEventListener("input", updateVolume)
}
function newMusicPlayer(previousBgImage = null) {
trackSel = document.createElement("div");
trackSel.id = "trackSelParent";
let z = `<br><br><br><br><br><br><br><br><br><br><br><br><div id='trackSel' style="text-align:left;border-style:solid;border-width:3px;overflow-y: scroll;overflow-x: hidden;height:200px; width:400px;background-color:#6699CC;float:right;">`
z += `<b><select id='selectSoundtrack'><option value='` + soundtracks[e.selectedSoundtrack].name + `'>` + soundtracks[e.selectedSoundtrack].name + "</option>"
for (i in soundtracks) {
if (soundtracks[e.selectedSoundtrack] != soundtracks[i]) {
z += `<option value='` + soundtracks[i].name + `'>` + soundtracks[i].name + `</option>`
}
}
z += `</select></b><br><br>`
// <label><input type="radio" name="option" value="option1">Option 1</label><br>
for (i in soundtracks[e.selectedSoundtrack].tracklist) {
let a = soundtracks[e.selectedSoundtrack].tracklist[i]
let b = `<label><input class="trackSelector" type="radio" name="trackSelector" value="` + i + `">` + a.name + `</label><br>`
z += b
}
z += "</div><br><br>"
trackSel.innerHTML = z
musicBox.appendChild(trackSel);
Array.from(document.getElementById("trackSel").children).filter(f => {
return f.tagName == "LABEL"
}).map(f => f.children[0])[0].checked = true
soundtrackSelector = document.getElementById("selectSoundtrack")
soundtrackSelector.onchange = function() {
let currentBgImage = document.getElementById("trackSel").style.backgroundImage;
for (i in soundtracks) {
if (soundtracks[i].name == soundtrackSelector.value) {
e.selectedSoundtrack = i;
break;
}
}
e.music.shuffleEnabled = false;
shuffledIndices = null;
document.getElementById("trackSelParent").remove();
newMusicPlayer(currentBgImage); // Pass the current background image to the next function invocation.
};
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
trackIndices = Array.from({length: soundtracks[e.selectedSoundtrack].tracklist.length}, (_, i) => i);
musicBox.children[2].onended = function() {
if (e.music.loopEnabled) {
this.play(); // If loop is enabled, simply play the same track again
} else {
let selected = Number(document.querySelector('input[name="trackSelector"]:checked').value);
let newSel;
if (e.music.shuffleEnabled) {
if (!shuffledIndices) {
shuffledIndices = shuffle(trackIndices.slice());
}
let currentIndex = shuffledIndices.findIndex(index => index === selected);
if (currentIndex === shuffledIndices.length - 1) {
shuffledIndices = shuffle(trackIndices.slice());
currentIndex = -1;
}
newSel = shuffledIndices[currentIndex + 1];
} else {
newSel = selected + 1 === soundtracks[e.selectedSoundtrack].tracklist.length ? 0 : selected + 1;
}
let buttons = Array.from(document.getElementById("trackSel").children).filter(f => {
return f.tagName == "LABEL"
}).map(f => f.children[0])
buttons[newSel].click()
}
}
for (w = 0; w < 7; w++) {
document.getElementById("trackSelParent").appendChild(document.createElement("br"))
}
generateTime();
if (previousBgImage) {
document.getElementById("trackSel").style.backgroundImage = previousBgImage;
document.getElementById("timeTracker").style.backgroundImage = previousBgImage;
}
}
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;
}
var soundtracks = {
0: {
name: "Intro",
tracklist: [
{
"name": "Tagesthemen Intro die Ärzte",
"url": "https://audio.jukehost.co.uk/ZhbjifIdsjrc5hBuvWg5xhxzkWX8RpWQ"
},
{
"name": "Tagesschau Intro",
"url": "https://audio.jukehost.co.uk/qVu0KPk7sb101u4JE4C0H64Q1svdNhpy"
}
]
},
1: {
name: "German Kulturgut",
tracklist: [
{
"name": "Tatort Intro",
"url": "https://audio.jukehost.co.uk/NKy8Q93up3YSDPzAb8Iz4AwOl2q128c8"
},
{
"name": "Lindenstraße Musik",
"url": "https://audio.jukehost.co.uk/ogTTlkQ9ypyBtuxOxriYex1RdVSlt0tr"
},
{
"name": "Löwenzahn Intro",
"url": "https://audio.jukehost.co.uk/Bzr6HolQvwANmVMtTcVH1BFJUr4Voni9"
},
{
"name": "Das Lied der Deutschen",
"url": "https://audio.jukehost.co.uk/wrZfKjJop7Sf7catdYrrOGFvv6suZ3Z2"
},
{
"name": "Europahymne",
"url": "https://audio.jukehost.co.uk/F9vTiIJ9bfayOiIUHkPFhhvEkgGPVCah"
},
{
"name": "Einzug der Götter in Walhall",
"url": "https://audio.jukehost.co.uk/q3EczEBz17qxhVLEcfn8nSHqOvyCw3Ly"
}
]
},
2: {
name: "German Oldies",
tracklist: [
{
"name": "Nena – 99 Luftballons",
"url": "https://audio.jukehost.co.uk/BkSrZdogzPLCZZF2GfNdeCqxABnR5Kud"
},
{
"name": "Trio – Da Da Da",
"url": "https://audio.jukehost.co.uk/HqEHySdEh1jLkanjesmAyqbDuRvgaKrt"
},
{
"name": "Kraftwerk – Autobahn",
"url": "https://audio.jukehost.co.uk/qDyd8pdjo9jJWg1i3lPtoqXiR3bV01X4"
},
{
"name": "Udo Jürgens – Griechischer Wein ",
"url": "https://audio.jukehost.co.uk/nAAWKs5LTxc79TenwPIktQhPBX0QOCsp"
},
{
"name": "Udo Lindenberg – Sonderzug nach Pankow ",
"url": "https://audio.jukehost.co.uk/Oa1soEvLXZiY8xEZqDI7jEDH5uS7snkd"
},
{
"name": "Nina Hagen – Du hast den Farbfilm vergessen ",
"url": "https://audio.jukehost.co.uk/Mragv7cuEs5hkf3sRqMl3O6eAQNVY2Ps"
},
{
"name": "Nena – Irgendwie, Irgendwo, Irgendwann",
"url": "https://audio.jukehost.co.uk/VfJopdWYgDwYkCcRXd3RLsqRThzAhY2Z"
},
{
"name": "Die Ärzte - Schrei nach Liebe",
"url": "https://audio.jukehost.co.uk/hLdoDN8cL1hHRtIWnM0zvhaoD8638RzC"
},
{
"name": "Die Ärzte - Deine Schuld",
"url": "https://audio.jukehost.co.uk/QRyxqkjwqA8C2Ot8iBpgPP3np7qdn7KB"
}
]
},
3: {
name: "Modern German Music",
tracklist: [
{
"name": "Wir sind Helden – Nur Ein Wort",
"url": "https://audio.jukehost.co.uk/qDiDcpB2wBsRWF51s5qzCJDQuFiNLizb"
},
{
"name": "AnnenMayKantereit – Oft gefragt",
"url": "https://audio.jukehost.co.uk/JPhDjh5xpnp8RoN8fJmBy0Puflk0kpCj"
},
{
"name": "Peter Fox – Schwarz zu Blau",
"url": "https://audio.jukehost.co.uk/GljMxO8sPfXwiw6bd6htTWgnUJGeNyee"
},
{
"name": "KRAFTKLUB – Schüsse in die Luft",
"url": "https://audio.jukehost.co.uk/PNAclY6rsyBR9XslSqdJuVjDvnQKORXD"
},
{
"name": "Andreas Bourani – Auf Uns",
"url": "https://audio.jukehost.co.uk/vTWb79oaljEQA0JlD2CFLOjsDdWv1qHI"
},
{
"name": "Tim Bendzko – Nur Noch Kurz die Welt retten ",
"url": "https://audio.jukehost.co.uk/QZ5eSsBMUpbtP8hK8lGdlzbVp3xwU203"
},
{
"name": "Polarkreis 18 – Allein Allein",
"url": "https://audio.jukehost.co.uk/Hk2WcGPaM4pvk0nFU25Tyc0eDmcCbJzX"
}
]
},
4: {
name: "Deutsche Volkslieder (CDU)",
tracklist: [
{
"name": "Kein Schöner Land in dieser Zeit",
"url": "https://audio.jukehost.co.uk/uIgj0CVfmjCuZXXijb5q5TllO1YCirJ7"
},
{
"name": "Die Gedanken sind frei",
"url": "https://audio.jukehost.co.uk/tkDStJdGqTciE32ffGi5KfA5ivXryp0n"
},
{
"name": "Loreley (Ich weiß nicht, was soll es bedeuten)",
"url": "https://audio.jukehost.co.uk/khDuwgJkQeuMGCDtsj9MZzVR5oXx77m3"
},
{
"name": "Du, Du liegst mir im Herzen",
"url": "https://audio.jukehost.co.uk/7vrV36bOAG9NICYU4aaDaCt3f5lQY0Ly"
},
{
"name": "Wenn die bunten Fahnen wehen",
"url": "https://audio.jukehost.co.uk/KgRBbjcuWrBMeLKAtaIdCVzsimoJECOJ"
}
]
},
5: {
name: "Deutsche Protestlieder (Greens)",
tracklist: [
{
"name": "Gänsehaut - Karl der Käfer",
"url": "https://audio.jukehost.co.uk/tOIQPlaw82UKsHn7uHwiphmLmcN2Nlqi"
},
{
"name": "Ton Steine Scherben – Keine Macht für niemand",
"url": "https://audio.jukehost.co.uk/5bMPhVJ7nw144ozYr3ZZY3l5y9z2w7mP"
},
{
"name": "Bots - Aufstehen",
"url": "https://audio.jukehost.co.uk/NCi34TbOXzSMAyl3zcGpNl8G3xOAPv1w"
},
{
"name": "Fehlfarben - Ein Jahr (Es geht voran)",
"url": "https://audio.jukehost.co.uk/V9uOn3Gz8rceMvHzVTNUc810KhumV2DQ"
},
{
"name": "Teller Bunte Knete - Stadtmensch",
"url": "https://audio.jukehost.co.uk/cx2fCT39iUUKkY7ACs3s1WbZlMzuUFVS"
}
]
},
6: {
name: "Deutsche Arbeiterlieder (SPD)",
tracklist: [
{
"name": "Die Internationale",
"url": "https://audio.jukehost.co.uk/YRSDVAYgnyXHns7vHej9eVxQJuh1fvXG"
},
{
"name": "Wann wir schreiten Seit an Seit",
"url": "https://audio.jukehost.co.uk/sp3u8Dqrxvvd8jqfpObBLiQ2p5wlXfVp"
},
{
"name": "Brüder, zur Sonne, zur Freiheit",
"url": "https://audio.jukehost.co.uk/BsxGlENqGde2gD6v6ordiUSEImHqQBdG"
},
{
"name": "Auferstanden aus Ruinen (DDR Anthem)",
"url": "https://audio.jukehost.co.uk/aI0b0qaqzB1wUEwu2vuQHEwzkgLTd7sK"
},
{
"name": "Das Arbeitsfrontlied",
"url": "https://audio.jukehost.co.uk/1ZqxJuWRqGKhtOKoQJcnZacs5K4xQaFu"
}
]
},
7: {
name: "Bonus Songs: Achievement Contest Winners",
tracklist: [
{
"name": "Long Way - Song of German-Danish friendship, chosen by Onkel Danny",
"url": "https://audio.jukehost.co.uk/9fZ6fLnhCnM5oMfGQQhuWGS68vO5DQRq"
}
]
}
}
newMusicPlayer()
}
function shuffle(array) {
let currentIndex = array.length, temporaryValue, randomIndex;
while (0 !== currentIndex) {
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex -= 1;
temporaryValue = array[currentIndex];
array[currentIndex] = array[randomIndex];
array[randomIndex] = temporaryValue;
}
return array;
}
headerImage = '';
function updateHeader() {
var gameHeader = document.getElementsByClassName("game_header")[0];
if (gameHeader.getAttribute("id") !== "modifiedHeader") {
gameHeader.innerHTML = corrr;
gameHeader.style.backgroundImage = headerImage;
gameHeader.style.backgroundSize = "cover";
gameHeader.style.backgroundColor = nct_stuff.themes[nct_stuff.selectedTheme].coloring_title;
gameHeader.setAttribute("id", "modifiedHeader");
gameHeader.style.height="6.5em";
}
}
var headerobserver = new MutationObserver(updateHeader);
headerobserver.observe(document.documentElement, { childList: true, subtree: true });
function updateCandidateForm() {
const heading = document.querySelector("#candidate_form form h3");
if (heading) {
heading.textContent = "Please select your party:";
}
}
function updateRunningMateForm() {
const heading = document.querySelector("#running_mate_form form h3");
if (heading) {
heading.textContent = "Please select your candidate:";
}
}
function removeCandidateSummary() {
const candidateSummary = document.querySelector("#candidate_summary");
if (candidateSummary) {
const ulList = candidateSummary.querySelectorAll("ul:not(.my-ul)");
ulList.forEach(ul => candidateSummary.removeChild(ul));
}
}
function modifyAllocationForm() {
const form = document.querySelector('form[name="game_type_selection"]');
if(form){
const select = form.querySelector('select[name="game_type_id"]');
// change option value
const option = select.querySelector('option[value="1"]');
option.textContent = 'Proportional (Bundestag)';
var optionToRemove = document.querySelector('option[value="2"]');
if (optionToRemove) {
optionToRemove.style.display = 'none';
}
// change h3 text
const h3 = form.querySelector('h3');
h3.textContent = 'How would you like the seats to be allocated';
}
}
function changeOpponentSelectionDescription() {
const opponentSelectionDescription = document.getElementById("opponent_selection_description_window");
if (!opponentSelectionDescription) return;
// Check if the divs already exist, and if they do, stop the function
if (document.getElementById("div1") || document.getElementById("div2")) return;
// Clear the original content
opponentSelectionDescription.innerHTML = '';
// Define the texts and button labels
const text1 = `<p><strong>Use the allocation method for the German Bundestag.</strong></p><p>The German electoral system is quite complex. Every voter has two votes, one for a party and one for a directly elected candidate in their constituency. Theoretically, half the parliament is determined first past the post by these direct elections and half proportionally through the party votes, with seats allocated with the Sainte-Laguë method on a per-state basis.<br> However, if a party receives more seats through this system than it would if the parliament was elected by strictly proportional votes, they get extra (overhanging) mandates and all over parties get compensatory mandates. Overall, all but three overhanging mandates get compensated. <br> To enter parliament, a party either needs 5% of the proportional vote or win in at least three districts. <br> For the purpose of this game, the system has been simplified. Only the proportional vote has been simulated - though there are some heuristics to guess the number of constituencies won by parties where this is relevant.`;
const text2 = `<p><strong>Difficulty Options</strong></p>
<p>This mod offers five unique difficulty settings to customize your game.<br>
<strong>Campaign Difficulty</strong> is the standard difficulty setting that impacts your party's standing in the polls.<br>
<strong>Coalition Difficulty</strong> determines the difficulty of post-election coalition negotiations. On "Guaranteed", any coalition you select will form, independent of election results. Generally, coalition probabilities are based on the election winner, margin of victory, campaign decisions, and certain coalitions' inherent likelihood.<br>
The <strong>Alternate Election Night option </strong>allows you to switch to an election night experience that is more in line with how election night plays out in Germany<br>
The <strong>Advisor mode</strong> allows you to hire and dismiss your campaign advisors during the campaign. They all have different effects and can be found in the headquarter.<br>
The <strong><span class="mytooltip">Tooltip option<span class="mytooltiptext">Look out for words with a light blue background like this and hover them for a tooltip.</span></span> </strong>provides tooltips for key phrases, offering extra explanations - especially beneficial for those not acquainted with German politics.</p>
`
const btnText1 = 'Difficulty Options';
const btnText2 = 'Electoral System';
// Create the first div with the first text and the toggle button
const div1 = document.createElement('div');
div1.id = "div1";
div1.innerHTML = `<p>${text1}</p><button id="toggleBtn">${btnText1}</button>`;
// Create the second div with the second text, initially hidden
const div2 = document.createElement('div');
div2.id = "div2";
div2.style.display = 'none';
div2.innerHTML = `<p>${text2}</p><button id="toggleBtn2">${btnText2}</button>`;
// Append both divs to the original element
opponentSelectionDescription.appendChild(div1);
opponentSelectionDescription.appendChild(div2);
// Get the buttons
const button1 = document.getElementById("toggleBtn");
const button2 = document.getElementById("toggleBtn2");
// Add event listeners to the buttons to toggle visibility of the divs
button1.addEventListener("click", function() {
div1.style.display = 'none';
div2.style.display = 'block';
});
button2.addEventListener("click", function() {
div2.style.display = 'none';
div1.style.display = 'block';
});
}
function addCoalitionDifficultyDropdown() {
var difficultyDiv = document.getElementById("difficulty_level");
if (difficultyDiv && !document.getElementById("coalitionDifficultyDropdown")) {
var difficulties = ["Guaranteed", "Very Easy", "Easy", "Normal", "Hard", "Impossible"];
var difficultyValues = [1000000, 5, 1.5, 1, 0.75, 0.2];
var dropdown = document.createElement("select");
dropdown.id = "coalitionDifficultyDropdown";
for (var i = 0; i < difficulties.length; i++) {
var opt = document.createElement("option");
opt.text = difficulties[i];
if (difficulties[i] === "Normal") {
opt.selected = true;
}
opt.value = difficultyValues[i];
dropdown.options.add(opt);
}
var form = document.createElement("form");
form.name = "coalition_difficulty_level_selection";
var header = document.createElement("h3");
header.textContent = "Select coalition difficulty:";
form.appendChild(header);
form.appendChild(dropdown);
difficultyDiv.appendChild(form);
var visitsForm = document.createElement("form");
visitsForm.name = "state_visits_selection";
var visitsHeader = document.createElement("h3");
visitsHeader.textContent = "Change Election Night";
visitsForm.appendChild(visitsHeader);
var visitsCheckbox = document.createElement("input");
visitsCheckbox.type = "checkbox";
visitsCheckbox.id = "stateVisitsCheckbox";
visitsCheckbox.checked = true;
visitsForm.appendChild(visitsCheckbox);
difficultyDiv.appendChild(visitsForm);
visitsCheckbox.addEventListener("change", function() {
e.electionNight = this.checked;
});
var AdvisorForm = document.createElement("form");
AdvisorForm.name = "realistic_polls_selection";
var AdvisorHeader = document.createElement("h3");
AdvisorHeader.textContent = "Advisor Mode";
AdvisorForm.appendChild(AdvisorHeader);
var AdvisorCheckbox = document.createElement("input");
AdvisorCheckbox.type = "checkbox";
AdvisorCheckbox.id = "AdvisorCheckbox";
AdvisorCheckbox.checked = e.realisticPolls;
AdvisorForm.appendChild(AdvisorCheckbox);
difficultyDiv.appendChild(AdvisorForm);
AdvisorCheckbox.addEventListener("change", function() {
e.staff_mode = this.checked;
});
// Add tooltip checkbox here
var tooltipForm = document.createElement("form");
tooltipForm.name = "tooltip_selection";
var tooltipHeader = document.createElement("h3");
tooltipHeader.textContent = "Enable tooltips";
tooltipForm.appendChild(tooltipHeader);
var tooltipCheckbox = document.createElement("input");
tooltipCheckbox.type = "checkbox";
tooltipCheckbox.id = "tooltipCheckbox";
tooltipCheckbox.checked = true;
tooltipForm.appendChild(tooltipCheckbox);
difficultyDiv.appendChild(tooltipForm);
tooltipCheckbox.addEventListener("change", function() {
e.displayTooltips = this.checked;
});
var difficultyForm = document.querySelector('form[name="difficulty_level_selection"]');
var difficultyHeader = difficultyForm.querySelector('h3');
difficultyHeader.textContent = "Select campaign difficulty:";
var forms = document.querySelectorAll("#difficulty_level form");
for (var i = 0; i < forms.length; i++) {
forms[i].style.display = "inline-block";
forms[i].style.paddingLeft = "10px"; // adjust the value as needed
forms[i].style.paddingRight = "10px"; // adjust the value as needed
}
dropdown.addEventListener("change", function() {
campaignTrail_temp.coalitionDifficulty = this.value;
});
}
}
function walkAndReplace(node, wordsToFind) {
if (node.nodeType === Node.TEXT_NODE) {
// Ignore nodes that are already wrapped with our span
if (node.parentNode.nodeName.toLowerCase() === "span" && node.parentNode.style.color === 'white') {
return;
}
let matched = false;
let newNodeValue = node.nodeValue;
for(let word of wordsToFind) {
let searchRegEx = new RegExp(word, 'g');
if (searchRegEx.test(newNodeValue)) {
matched = true;
newNodeValue = newNodeValue.replace(searchRegEx, `<span style="color: white;">${word}</span>`);
}
}
if (matched) {
let div = document.createElement('div');
div.innerHTML = newNodeValue;
let parent = node.parentNode;
while (div.firstChild) {
parent.insertBefore(div.firstChild, node);
}
parent.removeChild(node);
}
} else {
for(let i = 0; i < node.childNodes.length; i++) {
walkAndReplace(node.childNodes[i], wordsToFind);
}
}
}
const myTableHTML = `
<table> <tbody> <tr> <th>Party</th> <th>Seats</th> <th>Popular Votes</th> <th>Popular Vote %</th> </tr> <tr><td style="text-align: left;"> <span style="background-color: #D61A29; color: #D61A29;">----</span> SPD</td><td> 206 </td><td> 11,955,434 </td><td> 25.7% </td></tr> <tr><td style="text-align: left;"> <span style="background-color: #28282B; color: #28282B;">----</span> CDU/CSU</td><td> 197 </td><td> 11,178,298 </td><td> 24.1% </td></tr> <tr><td style="text-align: left;"> <span style="background-color: #13A12D; color: #13A12D;">----</span> Green Party</td><td> 118 </td><td> 6,852,206 </td><td> 14.8% </td></tr> <tr><td style="text-align: left;"> <span style="background-color: #F5F518; color: #F5F518;">----</span> FDP</td><td> 92 </td><td> 5,319,952 </td><td> 11.5% </td></tr> <tr><td style="text-align: left;"> <span style="background-color: #2B8FE0; color: #2B8FE0;">----</span> AfD</td><td> 83 </td><td> 4,803,902 </td><td> 10.3% </td></tr> <tr><td style="text-align: left;"> <span style="background-color: #C910BA; color: #C910BA;">----</span> The Left</td><td> 39 </td><td> 2,270,906 </td><td> 4.9% </td></tr> <tr><td style="text-align: left;"> <span style="background-color: #807E7F; color: #807E7F;">----</span> Others</td><td> 1 </td><td> 4,061,325 </td><td> 8.7% </td></tr></tbody></table>
`;
function resultReplacer() {
const allTables = document.querySelectorAll('table');
const targetTable = Array.from(allTables).find(table => {
// Ensure table has at least 2 rows and the second row has at least one cell
if (table.rows.length > 1 && table.rows[1].cells.length > 0) {
// Get the first cell of the second row
const firstColumnSecondRow = table.rows[1].cells[0];
// Check if the cell's HTML contains '</span>'
if (firstColumnSecondRow.innerHTML.includes('</span>')) {
// Split the cell's HTML by '</span>'
const splitHTML = firstColumnSecondRow.innerHTML.split('</span>');
// Get the text after '</span>', if any
const textAfterSpan = splitHTML.length > 1 ? splitHTML[1].trim() : '';
// Check if the text after '</span>' is 'Replace Me'
if (textAfterSpan === 'Replace Me') {
return true;
}
}
}
return false;
});
if (targetTable) {
targetTable.outerHTML = myTableHTML;
}
}
let pages = [];
let currentPage = 0;
let maxCharsPerPage = 1250;
function displayPage(pageNumber) {
const contentDiv = document.getElementById('running_mate_summary');
const oldParagraphs = Array.from(contentDiv.getElementsByTagName('p'));
oldParagraphs.forEach(p => p.remove());
pages[pageNumber].forEach(function(paragraph) {
contentDiv.appendChild(paragraph.cloneNode(true));
});
const ulElement = contentDiv.querySelector('ul');
if(pageNumber===0){
const firstParagraph = contentDiv.querySelector('p');
// Check if firstParagraph exists and has a child 'i' element.
if (firstParagraph) { const italicContent = firstParagraph.querySelector('i');
if (italicContent) {
// Extract content from 'i' tags
const extractedText = italicContent.textContent;
// Remove the 'i' content from the paragraph
italicContent.remove();
// Create new element to hold the extracted content
const newElement = document.createElement('p');
// Wrap in bold and italic tags
const boldAndItalicText = document.createElement('i');
const boldText = document.createElement('b');
boldText.textContent = extractedText;
boldAndItalicText.appendChild(boldText);
newElement.appendChild(boldAndItalicText);
// Insert new element right before the ul list
if (ulElement) {
contentDiv.insertBefore(newElement, ulElement);
}
}
}
}
if (contentDiv.querySelector('ul')) {
contentDiv.querySelector('ul').style.display = (pageNumber === 0) ? 'block' : 'none';
const firstLi = ulElement.querySelector('li:first-child');
const liElements = ulElement.querySelectorAll('li');
if (firstLi) {
if(liElements.length === 3){
const firstLiContent = firstLi.textContent;
if (firstLiContent === "Name: Armin Laschet") {
const newLi = document.createElement('li');
newLi.textContent = "Character Mechanic: Statesmanship";
ulElement.appendChild(newLi);
}
if (firstLiContent === "Name: Friedrich Merz") {
const newLi = document.createElement('li');
newLi.textContent = "Character Mechanic: Radicalism";
ulElement.appendChild(newLi);
}
if (firstLiContent === "Name: Markus Söder") {
const newLi = document.createElement('li');
newLi.textContent = "Character Mechanic: Opportunism";
ulElement.appendChild(newLi);
}
if (firstLiContent === "Name: Olaf Scholz") {
const newLi = document.createElement('li');
newLi.textContent = "Character Mechanic: Merkelism";
ulElement.appendChild(newLi);
}
if (firstLiContent === "Name: Annalena Baerbock") {
const newLi = document.createElement('li');
newLi.textContent = "Character Mechanic: Likeability";
ulElement.appendChild(newLi);
}
if (firstLiContent === "Name: Robert Habeck") {
const newLi = document.createElement('li');
newLi.textContent = "Character Mechanic: Patience";
ulElement.appendChild(newLi);
}
if (firstLiContent === "Name: Rolf Mützenich") {
const newLi = document.createElement('li');
newLi.textContent = "Character Mechanic: Reformism";
ulElement.appendChild(newLi);
}
}
}