{"id":75689,"date":"2025-09-16T09:25:50","date_gmt":"2025-09-16T09:25:50","guid":{"rendered":"https:\/\/www.ncheurope.com\/?page_id=75689"},"modified":"2025-09-16T09:29:59","modified_gmt":"2025-09-16T09:29:59","slug":"scratch-card-2","status":"publish","type":"page","link":"https:\/\/www.ncheurope.com\/en\/halloween\/scratch-card-2\/","title":{"rendered":"Scratch Card 2"},"content":{"rendered":"<div class=\"internal-banner-block relative primaryBlue paddingBottomLarge bg-no-repeat bg-white bg-[url('assets\/images\/background-shape.png')] bg-right-bottom bg-contain\">\n\n<\/div>\n<\/div>\n<div id=\"container\" style=\"position:relative;width:360px;height:640px;margin:40px auto;\">\n  <!-- Hidden prize -->\n  <img decoding=\"async\" id=\"prizeImg\" src=\"https:\/\/www.ncheurope.com\/wp-content\/themes\/nch-europe\/template-parts\/scratch-cards\/scratchcard-2\/Prize.png\" alt=\"Prize\" style=\"position:absolute;top:0;left:0;width:100%;height:100%;object-fit:contain;border-radius:8px;display:none;\">\n  <!-- Scratch overlay -->\n  <canvas id=\"scratchCanvas\" style=\"position:absolute;top:0;left:0;width:100%;height:100%;border-radius:8px;cursor:url('https:\/\/www.ncheurope.com\/wp-content\/themes\/nch-europe\/template-parts\/scratch-cards\/scratchcard-2\/coin-cursor.png'), pointer;\"><\/canvas>\n<\/div>\n<style>\n  #container {\n    position: relative;\n    width: 360px;\n    height: 640px;\n  }\n  #prizeImg {\n    position: absolute;\n    top: 0;\n    left: 0;\n    width: 100%;\n    height: 100%;\n    object-fit: contain;\n    border-radius: 8px;\n  }\n  #scratchCanvas {\n    position: absolute;\n    top: 0;\n    left: 0;\n    width: 100%;\n    height: 100%;\n    border-radius: 8px;\n    cursor: url('https:\/\/www.ncheurope.com\/wp-content\/themes\/nch-europe\/template-parts\/scratch-cards\/scratchcard-2\/coin-cursor.png'), pointer;\n  }\n<\/style>\n<script>\n  const canvas = document.getElementById('scratchCanvas');\n  const ctx = canvas.getContext('2d');\n  const coverImg = new Image();\n  const prizeImg = document.getElementById('prizeImg');\n  coverImg.src = 'https:\/\/www.ncheurope.com\/wp-content\/themes\/nch-europe\/template-parts\/scratch-cards\/scratchcard-2\/Cover.png';\n\n  function resizeCanvas() {\n  \/\/ Always hide the prize image before drawing the cover\n  prizeImg.style.display = 'none';\n  canvas.width = canvas.offsetWidth;\n  canvas.height = canvas.offsetHeight;\n  coverImg.onload = () => {\n    ctx.globalCompositeOperation = 'source-over';\n    ctx.drawImage(coverImg, 0, 0, canvas.width, canvas.height);\n    ctx.globalCompositeOperation = 'destination-out';\n    prizeImg.style.display = 'block'; \/\/ Show prize only after overlay is ready\n  };\n  \/\/ If the image is already loaded (from cache), draw and show immediately\n  if (coverImg.complete) {\n    ctx.globalCompositeOperation = 'source-over';\n    ctx.drawImage(coverImg, 0, 0, canvas.width, canvas.height);\n    ctx.globalCompositeOperation = 'destination-out';\n    prizeImg.style.display = 'block';\n  }\n}\n\n  resizeCanvas();\n  window.addEventListener('resize', resizeCanvas);\n\n  let scratching = false;\n\n  function scratch(e) {\n    if (!scratching) return;\n    e.preventDefault();\n    const rect = canvas.getBoundingClientRect();\n    const clientX = e.touches ? e.touches[0].clientX : e.clientX;\n    const clientY = e.touches ? e.touches[0].clientY : e.clientY;\n    const x = clientX - rect.left;\n    const y = clientY - rect.top;\n    ctx.beginPath();\n    ctx.arc(x, y, 20, 0, Math.PI * 2);\n    ctx.fill();\n  }\n\n  canvas.addEventListener('mousedown', () => scratching = true);\n  canvas.addEventListener('mouseup', () => scratching = false);\n  canvas.addEventListener('mouseleave', () => scratching = false);\n  canvas.addEventListener('mousemove', scratch);\n\n  canvas.addEventListener('touchstart', function(e) {\n    scratching = true;\n    e.preventDefault();\n  }, { passive: false });\n  canvas.addEventListener('touchend', function(e) {\n    scratching = false;\n    e.preventDefault();\n  }, { passive: false });\n  canvas.addEventListener('touchcancel', function(e) {\n    scratching = false;\n    e.preventDefault();\n  }, { passive: false });\n  canvas.addEventListener('touchmove', scratch, { passive: false });\n<\/script>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":75693,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-75689","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.7 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Scratch Card 2 - NCH Europe<\/title>\n<meta name=\"robots\" content=\"noindex, nofollow\" \/>\n<meta property=\"og:locale\" content=\"en_US\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:type\" content=\"article\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:title\" content=\"Scratch Card 2\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.ncheurope.com\/en\/halloween\/scratch-card-2\/\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:site_name\" content=\"NCH Europe\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ncheurope\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-16T09:29:59+00:00\" class=\"yoast-seo-meta-tag\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" class=\"yoast-seo-meta-tag\" \/>\n<meta name=\"twitter:site\" content=\"@NCH_Europe\" class=\"yoast-seo-meta-tag\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.ncheurope.com\/en\/halloween\/scratch-card-2\/\",\"url\":\"https:\/\/www.ncheurope.com\/en\/halloween\/scratch-card-2\/\",\"name\":\"Scratch Card 2 - NCH Europe\",\"isPartOf\":{\"@id\":\"https:\/\/www.ncheurope.com\/en\/#website\"},\"datePublished\":\"2025-09-16T09:25:50+00:00\",\"dateModified\":\"2025-09-16T09:29:59+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.ncheurope.com\/en\/halloween\/scratch-card-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.ncheurope.com\/en\/halloween\/scratch-card-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.ncheurope.com\/en\/halloween\/scratch-card-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Hemsida\",\"item\":\"https:\/\/www.ncheurope.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Halloween\",\"item\":\"https:\/\/www.ncheurope.com\/en\/halloween\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Scratch Card 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.ncheurope.com\/en\/#website\",\"url\":\"https:\/\/www.ncheurope.com\/en\/\",\"name\":\"NCH Europe\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.ncheurope.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.ncheurope.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.ncheurope.com\/en\/#organization\",\"name\":\"NCH Europe\",\"url\":\"https:\/\/www.ncheurope.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.ncheurope.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.ncheurope.com\/wp-content\/uploads\/2023\/11\/nch-logo-gradient.webp\",\"contentUrl\":\"https:\/\/www.ncheurope.com\/wp-content\/uploads\/2023\/11\/nch-logo-gradient.webp\",\"width\":120,\"height\":120,\"caption\":\"NCH Europe\"},\"image\":{\"@id\":\"https:\/\/www.ncheurope.com\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/ncheurope\",\"https:\/\/x.com\/NCH_Europe\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Scratch Card 2 - NCH Europe","robots":{"index":"noindex","follow":"nofollow"},"og_locale":"en_US","og_type":"article","og_title":"Scratch Card 2","og_url":"https:\/\/www.ncheurope.com\/en\/halloween\/scratch-card-2\/","og_site_name":"NCH Europe","article_publisher":"https:\/\/www.facebook.com\/ncheurope","article_modified_time":"2025-09-16T09:29:59+00:00","twitter_card":"summary_large_image","twitter_site":"@NCH_Europe","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.ncheurope.com\/en\/halloween\/scratch-card-2\/","url":"https:\/\/www.ncheurope.com\/en\/halloween\/scratch-card-2\/","name":"Scratch Card 2 - NCH Europe","isPartOf":{"@id":"https:\/\/www.ncheurope.com\/en\/#website"},"datePublished":"2025-09-16T09:25:50+00:00","dateModified":"2025-09-16T09:29:59+00:00","breadcrumb":{"@id":"https:\/\/www.ncheurope.com\/en\/halloween\/scratch-card-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.ncheurope.com\/en\/halloween\/scratch-card-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.ncheurope.com\/en\/halloween\/scratch-card-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Hemsida","item":"https:\/\/www.ncheurope.com\/en\/"},{"@type":"ListItem","position":2,"name":"Halloween","item":"https:\/\/www.ncheurope.com\/en\/halloween\/"},{"@type":"ListItem","position":3,"name":"Scratch Card 2"}]},{"@type":"WebSite","@id":"https:\/\/www.ncheurope.com\/en\/#website","url":"https:\/\/www.ncheurope.com\/en\/","name":"NCH Europe","description":"","publisher":{"@id":"https:\/\/www.ncheurope.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.ncheurope.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.ncheurope.com\/en\/#organization","name":"NCH Europe","url":"https:\/\/www.ncheurope.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.ncheurope.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.ncheurope.com\/wp-content\/uploads\/2023\/11\/nch-logo-gradient.webp","contentUrl":"https:\/\/www.ncheurope.com\/wp-content\/uploads\/2023\/11\/nch-logo-gradient.webp","width":120,"height":120,"caption":"NCH Europe"},"image":{"@id":"https:\/\/www.ncheurope.com\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ncheurope","https:\/\/x.com\/NCH_Europe"]}]}},"_links":{"self":[{"href":"https:\/\/www.ncheurope.com\/en\/wp-json\/wp\/v2\/pages\/75689","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ncheurope.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.ncheurope.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.ncheurope.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ncheurope.com\/en\/wp-json\/wp\/v2\/comments?post=75689"}],"version-history":[{"count":1,"href":"https:\/\/www.ncheurope.com\/en\/wp-json\/wp\/v2\/pages\/75689\/revisions"}],"predecessor-version":[{"id":75690,"href":"https:\/\/www.ncheurope.com\/en\/wp-json\/wp\/v2\/pages\/75689\/revisions\/75690"}],"up":[{"embeddable":true,"href":"https:\/\/www.ncheurope.com\/en\/wp-json\/wp\/v2\/pages\/75693"}],"wp:attachment":[{"href":"https:\/\/www.ncheurope.com\/en\/wp-json\/wp\/v2\/media?parent=75689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}