Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
9Valjew authored Jun 26, 2020
1 parent b6e1cb8 commit db72228
Show file tree
Hide file tree
Showing 43 changed files with 4,623 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 9Valjews/CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
this bullshit was made by RememberNoRussian, EdgyXYZ and 3rdreichmann
this is based on 9Axes, which is based on 8Values
uwu
23 changes: 23 additions & 0 deletions 9Valjews/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From the original 8values:

The MIT License

Copyright (c) 2017 8values. http://8values.github.io.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
4 changes: 4 additions & 0 deletions 9Valjews/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# 8values.github.io
The 8values Political Quiz measures individuals' political values, including Equality, Might, Liberty, Tradition, Wealth, Peace, Authority, and Progress.

9valjews is a Israeli fork of 9Axes, which is a fork of 8values.
126 changes: 126 additions & 0 deletions 9Valjews/fullquiz.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<head>
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:400,700" rel="stylesheet">
<link href='style.css' rel='stylesheet' type='text/css'>
<title>9Valjews שאלון</title>
<link rel="icon" type="x-icon" href="icon.png">
<link rel="shortcut icon" type="x-icon" href="icon.png">
<meta charset="utf-8">
</head>
<body>
<script type="application/javascript"
src="questions.js">
</script>
<h1>9Valjews</h1>
<hr>
<h2 style="text-align:center;" id="question-number">...טעינה</h2>
<p class="question" id="question-text"></p>
<button class="button" onclick="next_question( 2)" style="background-color: #1b5e20;">מסכים אחושארמוטה</button> <br>
<button class="button" onclick="next_question( 1)" style="background-color: #4caf50;">מסכים</button> <br>
<button class="button" onclick="next_question( 0)" style="background-color: #bbbbbb;">ניטראלי / לא בטוח</button> <br>
<button class="button" onclick="next_question(-1)" style="background-color: #f44336;">לא מסכים</button> <br>
<button class="button" onclick="next_question(-2)" style="background-color: #b71c1c;">לא מסכים אחושארמוטה</button> <br>
<button class="small_button" onclick="prev_question()" id="back_button">אחורה</button>
<button class="small_button_off" id="back_button_off">אחורה</button><br>


<script>
var scores = [0, 0, 0, 0, 0, 0, 0, 0, 0];//fed, dem, glo, mil, fre, equ, sec, pro, mul - User's scores
var qn = 0; // Question number
var answers = [];
var quests = [];
init_all_questions(quests);
init_question(quests);

function init_all_questions(qs) {
//1,2,3,-2,-4
for(var i = 0; i < 9; i++) //Number of Axes
{
for(var j = 0; j < questions[i].length; j++)
{
for(var k = 0; k < questions[i][j].length; k++)
{
var m = [i, j, k];
qs.push(m);
}
}
}
shuffle(qs);
}

function init_question() {
var ax = quests[qn][0];
var rate = quests[qn][1];
var num = quests[qn][2];
document.getElementById("question-text").innerHTML = questions[ax][rate][num];
document.getElementById("question-number").innerHTML = " שאלה " + (qn + 1) + " מתוך " + (quests.length);
if (qn == 0) {
document.getElementById("back_button").style.display = 'none';
document.getElementById("back_button_off").style.display = 'block';
} else {
document.getElementById("back_button").style.display = 'block';
document.getElementById("back_button_off").style.display = 'none';
}

}

function shuffle(array) {
var currentIndex = array.length, temporaryValue, randomIndex;

// While there remain elements to shuffle...
while (0 !== currentIndex) {

// Pick a remaining element...
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex -= 1;

// And swap it with the current element.
temporaryValue = array[currentIndex];
array[currentIndex] = array[randomIndex];
array[randomIndex] = temporaryValue;
}

return array;
}

function next_question(mult) {
var ax = quests[qn][0];
var rate = quests[qn][1];
var num = quests[qn][2];
scores[ax] += mult*(rate<4?1:-1);

answers[qn] = mult;
qn++;
if (qn < quests.length) {
init_question();
} else {
results();
}
}
function prev_question() {
if (qn == 0) {
return;
}
qn--;
var ax = quests[qn][0];
var rate = quests[qn][1];
var num = quests[qn][2];
scores[ax] -= answers[qn]*(rate<4?1:-1);
init_question();
}
function calc_score(score) {
return (50+score);
}
function results() {
location.href = `results.html`
+ `?a=${calc_score(scores[0])}`
+ `&b=${calc_score(scores[1])}`
+ `&c=${calc_score(scores[2])}`
+ `&d=${calc_score(scores[3])}`
+ `&e=${calc_score(scores[4])}`
+ `&f=${calc_score(scores[5])}`
+ `&g=${calc_score(scores[6])}`
+ `&h=${calc_score(scores[7])}`
+ `&i=${calc_score(scores[8])}`;
}
</script>
</body>
Binary file added 9Valjews/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions 9Valjews/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit db72228

Please sign in to comment.