From ff4254480255db29cbaeb3c043b7777ebe367286 Mon Sep 17 00:00:00 2001 From: Primo <44984918+m-primo@users.noreply.github.com> Date: Wed, 5 May 2021 05:18:08 +0200 Subject: [PATCH] added more questions [1] --- .gitignore | 1 + js/questions.js | 482 +++++++++++++++++++++++++++++++++++++++++++----- js/quiz.js | 4 +- js/results.js | 2 +- 4 files changed, 440 insertions(+), 49 deletions(-) diff --git a/.gitignore b/.gitignore index 1d74e21..88b65bb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .vscode/ +notes.txt \ No newline at end of file diff --git a/js/questions.js b/js/questions.js index bc9b047..cd1c12a 100644 --- a/js/questions.js +++ b/js/questions.js @@ -1,48 +1,436 @@ -questions = [ - {"id": 0, "question": "Freedom of business is the best practical way a society can prosper.", "effects": {"right": 1}}, - {"id": 1, "question": "Charity is a better way of helping those in need than social welfare.", "effects": {"right": 1}}, - {"id": 2, "question": "Wages are always fair, as employers know best what a worker's labour is worth.", "effects": {"right": 1}}, - {"id": 3, "question": "It is \"human nature\" to be greedy.", "effects": {"right": 1}}, - {"id": 4, "question": "\"Exploitation\" is an outdated term, as the struggles of 1800s capitalism doesn't exist anymore.", "effects": {"right": 1}}, - {"id": 5, "question": "Communism is an ideal that can never work in practice.", "effects": {"right": 1}}, - {"id": 6, "question": "Taxation of the wealthy is a bad idea, society would be better off without it.", "effects": {"right": 1}}, - {"id": 7, "question": "The harder you work, the more you progress up the social ladder.", "effects": {"right": 1}}, - {"id": 8, "question": "Organisations and corporations cannot be trusted and need regulating by the government.", "effects": {"right": -1}}, - {"id": 9, "question": "A government that provides for everyone is an inherently good idea.", "effects": {"right": -1}}, - {"id": 10, "question": "The current welfare system should be expanded to further combat inequality.", "effects": {"right": -1}}, - {"id": 11, "question": "Land should not be a commodity to be bought and sold.", "effects": {"right": -1}}, - {"id": 12, "question": "All industry and the bank should be nationalised.", "effects": {"right": -1}}, - {"id": 13, "question": "Class is the primary division of society.", "effects": {"right": -1}}, - {"id": 14, "question": "Economic inequality is too high in the world.", "effects": {"right": -1}}, - {"id": 15, "question": "Sometimes it is right that the government may spy on its citizens to combat extremists and terrorists.", "effects": {"auth": 1}}, - {"id": 16, "question": "Authority figures, if morally correct, are a good thing for society.", "effects": {"auth": 1}}, - {"id": 17, "question": "Strength is necessary for any government to succeed.", "effects": {"auth": 1}}, - {"id": 18, "question": "Only the government can fairly and effectively regulate organisations.", "effects": {"auth": 1}}, - {"id": 19, "question": "Society requires structure and bureaucracy in order to function.", "effects": {"auth": 1}}, - {"id": 20, "question": "Mandatory IDs should be used to ensure public safety.", "effects": {"auth": 1}}, - {"id": 21, "question": "In times of crisis, safety becomes more important than civil liberties.", "effects": {"auth": 1}}, - {"id": 22, "question": "If you have nothing to hide, you have nothing to fear.", "effects": {"auth": 1}}, - {"id": 23, "question": "The government should be less involved in the day to day life of its citizens.", "effects": {"auth": -1}}, - {"id": 24, "question": "Without democracy, a society is nothing.", "effects": {"auth": -1}}, - {"id": 25, "question": "Jury nullification should be legal.", "effects": {"auth": -1}}, - {"id": 26, "question": "The smaller the government, the freer the people.", "effects": {"auth": -1}}, - {"id": 27, "question": "The government should, at most, provide emergency services and law enforcement.", "effects": {"auth": -1}}, - {"id": 28, "question": "The police was not made to protect the people, but to uphold the status-quo by force.", "effects": {"auth": -1}}, - {"id": 29, "question": "State schools are a bad idea because our state shouldn't be influencing our children.", "effects": {"auth": -1}}, - {"id": 30, "question": "Two consenting individuals should be able to do whatever they want with each other, even if it makes me uncomfortable.", "effects": {"prog": 1}}, - {"id": 31, "question": "An individual's body is their own property, and they should be able to do anything they desire to it.", "effects": {"prog": 1}}, - {"id": 32, "question": "A person should be able to worship whomever or whatever they want.", "effects": {"prog": 1}}, - {"id": 33, "question": "Nudism is perfectly natural.", "effects": {"prog": 1}}, - {"id": 34, "question": "Animals deserve certain universal rights.", "effects": {"prog": 1}}, - {"id": 35, "question": "Gender is a social construct, not a natural state of affairs.", "effects": {"prog": 1}}, - {"id": 36, "question": "Laws based on cultural values, rather than ethical ones, aren't justice.", "effects": {"prog": 1}}, - {"id": 37, "question": "Autonomy of body extends even to minors, the mentally ill, and serious criminals.", "effects": {"prog": 1}}, - {"id": 38, "question": "Homosexuality is against my values.", "effects": {"prog": -1}}, - {"id": 39, "question": "Transgender individuals should not be able to adopt children.", "effects": {"prog": -1}}, - {"id": 40, "question": "Drugs are harmful and should be banned.", "effects": {"prog": -1}}, - {"id": 41, "question": "The death penalty should exist for certain crimes.", "effects": {"prog": -1}}, - {"id": 42, "question": "Victimless crimes should still be punished.", "effects": {"prog": -1}}, - {"id": 43, "question": "One cannot be moral without religion.", "effects": {"prog": -1}}, - {"id": 44, "question": "Parents should hold absolute power over their children, as they are older and more experienced.", "effects": {"prog": -1}}, - {"id": 45, "question": "Multiculturalism is bad.", "effects": {"prog": -1}} +let questions = [ + { + "question": "Our focus should be on individuals rather than group identities.", + "effects": { + "right": 1 + } + }, + { + "question": "Freedom of business is the best practical way a society can prosper.", + "effects": { + "right": 1 + } + }, + { + "question": "Capitalism is better than any existing alternative.", + "effects": { + "right": 1 + } + }, + { + "question": "Charity is a better way of helping those in need than social welfare.", + "effects": { + "right": 1 + } + }, + { + "question": "Those with the ability to pay should have access to higher standards of medical care.", + "effects": { + "right": 1 + } + }, + { + "question": "Wages are always fair, as employers know best what a worker's labour is worth.", + "effects": { + "right": 1 + } + }, + { + "question": "Government intervention is a threat to the economy.", + "effects": { + "right": 1 + } + }, + { + "question": "Communism is an ideal that can never work in practice.", + "effects": { + "right": 1 + } + }, + { + "question": "The freer the markets, the freer the people.", + "effects": { + "right": 1 + } + }, + { + "question": "The harder you work, the more you progress up the social ladder.", + "effects": { + "right": 1 + } + }, + { + "question": "Those with a greater ability to pay should receive better healthcare.", + "effects": { + "right": 1 + } + }, + { + "question": "It is okay to restrict individual rights if the community benefits from it.", + "effects": { + "right": -1 + } + }, + { + "question": "Taxes should be increased on the rich to provide for the poor.", + "effects": { + "right": -1 + } + }, + { + "question": "Organisations and corporations cannot be trusted and need regulating by the government.", + "effects": { + "right": -1 + } + }, + { + "question": "Basic utilities like roads and electricity should be publicly owned.", + "effects": { + "right": -1 + } + }, + { + "question": "The current welfare system should be expanded to further combat inequality.", + "effects": { + "right": -1 + } + }, + { + "question": "People born to wealthy families have unfair success even when they aren't skilled and don't work hard.", + "effects": { + "right": -1 + } + }, + { + "question": "Land should not be a commodity to be bought and sold.", + "effects": { + "right": -1 + } + }, + { + "question": "All industry and the bank should be nationalised.", + "effects": { + "right": -1 + } + }, + { + "question": "The means of production should belong to the workers who use them.", + "effects": { + "right": -1 + } + }, + { + "question": "Communism, if implemented correctly, would be a good form of economics.", + "effects": { + "right": -1 + } + }, + { + "question": "Elections are a waste of resources.", + "effects": { + "auth": 1 + } + }, + { + "question": "Sometimes it is right that the government may spy on its citizens to combat extremists and terrorists.", + "effects": { + "auth": 1 + } + }, + { + "question": "Military action by our nation is often necessary to protect it.", + "effects": { + "auth": 1 + } + }, + { + "question": "Strength is necessary for any government to succeed.", + "effects": { + "auth": 1 + } + }, + { + "question": "Only the government can fairly and effectively regulate organisations.", + "effects": { + "auth": 1 + } + }, + { + "question": "Society requires structure and bureaucracy in order to function.", + "effects": { + "auth": 1 + } + }, + { + "question": "Mandatory IDs should be used to ensure public safety.", + "effects": { + "auth": 1 + } + }, + { + "question": "In times of crisis, safety becomes more important than civil liberties.", + "effects": { + "auth": 1 + } + }, + { + "question": "I’d always support my country, whether it was right or wrong.", + "effects": { + "auth": 1 + } + }, + { + "question": "It is important that the government follows the majority opinion, even if it is wrong.", + "effects": { + "auth": -1 + } + }, + { + "question": "The government should be less involved in the day to day life of its citizens.", + "effects": { + "auth": -1 + } + }, + { + "question": "Democracy is more than a decision-making process.", + "effects": { + "auth": -1 + } + }, + { + "question": "Military spending is a waste of money.", + "effects": { + "auth": -1 + } + }, + { + "question": "The smaller the government, the freer the people.", + "effects": { + "auth": -1 + } + }, + { + "question": "The government should, at most, provide emergency services, law enforcement, and free education.", + "effects": { + "auth": -1 + } + }, + { + "question": "State schools are a bad idea because our state shouldn't be influencing our children.", + "effects": { + "auth": -1 + } + }, + { + "question": "Do you like that any person from another country is naturalized?", + "effects": { + "auth": -1 + } + }, + { + "question": "Do you like to learn languages other than your language?", + "effects": { + "auth": -1 + } + }, + { + "question": "Should the locals be armed?", + "effects": { + "auth": -1, + "right": 0.5 + } + }, + { + "question": "Tariffs on international trade are important to encourage local production.", + "effects": { + "auth": 1, + "right": -0.5 + } + }, + { + "question": "I support regional unions, such as the European Union.", + "effects": { + "auth": -0.5, + "right": 0.5, + "prog": 0.5 + } + }, + { + "question": "Churches should be taxed the same way other institutions are taxed.", + "effects": { + "right": -0.5, + "prog": 1 + } + }, + { + "question": "Do you support gender equality and human rights?", + "effects": { + "auth": -0.5, + "prog": 1 + } + }, + { + "question": "Sex outside marriage is immoral.", + "effects": { + "auth": 0.5, + "prog": -1 + } + }, + { + "question": "My religious values should be spread as much as possible.", + "effects": { + "prog": -1 + } + }, + { + "question": "Abortion should be prohibited in most or all cases.", + "effects": { + "auth": 1, + "prog": -1 + } + }, + { + "question": "Prostitution should be illegal.", + "effects": { + "auth": 0.5, + "prog": -1 + } + }, + { + "question": "All people - regardless of factors like culture, sexuality, or economically - should be treated equally.", + "effects": { + "auth": -1, + "right": -1, + "prog": 1 + } + }, + { + "question": "Would you like immigrants and refugees to have the same rights as local citizens?", + "effects": { + "auth": -1, + "prog": 1 + } + }, + { + "question": "Should any illegal immigrant and refugee be prevented from synchronizing any profession in the country, and should he be deported to his country upon arrival?", + "effects": { + "auth": 1, + "right": 1 + } + }, + { + "question": "Inheritance is a legitimate form of wealth.", + "effects": { + "right": -1, + "prog": -0.5 + } + }, + { + "question": "Two consenting individuals should be able to do whatever they want with each other, even if it makes me uncomfortable.", + "effects": { + "prog": 1 + } + }, + { + "question": "An individual's body is their own property, and they should be able to do anything they desire to it.", + "effects": { + "prog": 1 + } + }, + { + "question": "A person should be able to worship whomever or whatever they want.", + "effects": { + "prog": 1 + } + }, + { + "question": "In criminal justice, rehabilitation should be more important than punishment.", + "effects": { + "prog": 1 + } + }, + { + "question": "A better world will come from automation, science, and technology.", + "effects": { + "prog": 1 + } + }, + { + "question": "Animals deserve certain universal rights.", + "effects": { + "prog": 1 + } + }, + { + "question": "Gender is a social construct, not a natural state of affairs.", + "effects": { + "prog": 1 + } + }, + { + "question": "Laws based on cultural values, rather than ethical ones, aren't justice.", + "effects": { + "prog": 1 + } + }, + { + "question": "Climate change is currently one of the greatest threats to our way of life.", + "effects": { + "prog": 1 + } + }, + { + "question": "Homosexuality is against my values and same-sex marriage should not be legal.", + "effects": { + "prog": -1 + } + }, + { + "question": "Transgender individuals should not be able to adopt children.", + "effects": { + "prog": -1 + } + }, + { + "question": "Society was better many years ago than it is now.", + "effects": { + "prog": -1 + } + }, + { + "question": "Drugs are harmful and should be banned.", + "effects": { + "prog": -1 + } + }, + { + "question": "The death penalty should exist for certain crimes.", + "effects": { + "prog": -1 + } + }, + { + "question": "One cannot be moral without religion.", + "effects": { + "prog": -1 + } + }, + { + "question": "Parents should hold absolute power over their children, as they are older and more experienced.", + "effects": { + "prog": -1 + } + }, + { + "question": "Children should be educated in religious or traditional values.", + "effects": { + "prog": -1 + } + }, + { + "question": "Multiculturalism is bad.", + "effects": { + "prog": -1 + } + } ]; \ No newline at end of file diff --git a/js/quiz.js b/js/quiz.js index f640657..2530103 100644 --- a/js/quiz.js +++ b/js/quiz.js @@ -4,10 +4,12 @@ var qn = 0; // Current question order // Populate questionsObject +let q_id_pop = 0; var questionsObject = new Object(); // Question objects with ID keys questions.forEach(populateQO); function populateQO(value) { - questionsObject[value['id']] = value; + questionsObject[q_id_pop] = value; + q_id_pop++; } diff --git a/js/results.js b/js/results.js index b2a6e5f..e7fd06a 100644 --- a/js/results.js +++ b/js/results.js @@ -37,7 +37,7 @@ window.onload = function() { ctx.fillText("Prog / Con Axis (z): " + z_axis, 725, 1525); ctx.textAlign="right"; ctx.font="60px Montserrat"; - ctx.fillText(App.name, 1820, 1560); + ctx.fillText(App.name+' v'+App.version, 1750, 1560); document.getElementById("banner").src = c.toDataURL(); }