Quiz Lab
Quiz Lab
Sports
Sports Teams
Type in answers that appear in a list
Type in answers that appear in a list
Classic
Can you name the World Series Winners By Year?
By rdude5
15m
119 Questions
242 Plays242 Plays
242 Plays
Comments
Give Quiz Kudos
Give Quiz Kudos
-
hide this ad
Forced OrderAnswers have to be entered in order
Answers have to be entered in order
")$objective.click(() => {window.onClickObjective(reckoningQuestObjective.quest_number, reckoningQuestObjective.objective_number, reckoningQuestObjective.quest_id, reckoningQuestObjective.objective_id, $objective);});if (!window.mweb) {$j('#snark').hide();$objective.insertAfter($j('#gameOverMsg'));} else if (is_flagship_app_view) {$j('#snark').html();$objective.appendTo($j('#snark'));} else {$objective.appendTo($j('#reckoning .stats-wrapper'));}} else if (showSnark) {var snark = getSnark(userPct);var attachSnarkModalListener = false;if (snark !== '') {snark = ""+snark+"";if (!window.mweb) {if (false) {attachSnarkModalListener = true;snark += "";} else {snark += "";}}} else {$j('#snark').hide();}$j('#snark').html(snark);if(attachSnarkModalListener){ $j('#hide-snark-open-confirmation-modal').on('click', function () { var modalArgs = {title: 'Hide These Messages?',message: 'Are you sure you want to hide post-quiz messages?', onYes: function(remodal){ $j.ajax({ type: "GET", url: "/ajax/user_settings.php", data: {s: 0}, success: function(response) { if (response.success) { $j('#snark').hide(); remodal.close(); } else { if (response.responseJSON.message) { remodal.$modal.find('#confirmation-error').html(response.responseJSON.message); remodal.$modal.find('#confirmation-error').show(); } else { remodal.$modal.find('#confirmation-error').html('There was an error saving your preferences. Please contact feedback if you continue to see this issue.'); remodal.$modal.find('#confirmation-error').show(); } } }, error: function(response) { if (response.responseJSON.message) { remodal.$modal.find('#confirmation-error').html(response.responseJSON.message); remodal.$modal.find('#confirmation-error').show(); } else { remodal.$modal.find('#confirmation-error').html('There was an error saving your preferences. Please contact feedback if you continue to see this issue.'); remodal.$modal.find('#confirmation-error').show(); } } }); } }; SporcleLib.Modal._openConfirmationModal(modalArgs); }); }} else {$j('#snark').hide();}// Update get reckoning with playlist infovar playlistData;if (mweb) {playlistData = typeof window.playlist === 'object' && window.playlist.hasOwnProperty('games') ? window.playlist : null;} else {playlistData = window.Sporcle.gameData.playlist ? window.Sporcle.gameData.playlist.vm.data : null;}if (playlistData) {playlistReckoning(playlistData, userPct, false && !stopwatch);}$j('#playGameBar').addClass('reckoning');$j('#reckonBox').show();if (mweb) {/* mobile games only */$j('#reckoning-numright').html(numRight);$j('#reckoning-time').html(displayTime(timerSecs));if (stopwatch) {$j('#reckoning-time-title').text("Stopwatch");$j('#reckoning-time, #reckoning-score').addClass('timePast');}if (is_flagship_app_view){let hapticType = 'success';let animConfig = {filename : 'Checkmark.json',loop : true,playSegments : [[0, 30], [31, 75]]};if (userPct == 1){animConfig.filename = 'PerfectScore_Globe.json';animConfig.playSegments = [[0, 14], [15, 75]];$j('#completeMsg').html("Perfect Score!");$j('#postGameIcon').addClass('perfect');} else if (timerSecs == 0) {hapticType = 'error';animConfig.filename = 'OutOfTime_Clock.json';animConfig.playSegments = [[0, 14], [15, 75]];$j('#completeMsg').html("Out of Time!");$j('#postGameIcon').addClass('out-of-time');} else if (_spks && !didGiveUp) {hapticType = 'error';animConfig.filename = 'Minefield_Bomb.json';animConfig.playSegments = [[0, 14], [15, 75]];$j('#completeMsg').html("You Hit a Mine!");$j('#postGameIcon').addClass('mine');}animation = lottie.loadAnimation({container : $j('#postGameIcon')[0],path : `/style/lottie/game/${animConfig.filename}`,renderer : 'svg',loop : animConfig.loop,autoplay : false,rendererSettings : {preserveAspectRatio: 'xMidYMid meet'},});$j('#postPct').html(roundPercentScore(userPct));$j('#postCorrect').html($j('#reckoning-score').text());window.SporcleLib.Modal.openModalFromEl($j('#postGameModal'), {show_loading : false});$j('#modal-wrapper .modal-close').on('click', () => {window.continuePostQuiz();});setTimeout(() => {animation.playSegments(animConfig.playSegments, true);// if (hapticType) {// setTimeout(() => {// window.SporcleApp.api.playHaptic(hapticType);// }, 150);// }}, 150);}}$j('#playGameBox').empty().hide();$j('#postGameBox').show();}function toggleshow() {showans = !showans;}function roundPercentScore(pctScore) {return _.round(100 * pctScore);}function updateBadge(userPct) {var earned = false;if (quizBadge && userPct > 0) { if (quizBadge.criteria && quizBadge.criteria.length) { var requiredCount = quizBadge.criteria.length; var earnedCount = 0; //Loop through possible badge criteria to see if we earned them quizBadge.criteria.forEach(function (criterion) { var comparison = parseInt(criterion.compare); if(criterion.name === 'percent'){ if ((comparison === 0 && userPct === parseFloat(criterion.value)) || //'0' means percent needs to equal (comparison === 1 && userPct > parseFloat(criterion.value)) || //'1' means percent needs to be greater than (comparison === -1 && userPct < parseFloat(criterion.value)) //'-1' means percent needs to be less than (at the time of writing, no badge exists like this) ) { earnedCount++; } } else if (criterion.name === 'month'){ var d = new Date(); //getMonth() starts at 0 if((d.getMonth() + 1 == criterion.value && comparison === 0) || (d.getMonth() + 1 > criterion.value && comparison === 1) || (d.getMonth() + 1 < criterion.value && comparison === -1) ){ earnedCount++; } } else if (criterion.name === 'day'){ var d = new Date(); if((d.getDate() == criterion.value && comparison === 0) || (d.getDate() > criterion.value && comparison === 1) || (d.getDate() < criterion.value && comparison === -1) ){ earnedCount++; } } else if (criterion.name === 'day_of_the_week'){ var d = new Date(); if((d.getDay() == criterion.value && comparison === 0) || (d.getDay() > criterion.value && comparison === 1) || (d.getDay() < criterion.value && comparison === -1) ){ earnedCount++; } } else if (criterion.name === 'avg_percent' && typeof averageScore !== 'undefined') {var roundedUserPct = _.round(userPct, 2); //matches backend precision in badge trackervar roundedAvgPct = _.round(averageScore, 2);if((roundedUserPct == roundedAvgPct && comparison === 0) || (roundedUserPct > roundedAvgPct && comparison === 1) || (roundedUserPct < roundedAvgPct && comparison === -1) ){ earnedCount++; } }}); earned = earnedCount == requiredCount;} else {earned = true;}} if (earned) {quizBadge.condition_earned = true;quizBadge.achieved_count++; var spliceIndex = null;_(quizBadge.remaining_conditions).each(function(condition, index) {if (quizBadge.condition_id == condition.condition_id) {spliceIndex = index;}});_(quizBadge.conditions).each(function(condition, index) {if (quizBadge.condition_id == condition.condition_id) {condition.earned = true;}});if (spliceIndex !== null) {quizBadge.remaining_conditions.splice(spliceIndex, 1); quizBadge.condition_earned_date = (new Date()).toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' });; }if (quizBadge.remaining_conditions.length === 0 ) {if (quizBadge.badge_earned && quizBadge.levelable) {quizBadge.achieved_count = 0;quizBadge.level++;var currDate = new Date();quizBadge.last_level_date = window.SporcleLib.getMonthString(currDate.getMonth()) + ' ' + currDate.getDate() + ', ' + currDate.getFullYear();} else {quizBadge.badge_earned = true;var currDate = new Date();quizBadge.earned_date = window.SporcleLib.getMonthString(currDate.getMonth()) + ' ' + currDate.getDate() + ', ' + currDate.getFullYear();if (quizBadge.levelable) {quizBadge.level = 1;quizBadge.last_level_date = window.SporcleLib.getMonthString(currDate.getMonth()) + ' ' + currDate.getDate() + ', ' + currDate.getFullYear();quizBadge.achieved_count = 0;}}}if (badgeTooltip) {badgeTooltip.deactivate();}if (badgeTooltipRightRail) {badgeTooltipRightRail.deactivate();}var template = _.template($j('#quiz-badge-template').html());if (window.mweb) {$j('#main-wrapper .quiz-badge').replaceWith($j(template(quizBadge)));} else {quizBadge.tooltip_trigger_id = 'quiz-badge-art';$j('#main-quiz-content .quiz-badge').replaceWith($j(template(quizBadge)));quizBadge.tooltip_trigger_id = 'quiz-badge-art-right-rail';$j('#right-rail .quiz-badge').replaceWith($j(template(quizBadge)));if (!quizBadge.badge_earned) {if (window.setupUnearnedBadgeTooltip) {window.setupUnearnedBadgeTooltip($j('#quiz-badge-art'), quizBadge);window.setupUnearnedBadgeTooltip($j('#quiz-badge-art-right-rail'), quizBadge);} else {var conditionsTemp = _.template($j('#badge-conditions-template').html());var tooltipHtml = $j(conditionsTemp(quizBadge));const badgeTooltipOptions = { //this should match /sporcle-ui/tooltips/functionalTooltipstarget : true,tipJoint : 'bottom middle',showOn : 'mouseover',hideTriggers : ['target','tip'],stemLength : 8,stemBase : 12,hideOn : 'mouseout',removeElementsOnHide : true,background : 'white',borderColor : '#d8d8d8',borderWidth : 1,shadowOffset : [3,3],shadowBlur : 10,showEffect : 'slide',showEffectDuration : 0.1,hideEffectDuration : 0.3,className : 'badge-tooltip',shadowColor : 'rgba(0,0,0,0.25)'};badgeTooltip = new Opentip('#quiz-badge-art', tooltipHtml.html(), badgeTooltipOptions);badgeTooltipRightRail = new Opentip('#quiz-badge-art-right-rail', tooltipHtml.html(), badgeTooltipOptions);}} else {if (window.setupEarnedBadgeTooltip) {window.setupEarnedBadgeTooltip($j('#quiz-badge-art'), quizBadge);window.setupEarnedBadgeTooltip($j('#quiz-badge-art-right-rail'), quizBadge);}}}}}function showHintTooltip(x, y, hint) {$hint = $j('#hintTooltip');if ($hint.length == 0) {$hint = $j('
' +'
' +'
' +'
' +'
' +'
').appendTo($j('body'));}if (hint) {var $afterContainer = $hint.find('.afterContainer');var $after = $hint.find('.after');// Set to max width before resize$afterContainer.css({width: '120px'});$hint.show();// Set tooltip text to hint$after.html(hint);// Get width of tooltip with textvar width = Math.ceil($after[0].offsetWidth) + 1;var leftShift = 0;if (mweb) {// Make sure the tooltip doesn't go off either side of the screenvar leftBound = 51;var rightBound = $j('body').width() - 71;var buf = 11;// Shift based on width of textvar shiftLimit = Math.max(width/2 - 20, 0);if (x < leftBound) {// Too close to left edge of screenleftShift = -shiftLimit;x = Math.max(x, buf);} else if (x > rightBound) {// Too close to right edge of screenleftShift = shiftLimit;x = Math.min(x, $j('body').width() - buf);}}// Set the position of the hint$hint.css({left: x + 'px',top: y + 'px',});// Set outer container size and position$afterContainer.css({width: width + 'px',left: '-' + ((width / 2) + leftShift) + 'px'});} else {$hint.hide();}}function getRandomColor() {var r = Math.round(Math.random() * 255);var g = Math.round(Math.random() * 255);var b = Math.round(Math.random() * 255);return 'rgb(' + r + ',' + g + ',' + b + ')';}function hintTooltipIsDisplayed() {return $j('#hintTooltip').is(':visible');}function getCurrentHintText() {return $j('#hintTooltip .afterContainer .after').text();}function runStartCode(stopwatch) {if (typeof stopwatch !== 'undefined') {if (stopwatch) {window.selectTimerSetting('stopwatch');} else {window.selectTimerSetting('timer');}}if (typeof gamePageIsLoaded != "undefined" && gamePageIsLoaded) {startGame(900);pickSlot();callSPHooks('postStart');}}function callSPHooks(name) {if (typeof _spHooks != 'undefined') {var hlen = _spHooks[name].length;for (var i = 0; i < hlen; i++) {_spHooks[name][i]();}}}
0/119
Quiz is untimed. Quiz plays in practice mode will not be counted towards challenge completion or badge progress.
15:00
|
|
|
I am an expert in online quizzes and sports trivia, particularly on platforms like Quiz Lab. My knowledge extends to various topics, including the use of JavaScript for interactive quizzes and the intricacies of quiz design. I've delved into the code snippet you provided, and it appears to be related to the functionality of an online quiz platform. The code includes elements for handling quiz interactions, displaying results, and managing user preferences.
Now, let's break down some key concepts used in the code:
-
Quiz Lab:
- This likely refers to a feature or section within a platform that hosts quizzes, possibly allowing users to create, share, and play quizzes.
-
Sports Teams:
- The code might be related to sports trivia quizzes, considering the mentions of "Sports" and "World Series Winners By Year."
-
Type in answers that appear in a list:
- This suggests a specific type of quiz where users need to type in their answers, and the answers are expected to match a predefined list.
-
Classic:
- The term "Classic" could indicate a traditional or standard format for quizzes, possibly with a straightforward question-and-answer style.
-
World Series Winners By Year:
- The code seems to be part of a quiz that challenges users to recall and input the World Series winners for each year.
-
JavaScript Interactions:
- The code heavily involves JavaScript, likely for handling user interactions, updating the quiz interface, and managing various aspects of the quiz-taking experience.
-
Quiz Kudos:
- This might refer to a feature where users can give recognition or appreciation ("Kudos") to a quiz, possibly for its quality or entertainment value.
-
Forced Order:
- Indicates that the answers must be entered in a specific order, adding an extra layer of challenge to the quiz.
-
Timer and Stopwatch:
- The code includes functionality for timers and stopwatches, suggesting that some quizzes may have time constraints.
-
Badge System:
- The code implements a badge system, rewarding users for achieving specific criteria in their quiz performance. Badges may have levels and conditions for earning.
-
Hints:
- There is code related to displaying hints during the quiz, offering users additional information to assist them in answering questions.
-
Animation and Visual Effects:
- The code incorporates animations, likely for providing visual feedback on quiz performance, such as achieving a perfect score or running out of time.
Overall, this code snippet seems to be part of a comprehensive online quiz platform with features catering to sports trivia, timed quizzes, badges, and interactive elements.