{"id":2849,"date":"2025-10-16T06:35:30","date_gmt":"2025-10-16T06:35:30","guid":{"rendered":"https:\/\/www.itechmagazine.com\/?page_id=2849"},"modified":"2025-10-16T06:35:32","modified_gmt":"2025-10-16T06:35:32","slug":"space-button-calculator","status":"publish","type":"page","link":"https:\/\/www.itechmagazine.com\/sv\/space-button-calculator\/","title":{"rendered":"Space Button Calculator"},"content":{"rendered":"<!-- Space Bar Counter with Timer -->\n<div id=\"space-calculator\" style=\"font-family: Arial, sans-serif; text-align:center; padding:20px; background:#f0f4f8; border-radius:15px; max-width:450px; margin:30px auto; box-shadow: 0 8px 20px rgba(0,0,0,0.1);\">\n  <h2 style=\"color:#333;\">Space Bar Counter<\/h2>\n  <p style=\"font-size:16px; color:#555;\">Choose your timer and press the <strong>space bar<\/strong> as fast as you can!<\/p>\n\n  <!-- Timer Selection -->\n  <div style=\"margin-bottom:15px;\">\n    <label for=\"timer-select\" style=\"font-size:14px; color:#333;\">Timer:<\/label>\n    <select id=\"timer-select\" style=\"padding:5px 10px; font-size:14px; border-radius:6px; border:1px solid #ccc;\">\n      <option value=\"10\">10 seconds<\/option>\n      <option value=\"20\">20 seconds<\/option>\n      <option value=\"30\">30 seconds<\/option>\n    <\/select>\n  <\/div>\n\n  <!-- Timer Display -->\n  <div style=\"margin:15px 0;\">\n    <span style=\"font-size:32px; color:#FF5733;\" id=\"timer-display\">0<\/span> seconds left\n  <\/div>\n\n  <!-- Space Counter -->\n  <div style=\"margin:20px 0;\">\n    <span style=\"font-size:48px; color:#007BFF;\" id=\"space-count\">0<\/span>\n    <div style=\"font-size:16px; color:#888;\">Spaces Pressed<\/div>\n  <\/div>\n\n  <!-- Buttons -->\n  <div style=\"margin-top:20px;\">\n    <button id=\"start-btn\" style=\"padding:10px 20px; font-size:16px; border:none; border-radius:8px; background:#28a745; color:#fff; cursor:pointer; margin-right:10px; transition:0.3s;\">Start<\/button>\n    <button id=\"reset-btn\" style=\"padding:10px 20px; font-size:16px; border:none; border-radius:8px; background:#dc3545; color:#fff; cursor:pointer; transition:0.3s;\">Reset<\/button>\n  <\/div>\n\n  <!-- High Score -->\n  <div style=\"margin-top:15px; font-size:16px; color:#555;\">\n    High Score: <span id=\"high-score\">0<\/span>\n  <\/div>\n<\/div>\n\n<script>\n  let count = 0;\n  let timer = 0;\n  let interval;\n  const countDisplay = document.getElementById('space-count');\n  const timerDisplay = document.getElementById('timer-display');\n  const highScoreDisplay = document.getElementById('high-score');\n  const startBtn = document.getElementById('start-btn');\n  const resetBtn = document.getElementById('reset-btn');\n  const timerSelect = document.getElementById('timer-select');\n\n  \/\/ Load high score from localStorage\n  let highScore = localStorage.getItem('spaceHighScore') || 0;\n  highScoreDisplay.textContent = highScore;\n\n  \/\/ Spacebar counting only during timer\n  document.addEventListener('keydown', function(e) {\n    if (e.code === 'Space' && timer > 0) {\n      e.preventDefault();\n      count++;\n      countDisplay.textContent = count;\n    }\n  });\n\n  \/\/ Start Button\n  startBtn.addEventListener('click', function() {\n    count = 0;\n    countDisplay.textContent = count;\n    timer = parseInt(timerSelect.value);\n    timerDisplay.textContent = timer;\n\n    clearInterval(interval);\n    interval = setInterval(() => {\n      timer--;\n      timerDisplay.textContent = timer;\n      if (timer <= 0) {\n        clearInterval(interval);\n        alert('Time is up! You pressed ' + count + ' spaces.');\n        if (count > highScore) {\n          highScore = count;\n          localStorage.setItem('spaceHighScore', highScore);\n          highScoreDisplay.textContent = highScore;\n        }\n      }\n    }, 1000);\n  });\n\n  \/\/ Reset Button\n  resetBtn.addEventListener('click', function() {\n    clearInterval(interval);\n    count = 0;\n    timer = 0;\n    countDisplay.textContent = count;\n    timerDisplay.textContent = '0';\n  });\n<\/script>","protected":false},"excerpt":{"rendered":"<p>Space Bar Counter Choose your timer and press the space bar as fast as you can! Timer: 10 seconds20 seconds30 seconds 0 seconds left 0 Spaces Pressed Start Reset High Score: 0<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2849","page","type-page","status-publish"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Space Button Calculator - iTech Magazine<\/title>\n<meta name=\"description\" content=\"Space Button Calculator - Space Bar Counter Choose your timer and press the space bar as fast as you can! Timer: 10 seconds 20 seconds 30 seconds 0 seconds left 0 Spaces Pressed\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.itechmagazine.com\/sv\/space-button-calculator\/\" \/>\n<meta property=\"og:locale\" content=\"sv_SE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Space Button Calculator - iTech Magazine\" \/>\n<meta property=\"og:description\" content=\"Space Button Calculator - Space Bar Counter Choose your timer and press the space bar as fast as you can! Timer: 10 seconds 20 seconds 30 seconds 0 seconds left 0 Spaces Pressed\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.itechmagazine.com\/sv\/space-button-calculator\/\" \/>\n<meta property=\"og:site_name\" content=\"iTech Magazine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/itechmagzine\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-16T06:35:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.itechmagazine.com\/wp-content\/uploads\/2023\/03\/cropped-itechmagazine-favicon-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"512\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@itech_magazine\" \/>\n<meta name=\"twitter:label1\" content=\"Ber\u00e4knad l\u00e4stid\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minut\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.itechmagazine.com\\\/space-button-calculator\\\/\",\"url\":\"https:\\\/\\\/www.itechmagazine.com\\\/space-button-calculator\\\/\",\"name\":\"Space Button Calculator - iTech Magazine\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.itechmagazine.com\\\/#website\"},\"datePublished\":\"2025-10-16T06:35:30+00:00\",\"dateModified\":\"2025-10-16T06:35:32+00:00\",\"description\":\"Space Button Calculator - Space Bar Counter Choose your timer and press the space bar as fast as you can! Timer: 10 seconds 20 seconds 30 seconds 0 seconds left 0 Spaces Pressed\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.itechmagazine.com\\\/space-button-calculator\\\/#breadcrumb\"},\"inLanguage\":\"sv-SE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.itechmagazine.com\\\/space-button-calculator\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.itechmagazine.com\\\/space-button-calculator\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.itechmagazine.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Space Button Calculator\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.itechmagazine.com\\\/#website\",\"url\":\"https:\\\/\\\/www.itechmagazine.com\\\/\",\"name\":\"iTech Magazine\",\"description\":\"Tech Trends, Business and Digital Marketing\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.itechmagazine.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.itechmagazine.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"sv-SE\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.itechmagazine.com\\\/#organization\",\"name\":\"itech Magazine\",\"url\":\"https:\\\/\\\/www.itechmagazine.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"sv-SE\",\"@id\":\"https:\\\/\\\/www.itechmagazine.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.itechmagazine.com\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/cropped-itechmagazine-favicon-1.png\",\"contentUrl\":\"https:\\\/\\\/www.itechmagazine.com\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/cropped-itechmagazine-favicon-1.png\",\"width\":512,\"height\":512,\"caption\":\"itech Magazine\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itechmagazine.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/itechmagzine\",\"https:\\\/\\\/x.com\\\/itech_magazine\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/itechmagazine\\\/\",\"https:\\\/\\\/mastodon.online\\\/@itechmagazine\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Space Button Calculator - iTech Magazine","description":"Space Button Calculator - Space Bar Counter Choose your timer and press the space bar as fast as you can! Timer: 10 seconds 20 seconds 30 seconds 0 seconds left 0 Spaces Pressed","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.itechmagazine.com\/sv\/space-button-calculator\/","og_locale":"sv_SE","og_type":"article","og_title":"Space Button Calculator - iTech Magazine","og_description":"Space Button Calculator - Space Bar Counter Choose your timer and press the space bar as fast as you can! Timer: 10 seconds 20 seconds 30 seconds 0 seconds left 0 Spaces Pressed","og_url":"https:\/\/www.itechmagazine.com\/sv\/space-button-calculator\/","og_site_name":"iTech Magazine","article_publisher":"https:\/\/www.facebook.com\/itechmagzine","article_modified_time":"2025-10-16T06:35:32+00:00","og_image":[{"width":512,"height":512,"url":"https:\/\/www.itechmagazine.com\/wp-content\/uploads\/2023\/03\/cropped-itechmagazine-favicon-1.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_site":"@itech_magazine","twitter_misc":{"Ber\u00e4knad l\u00e4stid":"1 minut"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.itechmagazine.com\/space-button-calculator\/","url":"https:\/\/www.itechmagazine.com\/space-button-calculator\/","name":"Space Button Calculator - iTech Magazine","isPartOf":{"@id":"https:\/\/www.itechmagazine.com\/#website"},"datePublished":"2025-10-16T06:35:30+00:00","dateModified":"2025-10-16T06:35:32+00:00","description":"Space Button Calculator - Space Bar Counter Choose your timer and press the space bar as fast as you can! Timer: 10 seconds 20 seconds 30 seconds 0 seconds left 0 Spaces Pressed","breadcrumb":{"@id":"https:\/\/www.itechmagazine.com\/space-button-calculator\/#breadcrumb"},"inLanguage":"sv-SE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.itechmagazine.com\/space-button-calculator\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.itechmagazine.com\/space-button-calculator\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.itechmagazine.com\/"},{"@type":"ListItem","position":2,"name":"Space Button Calculator"}]},{"@type":"WebSite","@id":"https:\/\/www.itechmagazine.com\/#website","url":"https:\/\/www.itechmagazine.com\/","name":"iTech Magazine","description":"Tech Trends, Business and Digital Marketing","publisher":{"@id":"https:\/\/www.itechmagazine.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.itechmagazine.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"sv-SE"},{"@type":"Organization","@id":"https:\/\/www.itechmagazine.com\/#organization","name":"itech Magazine","url":"https:\/\/www.itechmagazine.com\/","logo":{"@type":"ImageObject","inLanguage":"sv-SE","@id":"https:\/\/www.itechmagazine.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.itechmagazine.com\/wp-content\/uploads\/2023\/03\/cropped-itechmagazine-favicon-1.png","contentUrl":"https:\/\/www.itechmagazine.com\/wp-content\/uploads\/2023\/03\/cropped-itechmagazine-favicon-1.png","width":512,"height":512,"caption":"itech Magazine"},"image":{"@id":"https:\/\/www.itechmagazine.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/itechmagzine","https:\/\/x.com\/itech_magazine","https:\/\/www.linkedin.com\/company\/itechmagazine\/","https:\/\/mastodon.online\/@itechmagazine"]}]}},"_links":{"self":[{"href":"https:\/\/www.itechmagazine.com\/sv\/wp-json\/wp\/v2\/pages\/2849","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itechmagazine.com\/sv\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.itechmagazine.com\/sv\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.itechmagazine.com\/sv\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itechmagazine.com\/sv\/wp-json\/wp\/v2\/comments?post=2849"}],"version-history":[{"count":0,"href":"https:\/\/www.itechmagazine.com\/sv\/wp-json\/wp\/v2\/pages\/2849\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.itechmagazine.com\/sv\/wp-json\/wp\/v2\/media?parent=2849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}