CINXE.COM
Page not found - Coinpedia Fintech News
<!DOCTYPE html><html lang="en-US" class="" data-skin="light"><head><meta charset="UTF-8" /><link rel="profile" href="https://gmpg.org/xfn/11" /><link rel="icon" type="image/png" href="https://image.coinpedia.org/wp-content/uploads/2024/10/14132640/favicon.png"><link rel="alternate icon" href="https://image.coinpedia.org/wp-content/uploads/2024/10/14133523/favicon.ico" type="image/x-icon"><meta http-equiv='x-dns-prefetch-control' content='on'><link rel='dns-prefetch' href='//cdnjs.cloudflare.com' /><link rel='dns-prefetch' href='//ajax.googleapis.com' /><link rel='dns-prefetch' href='//fonts.googleapis.com' /><link rel='dns-prefetch' href='//fonts.gstatic.com' /><link rel='dns-prefetch' href='//s.gravatar.com' /><link rel='dns-prefetch' href='//www.google-analytics.com' /><meta name='robots' content='noindex, follow' /><style>img:is([sizes="auto" i], [sizes^="auto," i]) { contain-intrinsic-size: 3000px 1500px }</style><!-- This site is optimized with the Yoast SEO Premium plugin v23.9 (Yoast SEO v23.9) - https://yoast.com/wordpress/plugins/seo/ --><title>Page not found - Coinpedia Fintech News</title><meta property="og:locale" content="en_US" /><meta property="og:title" content="Page not found - Coinpedia Fintech News" /><meta property="og:site_name" content="Coinpedia Fintech News" /> <script type="application/ld+json" class="yoast-schema-graph">{"@context":"https://schema.org","@graph":[{"@type":"WebSite","@id":"https://coinpedia.org/#website","url":"https://coinpedia.org/","name":"Coinpedia Fintech News","description":"All about cryptocurrency and Blockchain","publisher":{"@id":"https://coinpedia.org/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://coinpedia.org/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https://coinpedia.org/#organization","name":"Coinpedia Blockchain Fintech News","url":"https://coinpedia.org/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https://coinpedia.org/#/schema/logo/image/","url":"https://image.coinpedia.org/wp-content/uploads/2020/10/29144428/cpfintechlogo.png","contentUrl":"https://image.coinpedia.org/wp-content/uploads/2020/10/29144428/cpfintechlogo.png","width":512,"height":512,"caption":"Coinpedia Blockchain Fintech News"},"image":{"@id":"https://coinpedia.org/#/schema/logo/image/"},"sameAs":["https://www.facebook.com/Coinpedia.org","https://x.com/coinpedianews","https://www.instagram.com/coinpedianews/","https://www.linkedin.com/company/coinpedia","https://pinterest.com/CoinpediaNews","https://www.youtube.com/channel/UC3E1ubcEKAu7RmoTy3Cx75Q"]}]}</script> <!-- / Yoast SEO Premium plugin. --><link rel="alternate" type="application/rss+xml" title="Coinpedia Fintech News » Feed" href="https://coinpedia.org/feed/" /><link rel="alternate" type="application/rss+xml" title="Coinpedia Fintech News » Comments Feed" href="https://coinpedia.org/comments/feed/" /> <script type="text/javascript">try { if( 'undefined' != typeof localStorage ){ var tieSkin = localStorage.getItem('tie-skin'); } var html = document.getElementsByTagName('html')[0].classList, htmlSkin = 'light'; if( html.contains('dark-skin') ){ htmlSkin = 'dark'; } if( tieSkin != null && tieSkin != htmlSkin ){ html.add('tie-skin-inverted'); var tieSkinInverted = true; } if( tieSkin == 'dark' ){ html.add('dark-skin'); } else if( tieSkin == 'light' ){ html.remove( 'dark-skin' ); } } catch(e) { console.log( e ) }</script> <style type="text/css">:root{ --tie-preset-gradient-1: linear-gradient(135deg, rgba(6, 147, 227, 1) 0%, rgb(155, 81, 224) 100%); --tie-preset-gradient-2: linear-gradient(135deg, rgb(122, 220, 180) 0%, rgb(0, 208, 130) 100%); --tie-preset-gradient-3: linear-gradient(135deg, rgba(252, 185, 0, 1) 0%, rgba(255, 105, 0, 1) 100%); --tie-preset-gradient-4: linear-gradient(135deg, rgba(255, 105, 0, 1) 0%, rgb(207, 46, 46) 100%); --tie-preset-gradient-5: linear-gradient(135deg, rgb(238, 238, 238) 0%, rgb(169, 184, 195) 100%); --tie-preset-gradient-6: linear-gradient(135deg, rgb(74, 234, 220) 0%, rgb(151, 120, 209) 20%, rgb(207, 42, 186) 40%, rgb(238, 44, 130) 60%, rgb(251, 105, 98) 80%, rgb(254, 248, 76) 100%); --tie-preset-gradient-7: linear-gradient(135deg, rgb(255, 206, 236) 0%, rgb(152, 150, 240) 100%); --tie-preset-gradient-8: linear-gradient(135deg, rgb(254, 205, 165) 0%, rgb(254, 45, 45) 50%, rgb(107, 0, 62) 100%); --tie-preset-gradient-9: linear-gradient(135deg, rgb(255, 203, 112) 0%, rgb(199, 81, 192) 50%, rgb(65, 88, 208) 100%); --tie-preset-gradient-10: linear-gradient(135deg, rgb(255, 245, 203) 0%, rgb(182, 227, 212) 50%, rgb(51, 167, 181) 100%); --tie-preset-gradient-11: linear-gradient(135deg, rgb(202, 248, 128) 0%, rgb(113, 206, 126) 100%); --tie-preset-gradient-12: linear-gradient(135deg, rgb(2, 3, 129) 0%, rgb(40, 116, 252) 100%); --tie-preset-gradient-13: linear-gradient(135deg, #4D34FA, #ad34fa); --tie-preset-gradient-14: linear-gradient(135deg, #0057FF, #31B5FF); --tie-preset-gradient-15: linear-gradient(135deg, #FF007A, #FF81BD); --tie-preset-gradient-16: linear-gradient(135deg, #14111E, #4B4462); --tie-preset-gradient-17: linear-gradient(135deg, #F32758, #FFC581); --main-nav-background: #1f2024; --main-nav-secondry-background: rgba(0,0,0,0.2); --main-nav-primary-color: #0088ff; --main-nav-contrast-primary-color: #FFFFFF; --main-nav-text-color: #FFFFFF; --main-nav-secondry-text-color: rgba(225,255,255,0.5); --main-nav-main-border-color: rgba(255,255,255,0.07); --main-nav-secondry-border-color: rgba(255,255,255,0.04); }</style><meta name="viewport" content="width=device-width, initial-scale=1.0" /><style id='co-authors-plus-coauthors-style-inline-css' type='text/css'>.wp-block-co-authors-plus-coauthors.is-layout-flow [class*=wp-block-co-authors-plus]{display:inline}</style><style id='co-authors-plus-avatar-style-inline-css' type='text/css'>.wp-block-co-authors-plus-avatar :where(img){height:auto;max-width:100%;vertical-align:bottom}.wp-block-co-authors-plus-coauthors.is-layout-flow .wp-block-co-authors-plus-avatar :where(img){vertical-align:middle}.wp-block-co-authors-plus-avatar:is(.alignleft,.alignright){display:table}.wp-block-co-authors-plus-avatar.aligncenter{display:table;margin-inline:auto}</style><style id='co-authors-plus-image-style-inline-css' type='text/css'>.wp-block-co-authors-plus-image{margin-bottom:0}.wp-block-co-authors-plus-image :where(img){height:auto;max-width:100%;vertical-align:bottom}.wp-block-co-authors-plus-coauthors.is-layout-flow .wp-block-co-authors-plus-image :where(img){vertical-align:middle}.wp-block-co-authors-plus-image:is(.alignfull,.alignwide) :where(img){width:100%}.wp-block-co-authors-plus-image:is(.alignleft,.alignright){display:table}.wp-block-co-authors-plus-image.aligncenter{display:table;margin-inline:auto}</style><style id='global-styles-inline-css' type='text/css'>:root{--wp--preset--aspect-ratio--square: 1;--wp--preset--aspect-ratio--4-3: 4/3;--wp--preset--aspect-ratio--3-4: 3/4;--wp--preset--aspect-ratio--3-2: 3/2;--wp--preset--aspect-ratio--2-3: 2/3;--wp--preset--aspect-ratio--16-9: 16/9;--wp--preset--aspect-ratio--9-16: 9/16;--wp--preset--color--black: #000000;--wp--preset--color--cyan-bluish-gray: #abb8c3;--wp--preset--color--white: #ffffff;--wp--preset--color--pale-pink: #f78da7;--wp--preset--color--vivid-red: #cf2e2e;--wp--preset--color--luminous-vivid-orange: #ff6900;--wp--preset--color--luminous-vivid-amber: #fcb900;--wp--preset--color--light-green-cyan: #7bdcb5;--wp--preset--color--vivid-green-cyan: #00d084;--wp--preset--color--pale-cyan-blue: #8ed1fc;--wp--preset--color--vivid-cyan-blue: #0693e3;--wp--preset--color--vivid-purple: #9b51e0;--wp--preset--color--global-color: #0088ff;--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple: linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%);--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan: linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%);--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange: linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%);--wp--preset--gradient--luminous-vivid-orange-to-vivid-red: linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%);--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray: linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%);--wp--preset--gradient--cool-to-warm-spectrum: linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%);--wp--preset--gradient--blush-light-purple: linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%);--wp--preset--gradient--blush-bordeaux: linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%);--wp--preset--gradient--luminous-dusk: linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%);--wp--preset--gradient--pale-ocean: linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%);--wp--preset--gradient--electric-grass: linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%);--wp--preset--gradient--midnight: linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%);--wp--preset--font-size--small: 13px;--wp--preset--font-size--medium: 20px;--wp--preset--font-size--large: 36px;--wp--preset--font-size--x-large: 42px;--wp--preset--spacing--20: 0.44rem;--wp--preset--spacing--30: 0.67rem;--wp--preset--spacing--40: 1rem;--wp--preset--spacing--50: 1.5rem;--wp--preset--spacing--60: 2.25rem;--wp--preset--spacing--70: 3.38rem;--wp--preset--spacing--80: 5.06rem;--wp--preset--shadow--natural: 6px 6px 9px rgba(0, 0, 0, 0.2);--wp--preset--shadow--deep: 12px 12px 50px rgba(0, 0, 0, 0.4);--wp--preset--shadow--sharp: 6px 6px 0px rgba(0, 0, 0, 0.2);--wp--preset--shadow--outlined: 6px 6px 0px -3px rgba(255, 255, 255, 1), 6px 6px rgba(0, 0, 0, 1);--wp--preset--shadow--crisp: 6px 6px 0px rgba(0, 0, 0, 1);}:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flex{display: flex;}.is-layout-flex{flex-wrap: wrap;align-items: center;}.is-layout-flex > :is(*, div){margin: 0;}body .is-layout-grid{display: grid;}.is-layout-grid > :is(*, div){margin: 0;}:where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;}:where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;}.has-black-color{color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-color{color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-color{color: var(--wp--preset--color--white) !important;}.has-pale-pink-color{color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-color{color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-color{color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-color{color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-color{color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-color{color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-color{color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-color{color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-color{color: var(--wp--preset--color--vivid-purple) !important;}.has-black-background-color{background-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-background-color{background-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-background-color{background-color: var(--wp--preset--color--white) !important;}.has-pale-pink-background-color{background-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-background-color{background-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-background-color{background-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-background-color{background-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-background-color{background-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-background-color{background-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-background-color{background-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-background-color{background-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-background-color{background-color: var(--wp--preset--color--vivid-purple) !important;}.has-black-border-color{border-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-border-color{border-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-border-color{border-color: var(--wp--preset--color--white) !important;}.has-pale-pink-border-color{border-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-border-color{border-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-border-color{border-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-border-color{border-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-border-color{border-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-border-color{border-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-border-color{border-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-border-color{border-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-border-color{border-color: var(--wp--preset--color--vivid-purple) !important;}.has-vivid-cyan-blue-to-vivid-purple-gradient-background{background: var(--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple) !important;}.has-light-green-cyan-to-vivid-green-cyan-gradient-background{background: var(--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan) !important;}.has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange) !important;}.has-luminous-vivid-orange-to-vivid-red-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-orange-to-vivid-red) !important;}.has-very-light-gray-to-cyan-bluish-gray-gradient-background{background: var(--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray) !important;}.has-cool-to-warm-spectrum-gradient-background{background: var(--wp--preset--gradient--cool-to-warm-spectrum) !important;}.has-blush-light-purple-gradient-background{background: var(--wp--preset--gradient--blush-light-purple) !important;}.has-blush-bordeaux-gradient-background{background: var(--wp--preset--gradient--blush-bordeaux) !important;}.has-luminous-dusk-gradient-background{background: var(--wp--preset--gradient--luminous-dusk) !important;}.has-pale-ocean-gradient-background{background: var(--wp--preset--gradient--pale-ocean) !important;}.has-electric-grass-gradient-background{background: var(--wp--preset--gradient--electric-grass) !important;}.has-midnight-gradient-background{background: var(--wp--preset--gradient--midnight) !important;}.has-small-font-size{font-size: var(--wp--preset--font-size--small) !important;}.has-medium-font-size{font-size: var(--wp--preset--font-size--medium) !important;}.has-large-font-size{font-size: var(--wp--preset--font-size--large) !important;}.has-x-large-font-size{font-size: var(--wp--preset--font-size--x-large) !important;} :where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;} :where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;} :root :where(.wp-block-pullquote){font-size: 1.5em;line-height: 1.6;}</style><link rel='stylesheet' id='ppress-frontend-css' href='https://coinpedia.org/wp-content/plugins/wp-user-avatar/assets/css/frontend.min.css?ver=4.15.18' type='text/css' media='all' /><link rel='stylesheet' id='ppress-flatpickr-css' href='https://coinpedia.org/wp-content/plugins/wp-user-avatar/assets/flatpickr/flatpickr.min.css?ver=4.15.18' type='text/css' media='all' /><link rel='stylesheet' id='ppress-select2-css' href='https://coinpedia.org/wp-content/plugins/wp-user-avatar/assets/select2/select2.min.css?ver=6.7.1' type='text/css' media='all' /><link rel='stylesheet' id='tie-css-ie-11-css' href='https://coinpedia.org/wp-content/themes/jannah/assets/css/ie/ie-lte-11.css?ver=7.2.0' type='text/css' media='all' /><link rel='stylesheet' id='tie-css-ie-10-css' href='https://coinpedia.org/wp-content/themes/jannah/assets/css/ie/ie-lt-10.css?ver=7.2.0' type='text/css' media='all' /><link rel='stylesheet' id='fontawesome-css' href='https://coinpedia.org/wp-content/plugins/wp-review-pro/public/css/font-awesome.min.css?ver=4.7.0-modified' type='text/css' media='all' /><link rel='stylesheet' id='wp_review-style-css' href='https://coinpedia.org/wp-content/plugins/wp-review-pro/public/css/wp-review.css?ver=3.4.11' type='text/css' media='all' /><link rel='stylesheet' id='tie-css-base-css' href='https://coinpedia.org/wp-content/themes/jannah/assets/css/base.min.css?ver=7.2.0' type='text/css' media='all' /><link rel='stylesheet' id='tie-css-styles-css' href='https://coinpedia.org/wp-content/themes/jannah/assets/css/style.min.css?ver=7.2.0' type='text/css' media='all' /><link rel='stylesheet' id='tie-css-widgets-css' href='https://coinpedia.org/wp-content/themes/jannah/assets/css/widgets.min.css?ver=7.2.0' type='text/css' media='all' /><link rel='stylesheet' id='tie-css-helpers-css' href='https://coinpedia.org/wp-content/themes/jannah/assets/css/helpers.min.css?ver=7.2.0' type='text/css' media='all' /><link rel='stylesheet' id='tie-fontawesome5-css' href='https://coinpedia.org/wp-content/themes/jannah/assets/css/fontawesome.css?ver=7.2.0' type='text/css' media='all' /><link rel='stylesheet' id='tie-css-ilightbox-css' href='https://coinpedia.org/wp-content/themes/jannah/assets/ilightbox/dark-skin/skin.css?ver=7.2.0' type='text/css' media='all' /><link rel='stylesheet' id='tie-css-shortcodes-css' href='https://coinpedia.org/wp-content/themes/jannah/assets/css/plugins/shortcodes.min.css?ver=7.2.0' type='text/css' media='all' /><link rel='stylesheet' id='taqyeem-styles-css' href='https://coinpedia.org/wp-content/themes/jannah/assets/css/plugins/taqyeem.min.css?ver=7.2.0' type='text/css' media='all' /><link rel='stylesheet' id='tie-theme-child-css-css' href='https://coinpedia.org/wp-content/themes/jannah-child/style.css?ver=6.7.1' type='text/css' media='all' /><style id='tie-theme-child-css-inline-css' type='text/css'>#main-nav .main-menu > ul > li > a{text-transform: uppercase;}#header-notification-bar{background: var( --tie-preset-gradient-13 );}#header-notification-bar{--tie-buttons-color: #FFFFFF;--tie-buttons-border-color: #FFFFFF;--tie-buttons-hover-color: #e1e1e1;--tie-buttons-hover-text: #000000;}#header-notification-bar{--tie-buttons-text: #000000;}.tie-cat-23,.tie-cat-item-23 > span{background-color:#e67e22 !important;color:#FFFFFF !important;}.tie-cat-23:after{border-top-color:#e67e22 !important;}.tie-cat-23:hover{background-color:#c86004 !important;}.tie-cat-23:hover:after{border-top-color:#c86004 !important;}.tie-cat-25,.tie-cat-item-25 > span{background-color:#2ecc71 !important;color:#FFFFFF !important;}.tie-cat-25:after{border-top-color:#2ecc71 !important;}.tie-cat-25:hover{background-color:#10ae53 !important;}.tie-cat-25:hover:after{border-top-color:#10ae53 !important;}.tie-cat-26,.tie-cat-item-26 > span{background-color:#9b59b6 !important;color:#FFFFFF !important;}.tie-cat-26:after{border-top-color:#9b59b6 !important;}.tie-cat-26:hover{background-color:#7d3b98 !important;}.tie-cat-26:hover:after{border-top-color:#7d3b98 !important;}.tie-cat-27,.tie-cat-item-27 > span{background-color:#34495e !important;color:#FFFFFF !important;}.tie-cat-27:after{border-top-color:#34495e !important;}.tie-cat-27:hover{background-color:#162b40 !important;}.tie-cat-27:hover:after{border-top-color:#162b40 !important;}.tie-cat-28,.tie-cat-item-28 > span{background-color:#795548 !important;color:#FFFFFF !important;}.tie-cat-28:after{border-top-color:#795548 !important;}.tie-cat-28:hover{background-color:#5b372a !important;}.tie-cat-28:hover:after{border-top-color:#5b372a !important;}.tie-cat-29,.tie-cat-item-29 > span{background-color:#4CAF50 !important;color:#FFFFFF !important;}.tie-cat-29:after{border-top-color:#4CAF50 !important;}.tie-cat-29:hover{background-color:#2e9132 !important;}.tie-cat-29:hover:after{border-top-color:#2e9132 !important;}@media (max-width: 991px){.side-aside.normal-side{background: #2f88d6;background: -webkit-linear-gradient(135deg,#5933a2,#2f88d6 );background: -moz-linear-gradient(135deg,#5933a2,#2f88d6 );background: -o-linear-gradient(135deg,#5933a2,#2f88d6 );background: linear-gradient(135deg,#2f88d6,#5933a2 );}}@font-face { font-family: 'Ubuntu'; src: url('https://coinpedia.org/wp-content/fonts/Ubuntu-Light.ttf') format('truetype'); font-weight: 200; font-display: swap;}@font-face { font-family: 'Ubuntu'; src: url('https://coinpedia.org/wp-content/fonts/Ubuntu-Regular.ttf') format('truetype'); font-weight: 300; font-display: swap;}@font-face { font-family: 'Ubuntu'; src: url('https://coinpedia.org/wp-content/fonts/Ubuntu-Medium.ttf') format('truetype'); font-weight: 400; font-display: swap;}@font-face { font-family: 'Ubuntu'; src: url('https://coinpedia.org/wp-content/fonts/Ubuntu-Bold.ttf') format('truetype'); font-weight: 500; font-display: swap;}@font-face { font-family: 'Space Grotesk'; src: url('https://coinpedia.org/wp-content/fonts/SpaceGrotesk-Light.ttf') format('truetype'); font-weight: 300; font-display: swap;}@font-face { font-family: 'Space Grotesk'; src: url('https://coinpedia.org/wp-content/fonts/SpaceGrotesk-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap;}@font-face { font-family: 'Space Grotesk'; src: url('https://coinpedia.org/wp-content/fonts/SpaceGrotesk-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap;}@font-face { font-family: 'Space Grotesk'; src: url('https://coinpedia.org/wp-content/fonts/SpaceGrotesk-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap;}@font-face { font-family: 'Space Grotesk'; src: url('https://coinpedia.org/wp-content/fonts/SpaceGrotesk-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap;}@font-face { font-family: 'Figtree'; src: url('https://coinpedia.org/wp-content/fonts/Figtree-Light.ttf') format('truetype'); font-weight: 300; font-display: swap;}@font-face { font-family: 'Figtree'; src: url('https://coinpedia.org/wp-content/fonts/Figtree-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap;}@font-face { font-family: 'Figtree'; src: url('https://coinpedia.org/wp-content/fonts/Figtree-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap;}@font-face { font-family: 'Figtree'; src: url('https://coinpedia.org/wp-content/fonts/Figtree-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap;}@font-face { font-family: 'Figtree'; src: url('https://coinpedia.org/wp-content/fonts/Figtree-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap;}@font-face { font-family: 'Figtree'; src: url('https://coinpedia.org/wp-content/fonts/Figtree-ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap;}.last-updated { display: none !important;}#the-post .last-updated { display: block !important;}@media (min-width: 991px) {#theme-header .tie-logo-img-default.tie-logo-img{ margin-top: -6px; max-width: 180px;}}</style><style id='rocket-lazyload-inline-css' type='text/css'>.rll-youtube-player{position:relative;padding-bottom:56.23%;height:0;overflow:hidden;max-width:100%;}.rll-youtube-player:focus-within{outline: 2px solid currentColor;outline-offset: 5px;}.rll-youtube-player iframe{position:absolute;top:0;left:0;width:100%;height:100%;z-index:100;background:0 0}.rll-youtube-player img{bottom:0;display:block;left:0;margin:auto;max-width:100%;width:100%;position:absolute;right:0;top:0;border:none;height:auto;-webkit-transition:.4s all;-moz-transition:.4s all;transition:.4s all}.rll-youtube-player img:hover{-webkit-filter:brightness(75%)}.rll-youtube-player .play{height:100%;width:100%;left:0;top:0;position:absolute;background:url(https://coinpedia.org/wp-content/plugins/wp-rocket/assets/img/youtube.png) no-repeat center;background-color: transparent !important;cursor:pointer;border:none;}</style> <script type="text/javascript" id="jquery-core-js-extra">/* <![CDATA[ */ var load_more_params = {"ajax_url":"https:\/\/coinpedia.org\/wp-admin\/admin-ajax.php","nonce":"c3a098b04e","category":"","tags":""}; /* ]]> */</script> <script type="text/javascript" src="https://coinpedia.org/wp-includes/js/jquery/jquery.min.js?ver=3.7.1" id="jquery-core-js"></script> <script type="text/javascript" src="https://coinpedia.org/wp-content/plugins/wp-user-avatar/assets/flatpickr/flatpickr.min.js?ver=4.15.18" id="ppress-flatpickr-js"></script> <script type="text/javascript" src="https://coinpedia.org/wp-content/plugins/wp-user-avatar/assets/select2/select2.min.js?ver=4.15.18" id="ppress-select2-js"></script> <link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://coinpedia.org/xmlrpc.php?rsd" /> <script type='text/javascript'>/* <![CDATA[ */ var taqyeem = {"ajaxurl":"https://coinpedia.org/wp-admin/admin-ajax.php" , "your_rating":"Your Rating:"}; /* ]]> */</script> <meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-5V766RZN');</script> <!-- End Google Tag Manager --> <!-- Global site tag (gtag.js) - Google Ads --> <script async src="https://www.googletagmanager.com/gtag/js?id=AW-10952805171"></script> <script>window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'AW-10952805171');</script> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-RE1GG3FGQW"></script> <script>window.dataLayer = window.dataLayer || []; function gtag(){ dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', 'G-RE1GG3FGQW');</script> <!-- Event snippet for Website traffic conversion page --> <script>gtag('event', 'conversion', {'send_to': 'AW-10952805171/OGRQCKqZxc8DELOW2uYo'});</script> <script type="text/javascript">(function(c,l,a,r,i,t,y){ c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)}; t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i; y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y); })(window, document, "clarity", "script", "fajewnqmec");</script> <!-- Matomo javascript code --> <script src="https://cdn.jsdelivr.net/npm/@fingerprintjs/fingerprintjs@3.0.0/dist/fp.min.js"></script> <script>// Declare a global variable to store the unique device ID var storeUniqueDeviceId; // Initialize FingerprintJS FingerprintJS.load().then(fp => { // Get the visitor identifier fp.get().then(result => { storeUniqueDeviceId = result.visitorId; var _paq = window._paq = window._paq || []; // Set custom variable for Device ID var deviceId = storeUniqueDeviceId; _paq.push(['setCustomVariable', 1, 'Device ID', deviceId, 'visit']); _paq.push(["setCookieDomain", "*.coinpedia.org"]); _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u = "https://coinpedia-news.matomo.cloud/"; _paq.push(['setTrackerUrl', u + 'matomo.php']); _paq.push(['setSiteId', '1']); var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; g.async = true; g.src = '//cdn.matomo.cloud/coinpedia-news.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g, s); })(); }); });</script> <noscript><style id="rocket-lazyload-nojs-css">.rll-youtube-player, [data-lazy-src]{display:none !important;}</style></noscript><link rel='stylesheet' href='https://coinpedia.org/wp-content/themes/jannah/assets/css/header-footer.css' type='text/css' media='all' /> <!--<link rel='stylesheet' href='https://coinpedia.org/wp-content/themes/jannah/assets/css/dark.css' type='text/css' media='all' /> --></head><body id="tie-body" class="error404 tie-no-js wrapper-has-shadow block-head-1 magazine2 is-thumb-overlay-disabled is-desktop is-header-layout-3 full-width hide_share_post_top"> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5V766RZN" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --><div class="background-overlay"><div id="tie-container" class="site tie-container"><div id="tie-wrapper"><header id="theme-header" class="theme-header header-layout-3 main-nav-dark main-nav-default-dark main-nav-below main-nav-boxed no-stream-item has-shadow has-normal-width-logo mobile-header-default"><div class="container header-container"><div class="tie-row logo-row"><div class="logo-wrapper"><div class="tie-col-md-12 logo-container clearfix logo-wrapper-mb"><div class="tie-row logo_container_row"><div class="tie-col-md-4 tie-col-6 tablet-view-col-four"><div id="mobile-header-components-area_2" class="mobile-header-components"><ul class="components"><li class="mobile-component_menu custom-menu-link"><a href="#" id="mobile-menu-icon" class=""><span class="tie-mobile-menu-icon nav-icon is-layout-1"></span><span class="screen-reader-text">Menu</span></a></li></ul></div><div id="logo" class="image-logo" > <a title="Coinpedia - Fintech & Cryptocurreny News Media| Crypto Guide" href="https://coinpedia.org/"> <picture class="tie-logo-default tie-logo-picture"> <source class="tie-logo-source-default tie-logo-source" srcset="https://image.coinpedia.org/static/common/coinpedia-logo.svg"> <img class="tie-logo-img-default tie-logo-img" src="https://image.coinpedia.org/static/common/coinpedia-logo.svg" alt="Coinpedia - Fintech & Cryptocurreny News Media| Crypto Guide" width="300" height="49" style="max-height:49px !important; width: auto;" /> </picture> </a></div><!-- #logo /--></div><div class="tie-col-md-8 tie-col-6 rm-lf-pd tablet-view-col-six"><ul class="primary-menus hide-in-tablet"> <!--<li class="skin-icon menu-item custom-menu-link themeswitcher dark-light-menu darkModeToggle"> <img src="https://image.coinpedia.org/static/common/dark_mode.svg" alt="light-sun" class="dark-lightimage" width="16" height="18"></li> --><li class="skin-icon menu-item custom-menu-link notification-menu" id="notification-icon"> <span class="countunseen"></span> <span class="notification_btn"> <img src="https://image.coinpedia.org/static/common/bell.svg" width="16" height="16" alt="notification" /> </span></li><li class="select-currency"> <span id="currency-image"></span> <span id="currency-code"></span></li><li class="advertise-menu"> <a href="https://coinpedia.org/advertising/"><span><img src="https://image.coinpedia.org/static/common/advertise.svg" alt="advertise" width="14" height="14" />Advertise</span></a></li><li class="searchbar_menu"><style>.searchbar_menu { width: 40%; } .search-bar #search-submit { background: transparent; padding: 9px 2px; line-height: 0; float: right; } .search-bar #search-input { width: 84%; } .search-bar #search-input::placeholder { color: #FAFAFA99; } .custom-search-container { position: relative; width: 100%; padding: 2px 10px; background: rgba(255, 255, 255, 0.10); border-radius: 8px; } .custom-search-design { width: 50%; } #searchform { display: flex; align-items: center; } #searchform input[type="text"] { padding: 8px 10px; border: 0; border-radius: 0; width: 100%; background: transparent; font-weight: 400; font-size: 14px; line-height: 21px; color: rgba(250, 250, 250, 0.60); outline: 0; } #searchform input[type="text"]::placeholder { color: rgba(250, 250, 250, 0.60); } #searchform button { background-color: transparent; border: 0; outline: 0; } .highlight { font-weight: 600; } .suggestion-item { padding: 12px 16px; border-bottom: 1px solid #c0d8ff; color: #0E1B1B; } #resource-suggestions .suggestion-item:last-child , .tab-content .suggestion-item:last-child { border-bottom: none; } .suggestion-item a { text-decoration: none; color: #333; display: flex; align-items: center; } .result-image { border-radius: 4px; margin-right: 12px; background-size: cover; background-repeat: no-repeat; background-position: center; width: 70px; height: 50px; margin-right: 12px; min-width: 70px; } .suggestions-box h5 a { font-weight: 700; font-size: 12px; float: right; color: #0052CC; } #resource-suggestions h5 { margin-top: 20px; } .suggestions-box h5 a img { vertical-align: middle; margin-left: 4px; width: 18px; } .suggestion-item h6 { color: #0E1B1B; font-size: 14px; font-weight: 400; line-height: 24px; margin-bottom: 0; white-space: break-spaces; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; text-transform: capitalize; } .suggestion-item ul { padding-left: 2px; list-style-type: none; } .suggestion-item ul li { color: #787F7F; display: inline-block; font-weight: 400; font-size: 12px; border-right: 1px solid #ECEDED; padding-right: 10px; margin-right: 6px; line-height: 18px; } .suggestion-item ul li:last-child { border-right: 0; padding-right: 0; margin-right: 0; } .suggestion-item p { font-size: 14px; line-height: 22px; margin: 6px 0; } .loader { position: absolute; top: 68%; left: 50%; transform: translate(-50%, -50%); width: 14px; height: 14px; border: 3px solid rgba(0, 0, 0, 0.1); border-top: 3px solid #1b1b4a; border-radius: 50%; animation: spin 1s linear infinite; z-index: 9999; background-color: rgba(255, 255, 255, 0.8); padding: 7px; } .suggestion-lists { min-height: 50px; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } #course-suggestions { position: relative; min-height: 40px; } .suggestions-box .suggestion-lists h5 { margin-top: 14px; } .highlight { font-weight: 600; } #suggestions { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-top: none; display: none; z-index: 999; padding: 0; max-height: 480px; overflow: auto; border: 1px solid #4782d5; border-radius: 8px; margin: 6px 0 0; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); min-height:160px; } #resource-suggestions .suggestion-item:last-child { border-bottom: none; } .suggestion-item a { text-decoration: none; color: #333; display: flex; } .result-image { border-radius: 8px; margin-right: 12px; background-size: cover; background-repeat: no-repeat; background-position: center; width: 80px; height: 50px; margin-right: 12px; min-width: 80px; } .suggestions-box h5 { font-weight: 600; font-size: 16px; line-height: 21px; color: #0E1B1B; margin-bottom: 4px; padding: 0 16px; } .suggestion-item h6 { color: #0E1B1B; font-size: 14px; font-weight: 400; line-height: 22px; margin-bottom: 0; white-space: break-spaces; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; } .suggestions .tab-menu { display: flex; border-bottom: 2px solid #1717171A; margin-bottom: 16px; margin-top: 10px; white-space: nowrap; overflow: auto; user-select: none; } .suggestions .tab-menu::-webkit-scrollbar-thumb, body ::-webkit-scrollbar { height: 0px; } .suggestions .tab-item { padding:16px; cursor: pointer; font-weight: 600; color: #0E1B1B; } .suggestions .tab-item.active { border-bottom: 2px solid #0052CC; background: linear-gradient(360deg, rgba(0, 82, 204, 0.26) -26.92%, rgba(0, 82, 204, 0.1) -26.91%, rgba(0, 82, 204, 0) 75.15%); color: #0052CC; } .suggestions .tab-content { display: none; } .suggestions .tab-content.active { display: block; padding: 0; } .not_found_data{ font-size: 14px; color: #78797a; margin-top: 16px; font-weight: 500; padding-left: 16px; padding-bottom: 10px; } #cryptocurrency-suggestions .result-image, #markets-exchange-suggestions .result-image, #wallet-address-suggestions .result-image{ min-width: 40px; height: 40px; width: 25px; } #wallet-address-suggestions h6{ width: 100%; } #wallet-address-suggestions .float-right{ color: #58667e; float: right; font-weight: 500; font-size: 13px; margin-top: 1px; } #wallet-address-suggestions .suggestion-item:last-child, #markets-exchange-suggestions .suggestion-item:last-child, #cryptocurrency-suggestions .suggestion-item:last-child{ border-bottom: 0; } .clear-btn{ cursor: pointer; } @media(max-width:991px){ #global-search-modal .custom-search-container{ border-radius: 8px; max-height: 42px; border: 1px solid #0052CC4D; margin-bottom: 18px; margin-top: 14px; } #global-search-modal .custom-search-container #searchform input[type="text"]{ font-size: 14px; cursor: pointer; font-weight: 600; color: #2c2f34; } #global-search-modal .custom-search-container .searchform input[type="text"]::placeholder { color: #2c2f34; font-weight: 400; } #global-search-modal .modal-content{ min-height: 550px; } #modal-suggestions{ margin-left: -30px; margin-right: -30px; position: relative; } .closemobile{ float: right; position: relative; top: 2px; width: 12px; } #global-search-modal h2{ font-size: 18px; font-weight: 600; } .tab-content .suggestion-item:last-child{ border-bottom: 0; } .suggestion-item { padding: 11px 16px; } #searchsubmit img{ margin-top: 6px; } #global-search-modal .loader{ top: 94%; } .suggestions-height{ max-height: 370px; overflow: auto; } .result-image{ width: 37px; height: 37px; min-width: 37px; } .clear-btn{ font-weight: 300; color: #b2b2b2; } }</style><div class="custom-search-container"><form role="search" id="searchform" class="searchform" onsubmit="return false;"> <button type="button" id="searchsubmit"> <img src="https://image.coinpedia.org/static/common/search_top_menu.svg" alt="search" width="16" height="16" /> </button> <input type="text" value="" name="s" id="s" placeholder="Search Posts, Events, Professionals and Companies" onkeyup="showStaticSuggestions(this.value)" autocomplete="off" class="search-clear" /> <span id="clear-btn" class="clear-btn" style="display:none;" onclick="clearInput()">✖</span></form><div id="suggestions" class="suggestions suggestions-box hide-suggestions-tabs" style="display:none;"><div class="tab-menu"><div class="tab-item active" data-tab="posts">Posts</div><div class="tab-item" data-tab="events">Events</div><div class="tab-item" data-tab="professionals">Professionals</div><div class="tab-item" data-tab="companies">Companies</div><div class="tab-item" data-tab="cryptocurrency">Currencies</div><div class="tab-item" data-tab="markets-exchange">Exchanges</div></div><div id="posts" class="tab-content active"><h5>Posts <a href="https://coinpedia.org/?s=" class="viewAllPosts" target="_blank">View All </a></h5><div id="resource-suggestions" class="resource-suggestions"></div><div class="loader"></div></div><div id="events" class="tab-content"><h5>Events <a href="https://events.coinpedia.org/global_search/?search=" target="_blank" class="viewAllLink">View All </a></h5><div id="events-suggestions" class="events-suggestions"></div></div><div id="professionals" class="tab-content"><h5>Professionals <a href="https://events.coinpedia.org/global_search/?search=" target="_blank" class="view_professional">View All </a></h5><div id="professional-suggestions" class="professional-suggestions"></div></div><div id="companies" class="tab-content"><h5>Companies <a href="https://events.coinpedia.org/global_search/?search=" target="_blank" class="view_company">View All </a></h5><div id="companies-suggestions" class="companies-suggestions"></div></div><div id="cryptocurrency" class="tab-content"><h5>Market Currencies <a href="https://markets.coinpedia.org/global_search/?search=" target="_blank" class="view_cryptocurrency">View All </a></h5><div id="cryptocurrency-suggestions" class="cryptocurrency-suggestions"></div><div id="wallet-address-suggestions"></div></div><div id="markets-exchange" class="tab-content"><h5>Market Exchanges <a href="https://markets.coinpedia.org/exchanges?search=" target="_blank" class="view_exchange">View All </a></h5><div id="markets-exchange-suggestions" class="markets-exchange-suggestions"></div></div></div></div> <script>/////// Mobile view ////////// // Function to open the modal function openModalSearch() { jQuery('#global-search-modal').fadeIn(); jQuery('#global-search-modal').addClass('show'); jQuery('#global-search-modal').removeClass('hide'); jQuery('#global-search-modal').modal('show'); jQuery('.site.tie-container').removeClass('side-aside-open'); } function closeModalSearch() { jQuery('#global-search-modal').fadeOut(); jQuery('#global-search-modal').removeClass('show').addClass('hide');; } function searchKeywordSuggestionMb() { jQuery('#resource-suggestions-mb').html('<p class="suggestion-item">Search keywords to find relevant posts.</p>'); jQuery('#events-suggestions-mb').html('<p class="suggestion-item">Search keywords to find relevant events.</p>'); jQuery('#professional-suggestions-mb').html('<p class="suggestion-item">Search keywords to find relevant professionals.</p>'); jQuery('#companies-suggestions-mb').html('<p class="suggestion-item">Search keywords to find relevant companies.</p>'); jQuery('#cryptocurrency-suggestions-mb').html('<p class="suggestion-item">Search keywords to find relevant market currencies.</p>'); jQuery('#markets-exchange-suggestions-mb').html('<p class="suggestion-item">Search keywords to find relevant market exchanges.</p>'); } function hideViewAllLinksMb(){ jQuery('.viewAllPosts_mb').hide(); jQuery('.viewAllLink_mb').hide(); jQuery('.view_professional_mb').hide(); jQuery('.view_company_mb').hide(); jQuery('.view_cryptocurrency_mb').hide(); jQuery('.view_exchange_mb').hide(); } function searchKeywordSuggestion() { jQuery('#resource-suggestions').html('<p class="suggestion-item">Search keywords to find relevant posts.</p>'); jQuery('#events-suggestions').html('<p class="suggestion-item">Search keywords to find relevant events.</p>'); jQuery('#professional-suggestions').html('<p class="suggestion-item">Search keywords to find relevant professionals.</p>'); jQuery('#companies-suggestions').html('<p class="suggestion-item">Search keywords to find relevant companies.</p>'); jQuery('#cryptocurrency-suggestions').html('<p class="suggestion-item">Search keywords to find relevant market currencies.</p>'); jQuery('#markets-exchange-suggestions').html('<p class="suggestion-item">Search keywords to find relevant market exchanges.</p>'); } function hideViewAllLinks(){ jQuery('.viewAllPosts').hide(); jQuery('.viewAllLink').hide(); jQuery('.view_professional').hide(); jQuery('.view_company').hide(); jQuery('.view_cryptocurrency').hide(); jQuery('.view_exchange').hide(); } jQuery(document).ready(function($) { $('.search-modal-mb').click(function() { openModalSearch(); $('.search-clear-mb').val(''); $('.clear-btn').hide(); searchKeywordSuggestionMb(); hideViewAllLinksMb(); }); $('.closemobile').click(function() { closeModalSearch(); }); $(window).click(function(event) { if ($(event.target).is('#global-search-modal')) { closeModalSearch(); } }); }); function highlightText(text, query) { const regex = new RegExp(`(${query})`, 'gi'); return text.replace(regex, '<span class="highlight">$1</span>'); } function showClearButton() { var inputValue = document.querySelector('.search-clear').value; var inputValueMb = document.querySelector('.search-clear-mb').value; if (inputValue) { document.getElementById('clear-btn').style.display = 'block'; } else { document.getElementById('clear-btn').style.display = 'none'; } if (inputValueMb) { document.getElementById('clear-btn-mb').style.display = 'block'; } else { document.getElementById('clear-btn-mb').style.display = 'none'; } } function clearInput() { document.querySelector('.search-clear').value = ''; document.getElementById('clear-btn').style.display = 'none'; document.querySelector('.search-clear-mb').value = ''; document.getElementById('clear-btn-mb').style.display = 'none'; jQuery('.hide-suggestions-tabs').hide(); setTimeout(function() { searchKeywordSuggestionMb(); hideViewAllLinksMb(); }, 2500); } document.querySelector('.search-clear')?.addEventListener('input', showClearButton); document.querySelector('.search-clear-mb')?.addEventListener('input', showClearButton); function showStaticSuggestions(query) { // Remove leading and trailing whitespace query = query.trim(); if (query === '') { setTimeout(function() { searchKeywordSuggestionMb(); hideViewAllLinks(); }, 3500); } if (query.length < 2) { jQuery('.hide-suggestions-tabs').hide(); return; } jQuery('.hide-suggestions-tabs').show(); jQuery('#resource-suggestions-mb').html('<div class="loader"></div>'); jQuery('.loader').show(); const EVENTS_HOME_URL = "https://events.coinpedia.org"; var viewAllPosts = document.getElementsByClassName('viewAllPosts')[0]; var viewAllLink = document.getElementsByClassName('viewAllLink')[0]; var viewAllLinkProfessional = document.getElementsByClassName('view_professional')[0]; var viewAllLinkCompany = document.getElementsByClassName('view_company')[0]; var viewAllLinkCryptocurrency = document.getElementsByClassName('view_cryptocurrency')[0]; var viewAllLinkExchange = document.getElementsByClassName('view_exchange')[0]; ////////// mobile ////////////////// var viewAllPostsMb = document.getElementsByClassName('viewAllPosts_mb')[0]; var viewAllLinkMb = document.getElementsByClassName('viewAllLink_mb')[0]; var viewAllLinkProfessionalMb = document.getElementsByClassName('view_professional_mb')[0]; var viewAllLinkCompanyMb = document.getElementsByClassName('view_company_mb')[0]; var viewAllLinkCryptocurrencyMb = document.getElementsByClassName('view_cryptocurrency_mb')[0]; var viewAllLinkExchangeMb = document.getElementsByClassName('view_exchange_mb')[0]; // Update the href dynamically with search query viewAllPosts.href = 'https://coinpedia.org/?s=' + encodeURIComponent(query); viewAllLink.href = 'https://events.coinpedia.org/global_search/?search=' + encodeURIComponent(query); viewAllLinkProfessional.href = 'https://events.coinpedia.org/global_search/?search=' + encodeURIComponent(query); viewAllLinkCompany.href = 'https://events.coinpedia.org/global_search/?search=' + encodeURIComponent(query); viewAllLinkCryptocurrency.href = 'https://markets.coinpedia.org/?search=' + encodeURIComponent(query); viewAllLinkExchange.href = 'https://markets.coinpedia.org/exchanges/?search=' + encodeURIComponent(query); // mobile view // Update the href dynamically with search query viewAllPostsMb.href = 'https://coinpedia.org/?s=' + encodeURIComponent(query); viewAllLinkMb.href = 'https://events.coinpedia.org/global_search/?search=' + encodeURIComponent(query); viewAllLinkProfessionalMb.href = 'https://events.coinpedia.org/global_search/?search=' + encodeURIComponent(query); viewAllLinkCompanyMb.href = 'https://events.coinpedia.org/global_search/?search=' + encodeURIComponent(query); viewAllLinkCryptocurrencyMb.href = 'https://markets.coinpedia.org/?search=' + encodeURIComponent(query); viewAllLinkExchangeMb.href = 'https://markets.coinpedia.org/exchanges/?search=' + encodeURIComponent(query); // Fetch events, speakers, and organizers jQuery.ajax({ url: 'https://coinpedia.org/wp-admin/admin-ajax.php', method: 'POST', data: { action: 'fetch_events_lists', query: query }, success: function(response) { jQuery('.loader').hide(); let data = JSON.parse(response); let eventsHTML = ''; let speakersHTML = ''; let organizersHTML = ''; if (data.message) { // Events if (data.message.events && data.message.events.length > 0) { data.message.events.forEach(function(event) { var eventsImageURL = event.event_image ? `https://image.coinpedia.org/app_uploads/events/${event.event_image}` : 'https://image.coinpedia.org/app_uploads/profile/default.png'; var eventURL = `${EVENTS_HOME_URL}/${event.event_url}`; eventsHTML += ` <div class="suggestion-item"> ${eventURL ? `<a href="${eventURL}" target="_blank"> <div class="result-image" style="background-image: url('${eventsImageURL}')"></div> <h6>${highlightText(event.event_title, query)}</h6> </a>` : `<a><div class="result-image" style="background-image: url('${eventsImageURL}')"></div> <h6>${highlightText(event.event_title, query)}</h6></a>` } </div> `; }); jQuery('#events-suggestions').html(eventsHTML); jQuery('#events-suggestions-mb').html(eventsHTML); jQuery('.viewAllLink').show(); jQuery('.viewAllLink_mb').show(); } else { jQuery('#events-suggestions').html('<div class="not_found_data">No events found.</div>'); jQuery('#events-suggestions-mb').html('<div class="not_found_data">No events found.</div>'); jQuery('.viewAllLink').hide(); jQuery('.viewAllLink_mb').hide(); } // Speakers if (data.message.speakers && data.message.speakers.length > 0) { data.message.speakers.forEach(function(speaker) { var profileImageURL = speaker.profile_image ? `https://image.coinpedia.org/app_uploads/profile/${speaker.profile_image}` : 'https://image.coinpedia.org/app_uploads/profile/default.png'; var displayNameSpeakers = speaker.full_name ? speaker.full_name : speaker.user_name; speakersHTML += ` <div class="suggestion-item"> ${speaker.user_name ? `<a href="https://app.coinpedia.org/${speaker.user_name}" target="_blank"> <div class="result-image" style="background-image: url('${profileImageURL}')"></div> <h6>${highlightText(displayNameSpeakers, query)}</h6> </a>` : `<a><div class="result-image" style="background-image: url('${profileImageURL}')"></div> <h6>${highlightText(displayNameSpeakers, query)}</h6></a>` } </div> `; }); jQuery('#professional-suggestions').html(speakersHTML); jQuery('#professional-suggestions-mb').html(speakersHTML); jQuery('.view_professional').show(); jQuery('.view_professional_mb').show(); } else { jQuery('#professional-suggestions').html('<div class="not_found_data">No professionals found.</div>'); jQuery('#professional-suggestions-mb').html('<div class="not_found_data">No professionals found.</div>'); jQuery('.view_professional').hide(); jQuery('.view_professional_mb').hide(); } // Organizers if (data.message.organizers && data.message.organizers.length > 0) { data.message.organizers.forEach(function(organizer) { var defaultImageURL = organizer.company_logo ? `https://image.coinpedia.org/app_uploads/profile/${organizer.company_logo}` : 'https://image.coinpedia.org/app_uploads/profile/default.png'; organizersHTML += ` <div class="suggestion-item"> ${organizer.company_id ? `<a href="https://app.coinpedia.org/company/${organizer.company_id}" target="_blank"> <div class="result-image" style="background-image: url('${defaultImageURL}')"></div> <h6>${highlightText(organizer.company_name, query)}</h6> </a>` : `<a><div class="result-image" style="background-image: url('${defaultImageURL}')"></div> <h6>${highlightText(organizer.company_name, query)}</h6></a>` } </div> `; }); jQuery('#companies-suggestions').html(organizersHTML); jQuery('#companies-suggestions-mb').html(organizersHTML); jQuery('.view_company').show(); jQuery('.view_company_mb').show(); } else { jQuery('#companies-suggestions').html('<div class="not_found_data">No companies found.</div>'); jQuery('#companies-suggestions-mb').html('<div class="not_found_data">No companies found.</div>'); jQuery('.view_company').hide(); jQuery('.view_company_mb').hide(); } } }, error: function() { jQuery('.loader').hide(); console.error('Failed to fetch data.'); } }); // Fetch resources jQuery.ajax({ url: 'https://coinpedia.org/wp-admin/admin-ajax.php', method: 'POST', data: { action: 'fetch_resources', query: query }, success: function(response) { let resources; try { resources = JSON.parse(response); } catch (e) { console.error('Failed to parse JSON response:', response); return; } let resourceHTML = ''; if (resources.error) { jQuery('.resourcenotfound').show().text(resources.error); } else if (resources.length > 0) { resources.forEach(function(resource) { resourceHTML += ` <div class="suggestion-item"> <a href="${resource.permalink}"> <div class="result-image" style="background-image: url('${resource.image}')"></div> <h6>${highlightText(resource.title, query)}</h6> </a> </div> `; }); jQuery('#resource-suggestions').html(resourceHTML); jQuery('.viewAllPosts').show(); jQuery('#resource-suggestions-mb').html(resourceHTML); jQuery('.viewAllPosts_mb').show(); } else { jQuery('#resource-suggestions').html('<div class="not_found_data">No posts found.</div>'); jQuery('.viewAllPosts').hide(); jQuery('#resource-suggestions-mb').html('<div class="not_found_data">No posts found.</div>'); jQuery('.viewAllPosts_mb').hide(); } const tabMenu = document.querySelector('.tab-menu'); let isDragging = false; let startX; let scrollLeft; tabMenu.addEventListener('mousedown', (e) => { isDragging = true; tabMenu.classList.add('dragging'); startX = e.pageX - tabMenu.offsetLeft; scrollLeft = tabMenu.scrollLeft; }); tabMenu.addEventListener('mouseleave', () => { isDragging = false; tabMenu.classList.remove('dragging'); }); tabMenu.addEventListener('mouseup', () => { isDragging = false; tabMenu.classList.remove('dragging'); }); tabMenu.addEventListener('mousemove', (e) => { if (!isDragging) return; e.preventDefault(); const x = e.pageX - tabMenu.offsetLeft; const move = (x - startX) * 1.5; // Adjust this value for scroll speed tabMenu.scrollLeft = scrollLeft - move; }); }, error: function(xhr, status, error) { console.error('AJAX request failed:', status, error); } }); /*************** Markets api cryptocurrency global search integration url ************************/ jQuery.ajax({ url: 'https://coinpedia.org/wp-admin/admin-ajax.php', method: 'POST', data: { action: 'fetch_markets_cryptocurrency_lists', query: query }, success: function(response) { jQuery('.loader').hide(); let data; try { data = JSON.parse(response); } catch (e) { console.error('Failed to parse response JSON:', e); return; } let crypto_base_url = 'https://markets.coinpedia.org'; let cryptocurrencyHTML = ''; let walletAddressHTML = ''; let hasCryptocurrencies = false; let hasWalletAddresses = false; jQuery('#cryptocurrency-suggestions').html(''); jQuery('#wallet-address-suggestions').html(''); // Handle cryptocurrency data if (data.cryptocurrencies && data.cryptocurrencies.message) { if (data.cryptocurrencies.message.length > 0) { hasCryptocurrencies = true; // Set the flag to true if there are cryptocurrencies data.cryptocurrencies.message.forEach(function(crypto) { let cryptoImageURL = crypto.token_image ? `https://image.coinpedia.org/app_uploads/markets/cryptocurrencies/${crypto.token_image}` : 'https://image.coinpedia.org/app_uploads/profile/default.png'; cryptocurrencyHTML += ` <div class="suggestion-item"> <a href="${crypto_base_url}/${crypto.token_id}/" target="_blank"> <div class="result-image" style="background-image: url('${cryptoImageURL}')"></div> <h6>${highlightText(crypto.token_name, query)} ${crypto.symbol}</h6> </a> </div> `; }); jQuery('#cryptocurrency-suggestions').html(cryptocurrencyHTML); jQuery('.view_cryptocurrency').show(); jQuery('#cryptocurrency-suggestions-mb').html(cryptocurrencyHTML); jQuery('.view_cryptocurrency_mb').show(); } } else { console.error('Unexpected data format for cryptocurrencies:', data); } // If cryptocurrencies data is empty, check wallet addresses if (!hasCryptocurrencies && data.wallet_addresses && data.wallet_addresses.message) { if (Object.keys(data.wallet_addresses.message).length > 0) { hasWalletAddresses = true; var wallet_data = data.wallet_addresses.message.currency; var walletImageURL = '/assets/img/default_token.png'; walletAddressHTML += ` <div class="suggestion-item"> <a href="${crypto_base_url}/${data.wallet_addresses.network_id}/${query}" target="_blank"> <div class="result-image" style="background-image: url('${crypto_base_url}/${walletImageURL}')"></div> <h6>${highlightText(wallet_data.name, query)} (${wallet_data.symbol}) <span class="float-right">#${wallet_data.tokenType} </span></h6> </a> </div> `; jQuery('#wallet-address-suggestions').html(walletAddressHTML); jQuery('.view_cryptocurrency').hide(); jQuery('#wallet-address-suggestions-mb').html(walletAddressHTML); jQuery('.view_cryptocurrency_mb').hide(); } } else if (!hasCryptocurrencies) { console.error('Unexpected data format for wallet addresses:', data); } // Display "not found" message only if both are empty if (!hasCryptocurrencies && !hasWalletAddresses) { jQuery('#cryptocurrency-suggestions').html('<div class="not_found_data">No currencies found.</div>'); jQuery('.view_cryptocurrency').hide(); jQuery('#cryptocurrency-suggestions-mb').html('<div class="not_found_data">No currencies found.</div>'); jQuery('.view_cryptocurrency_mb').hide(); } }, error: function() { jQuery('.loader').hide(); console.error('Failed to fetch data.'); } }); /********* Markets exchange api integration ********************/ jQuery.ajax({ url: 'https://coinpedia.org/wp-admin/admin-ajax.php', method: 'POST', data: { action: 'fetch_markets_exchange_lists', query: query }, success: function(response) { jQuery('.loader').hide(); let data; try { data = JSON.parse(response); } catch (e) { console.error('Failed to parse response JSON:', e); return; } let exchangecurrencyHTML = ''; if (data.message) { if (data.message.length > 0) { data.message.forEach(function(exchange) { let exchange_base_url = 'https://markets.coinpedia.org'; let exchangeImageURL = exchange.exchange_image ? `https://image.coinpedia.org/app_uploads/markets/exchanges/${exchange.exchange_image}` : 'https://image.coinpedia.org/app_uploads/profile/default.png'; exchangecurrencyHTML += ` <div class="suggestion-item"> <a href="${exchange_base_url}/exchange/${exchange.exchange_slug}/" target="_blank"> <div class="result-image" style="background-image: url('${exchangeImageURL}')"></div> <h6>${highlightText(exchange.exchange_name, query)}</h6> </a> </div> `; }); jQuery('#markets-exchange-suggestions').html(exchangecurrencyHTML); jQuery('.view_exchange').show(); jQuery('#markets-exchange-suggestions-mb').html(exchangecurrencyHTML); jQuery('.view_exchange_mb').show(); } else { jQuery('#markets-exchange-suggestions').html('<div class="not_found_data">No market exchanges found.</div>'); jQuery('.view_exchange').hide(); jQuery('#markets-exchange-suggestions-mb').html('<div class="not_found_data">No market exchanges found.</div>'); jQuery('.view_exchange_mb').hide(); } } else { console.error('Unexpected data format:', data); } }, error: function() { jQuery('.loader').hide(); console.error('Failed to fetch data.'); } }); } jQuery(document).ready(function($) { $('.tab-item').on('click', function() { var tabId = $(this).data('tab'); $('.tab-item').removeClass('active'); $(this).addClass('active'); $('.tab-content').removeClass('active'); $('#' + tabId).addClass('active'); }); $(document).click(function(event) { if (!$(event.target).closest('.custom-search-container').length) { $('.hide-suggestions-tabs').hide(); } }); });</script> </li><li><div class="top-menu-secondary"> <!--<div class="mobile-menu-ad"> <a href="https://bit.ly/3u1hmoc" target="_blank"><img src="https://image.coinpedia.org/wp-content/uploads/2024/03/22125636/logo.png" alt="Buy $BOON" width="20" height="20"/> 200% Bonus</a></div> --><div class="dropdown connect_wallet_header "> <button type="button" class="btn btn-primary openLoginModal" data-toggle="modal" data-target="#loginModal"> <img src="https://image.coinpedia.org/static/common/auth.svg" width="16" height="16" alt="connect-wallet" class="connect_wallet_icon" /> Login </button> </button></div></div></li></ul> <!-- /************ Mobile menu ad ***************************** */ --> <!-- /************ Mobile menu ad ***************************** */ --><ul class="mobile-menus-list show-in-tablet"><li id="notification-icon-mobile" class="mobile-view-notify"> <span class="countunseen-mobile"></span> <img src="https://image.coinpedia.org/static/common/bell.svg" alt="notification" width="14" height="14"></li><li class="select-currency-mobile"> <span id="currency-image-mobile"></span></li> <!--<li class="top-menu-advertise"> <a href="https://bit.ly/3yUbrnA" target="_blank"><div> <img src="https://image.coinpedia.org/wp-content/uploads/2024/10/28103822/stake-logo-white.png" alt="expo event" width="24" height="24" /></div> </a></li> --></ul> <!-- /************ Mobile menu ad ***************************** */ --> <!-- /************ Mobile menu ad ***************************** */ --></div> <!--------------------- Notification api integartion starts ----------------------><div id="notification-block" class="notification-block hidden"><div class="notification-body"><ul><li class="notication_without_login"><h4>Log In to View Notifications.</h4><p>Log in to access your notifications and stay updated. If you鈥檙e not a member yet, Sign Up to get started!</p></li></ul> <script>document.addEventListener('DOMContentLoaded', function() { const notificationIcon = document.getElementById('notification-icon'); const notificationIconMobile = document.getElementById('notification-icon-mobile'); const notificationBlock = document.getElementById('notification-block'); const hide_notification_label = document.querySelector('.countunseen'); const hide_notification_label_mobile = document.querySelector('.countunseen-mobile'); // Toggle notification block when icon is clicked function toggleNotificationMobileDesktop(event) { event.stopPropagation(); // Prevents the document click event from firing immediately if (notificationBlock.classList.contains('show')) { notificationBlock.classList.remove('show'); notificationBlock.classList.add('hidden'); } else { notificationBlock.classList.remove('hidden'); notificationBlock.classList.add('show'); // Call the API using AJAX jQuery.ajax({ url: 'https://coinpedia.org/wp-admin/admin-ajax.php', type: 'GET', data: { action: 'update_notify_view' }, success: function(response) { if(response.success) { hide_notification_label.style.display = 'none'; hide_notification_label_mobile.style.display = 'none'; } else { console.error('Error updating notification view:', response.data.error); } }, error: function(xhr, status, error) { console.error('AJAX error:', status, error); } }); } } if (notificationIcon) { notificationIcon.addEventListener('click', toggleNotificationMobileDesktop); } if (notificationIconMobile) { notificationIconMobile.addEventListener('click', toggleNotificationMobileDesktop); } // Close notification block if clicking anywhere outside document.addEventListener('click', function(event) { if (!notificationBlock.contains(event.target) && !notificationIcon.contains(event.target)) { if (notificationBlock.classList.contains('show')) { notificationBlock.classList.remove('show'); notificationBlock.classList.add('hidden'); } } }); });</script> </div></div> <!---------------------- Notification api integartion Ends -------------------- --></div></div></div><!-- .logo-wrapper /--></div><!-- .tie-row /--></div><!-- .container /--><div class="main-nav-wrapper"><nav id="main-nav" data-skin="search-in-main-nav" class="main-nav header-nav live-search-parent menu-style-default menu-style-solid-bg" aria-label="Primary Navigation"><div class="container"><div class="main-menu-wrapper"><div id="menu-components-wrap"><div class="main-menu main-menu-wrap"><div id="main-nav-menu" class="main-menu header-menu"><ul id="menu-menu-1" class="menu"><li id="menu-item-175007" class="hide-portfolio-desktop menu-item menu-item-type-custom menu-item-object-custom menu-item-175007"><a href="https://markets.coinpedia.org/portfolio/"><span class="menu-image"><img src="https://image.coinpedia.org/static/common/portfolio.svg" alt="portfolio"/>Portfolio</span></a></li><li id="menu-item-56269" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-56269"><a href="https://coinpedia.org/"><span class="menu-image"><img src="https://image.coinpedia.org/static/common/home.svg" width="26" height="26" alt="menu-images">Home</span></a></li><li id="menu-item-42741" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-42741"><a href="https://coinpedia.org/news/"><span class="menu-image"><img src="https://image.coinpedia.org/static/common/news-mb.svg" width="26" height="26" alt="menu-images">News</span></a></li><li id="menu-item-96448" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-96448"><a href="https://coinpedia.org/information/"><span class="menu-image"><img src="https://image.coinpedia.org/static/common/information.svg" width="26" height="26" alt="menu-images">Information</span></a><ul class="sub-menu menu-sub-content"><li id="menu-item-211851" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-211851"><a href="https://coinpedia.org/research-report/">Research Report</a></li><li id="menu-item-96452" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-96452"><a href="https://coinpedia.org/press-release/">Press Release</a></li><li id="menu-item-96453" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-96453"><a href="https://coinpedia.org/guest-post/">Guest Post</a></li><li id="menu-item-111584" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-111584"><a href="https://coinpedia.org/sponsored/">Sponsored</a></li><li id="menu-item-96446" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-96446"><a href="https://coinpedia.org/cryptocurrency-regulation/">Cryptocurrency regulation</a></li></ul></li><li id="menu-item-96427" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-96427"><a href="#"><span class="menu-image"><img src="https://image.coinpedia.org/static/common/mb-markets.svg" width="26" height="26" alt="menu-images">Markets</span></a><ul class="sub-menu menu-sub-content"><li id="menu-item-96428" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-96428"><a href="https://markets.coinpedia.org/">Live Market</a></li><li id="menu-item-96429" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-96429"><a href="https://coinpedia.org/price-analysis/">Price Analysis</a></li><li id="menu-item-96430" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-96430"><a href="https://coinpedia.org/price-prediction/">Cryptocurrency Price Prediction</a></li><li id="menu-item-111260" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-111260"><a href="https://markets.coinpedia.org/launchpad/">Launchpad</a></li><li id="menu-item-117765" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-117765"><a href="https://markets.coinpedia.org/airdrops/">Airdrops</a></li></ul></li><li id="menu-item-102031" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-102031"><a href="#"><span class="menu-image"><img src="https://image.coinpedia.org/static/common/review.svg" width="26" height="26" alt="menu-images">Product Reviews</span></a><ul class="sub-menu menu-sub-content"><li id="menu-item-96432" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-96432"><a href="https://coinpedia.org/exchange/">Centralised Exchanges</a></li><li id="menu-item-96433" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-96433"><a href="https://coinpedia.org/decentralized-exchange/">Decentralised Exchanges</a></li><li id="menu-item-96434" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-96434"><a href="https://coinpedia.org/crypto-wallet/">Cryptocurrency Wallets</a></li><li id="menu-item-96437" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-96437"><a href="https://coinpedia.org/crypto-tracking-tools/">Crypto Tracking Tools</a></li><li id="menu-item-96439" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-96439"><a href="https://coinpedia.org/earning-site/">Earning sites</a></li></ul></li><li id="menu-item-96440" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-96440"><a><span class="menu-image"><img src="https://image.coinpedia.org/static/common/academy.svg" width="26" height="26" alt="menu-images">Academy</span></a><ul class="sub-menu menu-sub-content"><li id="menu-item-103205" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-103205"><a href="https://coinpedia.org/beginners-guide/">Beginners Guide</a></li><li id="menu-item-103206" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-103206"><a href="https://coinpedia.org/traders/">Traders Guide</a></li><li id="menu-item-328553" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-328553"><a href="https://coinpedia.org/blockchain-developers/">Blockchain Developers</a></li><li id="menu-item-228200" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-228200"><a href="https://coinpedia.org/checklist/">Checklist</a></li><li id="menu-item-228208" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-228208"><a href="https://coinpedia.org/contest/">Contest</a></li></ul></li><li id="menu-item-111261" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-111261"><a href="#"><span class="menu-image"><img src="https://image.coinpedia.org/static/common/find.svg" width="26" height="26" alt="menu-images">Find</span></a><ul class="sub-menu menu-sub-content"><li id="menu-item-111262" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-111262"><a href="https://app.coinpedia.org/companies/">Companies</a></li><li id="menu-item-115978" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-115978"><a href="https://app.coinpedia.org/partners">Partners</a></li><li id="menu-item-128818" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-128818"><a href="https://events.coinpedia.org/">Events</a></li><li id="menu-item-220562" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-220562"><a href="https://app.coinpedia.org/professionals/">Professionals</a></li></ul></li><li id="menu-item-102170" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-102170"><a href="#"><span class="menu-image"><img src="https://image.coinpedia.org/static/common/contact.svg" width="26" height="26" alt="menu-images">Contact</span></a><ul class="sub-menu menu-sub-content"><li id="menu-item-55994" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-55994"><a href="https://coinpedia.org/write-news-with-us/">Submit Guest Post</a></li><li id="menu-item-48480" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-48480"><a href="https://coinpedia.org/contact-us/">Submit Query</a></li><li id="menu-item-30340" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-30340"><a href="https://coinpedia.org/submit-your-press-report/">Submit PR</a></li><li id="menu-item-83638" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-83638"><a href="https://coinpedia.org/advertising/">Advertise</a></li></ul></li></ul></div></div><!-- .main-menu /--><ul class="components"><li class="random-post-icon menu-item custom-menu-link"> <a href="/$%7beventURL%7d/?random-post=1" class="random-post" title="Random Article" rel="nofollow"> <span class="tie-icon-random" aria-hidden="true"></span> <span class="screen-reader-text">Random Article</span> </a></li><div class="desktop_portfolio_btn"> <a href="https://markets.coinpedia.org/portfolio/"> <button> <img class="growth_icon" src="https://image.coinpedia.org/static/common/track-portfolio.svg" alt="line chart" width="18" height="18"> <span>Track Your Portfolio</span> </button> </a></div> <!-- /************ Mobile menu ad ***************************** */ --> <!--<div class="top-menu-advertise"> <a href="https://bit.ly/3yUbrnA" target="_blank"> <button> <img src="https://image.coinpedia.org/static/common/expo-events-menu.png" alt="expo event" width="20" height="20" /> 200% Bonus </button> </a></div> --> <!-- /************ Mobile menu ad ***************************** */ --> <!--<li class="skin-icon menu-item custom-menu-link"> <a href="#" class="change-skin" title="Switch skin"> <span class="tie-icon-moon change-skin-icon" aria-hidden="true"></span> <span class="screen-reader-text">Switch skin</span> </a></li> --> <!--<li class="search-bar menu-item custom-menu-link" aria-label="Search"><form method="get" id="search" action="https://coinpedia.org/"> <input id="search-input" class="is-ajax-search" inputmode="search" type="text" name="s" title="Search for" placeholder="Search for" /> <button id="search-submit" type="submit"> <span class="tie-icon-search tie-search-icon" aria-hidden="true"></span> <span class="screen-reader-text">Search for</span> </button></form></li> --></ul><!-- Components --></div><!-- #menu-components-wrap /--></div><!-- .main-menu-wrapper /--></div><!-- .container /--></nav><!-- #main-nav /--></div><!-- .main-nav-wrapper /--></header> <script type="text/javascript">try{if("undefined"!=typeof localStorage){var header,mnIsDark=!1,tnIsDark=!1;(header=document.getElementById("theme-header"))&&((header=header.classList).contains("main-nav-default-dark")&&(mnIsDark=!0),header.contains("top-nav-default-dark")&&(tnIsDark=!0),"dark"==tieSkin?(header.add("main-nav-dark","top-nav-dark"),header.remove("main-nav-light","top-nav-light")):"light"==tieSkin&&(mnIsDark||(header.remove("main-nav-dark"),header.add("main-nav-light")),tnIsDark||(header.remove("top-nav-dark"),header.add("top-nav-light"))))}}catch(a){console.log(a)}</script> <div id="content" class="site-content container"><div id="main-content-row" class="tie-row main-content-row"><div class="main-content tie-col-md-12" role="main"><div class="container-404"><h2>404 :(</h2><h3>Oops! That page can’t be found.</h3><h4>It seems we can’t find what you’re looking for. Perhaps searching can help.</h4><div id="content-404"><form role="search" method="get" class="search-form" action="https://coinpedia.org/"> <label> <span class="screen-reader-text">Search for:</span> <input type="search" class="search-field" placeholder="Search …" value="" name="s" /> </label> <input type="submit" class="search-submit" value="Search" /></form></div><!-- #content-404 /--></div><!-- .container-404 /--></div><!-- .main-content /--></div><!-- .main-content-row /--></div><!-- #content /--><footer id="footer" class="site-footer dark-widgetized-area"> <script>jQuery(document).ready(function($) { var tableOfContentsItems = $('.hierarchical-headings ul li'); var lastActiveItem = null; // Add click event handler to each table of contents item tableOfContentsItems.on('click', function(e) { e.preventDefault(); var target = $(this).find('a').data('name'); var targetElement = $('#' + target); $('html, body').animate({ scrollTop: targetElement.offset().top }, 100, function() { updateActiveItem(target); }); }); // Scroll event listener $(window).on('scroll', function() { var scrollPosition = $(window).scrollTop(); tableOfContentsItems.each(function() { var target = $(this).find('a').data('name'); var targetElement = $('#' + target); var targetOffset = targetElement.offset().top; var targetHeight = targetElement.outerHeight(); if (scrollPosition >= targetOffset && scrollPosition < targetOffset + targetHeight) { updateActiveItem(target); return false; // Exit the loop early if active item is found } }); if ($(window).scrollTop() + $(window).height() > $(document).height() - 150) { $(".academy-sticky-sidebar").hide(); } else { $(".academy-sticky-sidebar").show(); } }); // Function to update active item function updateActiveItem(target) { if (lastActiveItem) { lastActiveItem.removeClass('active'); } $('[data-name="' + target + '"]').addClass('active'); lastActiveItem = $('[data-name="' + target + '"]'); } }); //////// sidebar sticky ///// jQuery(document).ready(function($) { var sidebar = $('.academy-sticky-sidebar'); if (sidebar.length) { var sidebarOffsetTop = sidebar.offset().top; $(window).on('scroll', function() { var scrollTop = $(window).scrollTop(); if (scrollTop > sidebarOffsetTop) { sidebar.addClass('sticky'); } else { sidebar.removeClass('sticky'); } }); } });</script> <!-- --><div id="footer-widgets-container"><div class="container"><div class="footer-widget-area "><div class="tie-row"><div class="tie-col-sm-4 normal-side"><div id="stream-item-widget-117" class="container-wrapper widget stream-item-widget"><div class="stream-item-widget-content"><a href="https://coinpedia.org/"><img class="widget-stream-image" src="https://image.coinpedia.org/static/common/coinpedia-logo.svg" width="336" height="280" alt="cp-logo"></a></div><div class="clearfix"></div></div><!-- .widget /--></div><!-- .tie-col /--><div class="tie-col-sm-4 normal-side"><div id="author-bio-widget-5" class="container-wrapper widget aboutme-widget"><div class="widget-title the-global-title"><div class="the-subtitle">Cp-Organization<span class="widget-title-icon tie-icon"></span></div></div><div class="about-author about-content-wrapper"><div class="aboutme-widget-content">Coinpedia - Trusted Crypto Agency for News, Information, Exchange, PR, Blockchain Events, Crypto Wallet and Else related to Decentralized World.</div><div class="clearfix"></div></div><!-- .about-widget-content --><div class="clearfix"></div></div><!-- .widget /--><div id="custom_html-120" class="widget_text container-wrapper widget widget_custom_html"><div class="textwidget custom-html-widget"><style>.dcma-link{ /* padding-left: 14px; */ } @media (max-width: 767px){ .dcma-link{ text-align:center; } }</style><div class="dcma-link"> <a href="//www.dmca.com/Protection/Status.aspx?ID=c32974f1-5754-4dc7-8646-ff88d4b0ee60" title="DMCA.com Protection Status" class="dmca-badge"> <img src ="https://images.dmca.com/Badges/dmca_protected_sml_120n.png?ID=c32974f1-5754-4dc7-8646-ff88d4b0ee60" alt="DMCA.com Protection Status" width="121" height="24"/></a></div> <script src="https://images.dmca.com/Badges/DMCABadgeHelper.min.js"></script></div><div class="clearfix"></div></div><!-- .widget /--></div><!-- .tie-col /--><div class="tie-col-sm-4 normal-side"><div id="custom_html-119" class="widget_text container-wrapper widget widget_custom_html"><div class="textwidget custom-html-widget"><div class="widget-title the-global-title"><div class="the-subtitle">Follow Us<span class="widget-title-icon tie-icon"></span></div></div><ul class="social-icons"><li> <a class="rss-social-icon" rel="external noopener nofollow" target="_blank" href="https://coinpedia.org/feed/"> <img src="https://image.coinpedia.org/static/common/rss.svg" alt="rss" title="rss" width="28" height="28" /> </a></li><li> <a class="facebook-social-icon" rel="external noopener nofollow" target="_blank" href="https://news.google.com/publications/CAAiEG7KpurHdTYeCwkkCPP48SgqFAgKIhBuyqbqx3U2HgsJJAjz-PEo?hl=en-IN&gl=IN&ceid=IN%3Aen"> <img src="https://image.coinpedia.org/static/common/google-news.svg" alt="Google news" title="Google news" width="28" height="28"/> </a></li><li> <a class="facebook-social-icon" rel="external noopener nofollow" target="_blank" href="https://www.facebook.com/Coinpedia.org/"> <img src="https://image.coinpedia.org/static/common/facebook.svg" alt="Facebook" title="Facebook" width="28" height="28"/> </a></li><li> <a class="twitter-social-icon" rel="external noopener nofollow" target="_blank" href="https://twitter.com/Coinpedianews"> <img src="https://image.coinpedia.org/static/common/twitter.svg" alt="Twitter" title="Twitter" width="28" height="28" /> </a></li><li> <a class="pinterest-social-icon" rel="external noopener nofollow" target="_blank" href="https://in.pinterest.com/CoinpediaNews/"> <img src="https://image.coinpedia.org/static/common/pintrest.svg" alt="Pinterest" title="Pinterest" width="28" height="28" /> </a></li><li> <a class="linkedin-social-icon" rel="external noopener nofollow" target="_blank" href="https://in.linkedin.com/company/coinpedia"> <img src="https://image.coinpedia.org/static/common/linkedin.svg" alt="Linkedin" title="Linkedin" width="28" height="28" /> </a></li><li> <a class="instagram-social-icon" rel="external noopener nofollow" target="_blank" href="https://www.instagram.com/coinpedianews/"> <img src="https://image.coinpedia.org/static/common/instagram.svg" alt="Instagram" title="Instagram" width="28" height="28" /> </a></li><li> <a class="medium-social-icon" rel="external noopener nofollow" target="_blank" href="https://coinpediasfintechnews.medium.com/"> <img src="https://image.coinpedia.org/static/common/medium.svg" alt="Medium" title="Medium" width="28" height="28" /> </a></li><li> <a class="telegram-social-icon" rel="external noopener nofollow" target="_blank" href="https://t.me/CoinpediaMarket"> <img src="https://image.coinpedia.org/static/common/telegram.svg" alt="Telegram" title="Telegram" width="28" height="28" /> </a></li><li> <a class="telegram-social-icon" rel="external noopener nofollow" target="_blank" href="https://steemit.com/@coinpediacrypto"> <img src="https://image.coinpedia.org/static/common/steemit.svg" alt="Steemit" title="Steemit" width="28" height="28" /> </a></li><li> <a class="telegram-social-icon" rel="external noopener nofollow" target="_blank" href="https://www.quora.com/profile/Coinpedia-Fintech-News"> <img src="https://image.coinpedia.org/static/common/quora.svg" alt="Quora" title="Quora" width="28" height="28" /> </a></li><li> <a class="telegram-social-icon" rel="external noopener nofollow" target="_blank" href="https://coinpedian.substack.com/"> <img src="https://image.coinpedia.org/static/common/substack.svg" alt="Substack" title="Substack" width="28" height="28" /> </a></li><li> <a class="telegram-social-icon" rel="external noopener nofollow" target="_blank" href="https://gettr.com/user/coinpediafintechnews"> <img src="https://image.coinpedia.org/static/common/gettr.svg" alt="Gettr" title="Gettr" width="28" height="28" /> </a></li><li> <a class="telegram-social-icon" rel="external noopener nofollow" target="_blank" href="https://coinmarketcap.com/community/profile/CoinpediaNews/"> <img src="https://image.coinpedia.org/wp-content/uploads/2024/05/20155619/CMC.webp" alt="Coinmarketcap" title="Coinmarketcap" width="28" height="28"> </a></li></ul></div><div class="clearfix"></div></div><!-- .widget /--></div><!-- .tie-col /--></div><!-- .tie-row /--></div><!-- .footer-widget-area /--></div><!-- .container /--></div><!-- #Footer-widgets-container /--><div id="site-info" class="site-info site-info-layout-2"><div class="container"><div class="tie-row"><div class="tie-col-md-12"><div class="copyright-text copyright-text-first">© Copyright 2024, All Rights Reserved | <span style="color:red;" class="tie-icon-heart"></span> <a href="https://coinpedia.org/" target="_blank" >Coinpedia</a></div><div class="footer-menu"><ul id="menu-footer-menu" class="menu"><li id="menu-item-58566" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-58566"><a href="https://coinpedia.org/about-coinpedia/">About Us</a></li><li id="menu-item-83639" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-83639"><a href="https://coinpedia.org/advertising/">Advertise</a></li><li id="menu-item-111333" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-111333"><a target="_blank" href="https://app.coinpedia.org/partners/">Partners</a></li><li id="menu-item-58568" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-58568"><a href="https://coinpedia.org/authors/">Authors</a></li><li id="menu-item-58570" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-privacy-policy menu-item-58570"><a rel="privacy-policy" href="https://coinpedia.org/privacy-policy/">Privacy Policy</a></li><li id="menu-item-58571" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-58571"><a href="https://coinpedia.org/terms-and-conditions/">Terms and Conditions</a></li><li id="menu-item-58565" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-58565"><a href="https://coinpedia.org/editorial-policy/">Editorial Policy</a></li><li id="menu-item-111518" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-111518"><a target="_blank" href="https://app.coinpedia.org/feedback/">Feedback</a></li></ul></div><div class="footer-side-sticky" id="footer-side-sticky"> <button class="hide-stickyimage" onclick="hideimage()">×</button> <a href="https://bit.ly/4iExEYR" target="_blank" rel="nofollow noopener"> <img src="https://image.coinpedia.org/wp-content/uploads/2024/12/20175200/sticky-images.png" class="side-sticky-ad" alt="sticky-ad" width="100" height="100"> </a></div><style>.footer-side-sticky { left: 11px; z-index: 999; position: fixed; bottom: 12px; } .footer-side-sticky span { font-size: 26px; color: #000; } .footer-side-sticky img{ border-radius: 50px; } @media(max-width:767px) { .side-sticky-ad { width: 80px; } }</style> <script>function hideimage() { document.getElementById("footer-side-sticky").style.display = "none"; }</script> </div><!-- .tie-col /--></div><!-- .tie-row /--></div><!-- .container /--><div id="loadingOverlay" style="display: none;"><div class="loading-spinner"></div></div> <script>document.addEventListener("DOMContentLoaded", function() { var articleLinks = document.querySelectorAll("a[href]"); function showLoader() { document.getElementById('loadingOverlay').style.display = 'flex'; } function hideLoader() { document.getElementById('loadingOverlay').style.display = 'none'; } articleLinks.forEach(function(link) { link.addEventListener('click', function(event) { var currentDomain = window.location.hostname; var linkDomain = new URL(link.href).hostname; var linkHref = link.getAttribute('href'); if (linkDomain === currentDomain && linkHref && linkHref.charAt(0) !== '#') { if (link.getAttribute('target') === '_blank' || event.ctrlKey || event.metaKey || event.shiftKey || event.button === 1) { return; } showLoader(); } }); }); function attachIframeLinkListeners(iframe) { try { var iframeDocument = iframe.contentDocument || iframe.contentWindow.document; var iframeLinks = iframeDocument.querySelectorAll("a[href]"); iframeLinks.forEach(function(link) { link.addEventListener('click', function(event) { var currentDomain = window.location.hostname; var linkDomain = new URL(link.href).hostname; var linkHref = link.getAttribute('href'); if (linkDomain === currentDomain && linkHref && linkHref.charAt(0) !== '#') { if (link.getAttribute('target') === '_blank' || event.ctrlKey || event.metaKey || event.shiftKey || event.button === 1) { return; } showLoader(); } }); }); } catch (e) { console.log('Unable to access iframe content due to cross-origin restrictions.', e); } } var iframe = document.querySelector('.tie-infinte-post-iframe'); if (iframe) { iframe.addEventListener('load', function() { attachIframeLinkListeners(iframe); }); } window.addEventListener('load', hideLoader); window.addEventListener('pageshow', function(event) { hideLoader(); }); });</script> </div><!-- #site-info /--></footer><!-- #footer /--> <a id="go-to-top" class="go-to-top-button" href="#go-to-tie-body"> <span class="tie-icon-angle-up"></span> <span class="screen-reader-text">Back to top button</span> </a></div><!-- #tie-wrapper /--><aside class=" side-aside normal-side dark-skin dark-widgetized-area appear-from-right" aria-label="Secondary Sidebar" style="visibility: hidden;"><div data-height="100%" class="side-aside-wrapper has-custom-scroll"><div class="tie-row"><div class="tie-col-xs-6"> <a href="#" class="close-side-aside remove big-btn light-btn"> <span class="screen-reader-text">Close</span> </a><!-- .close-side-aside /--></div><div class="tie-col-xs-6"> <!-- Start custom menu design--><ul class="mobile-dark-light"><li class="search-modal-mb"><img src="https://image.coinpedia.org/static/common/search_top_menu.svg" alt="save-image" width="18" height="18"></li><li class="openLoginModal"><img src="https://image.coinpedia.org/static/common/watchlist.svg" alt="save-image" width="18" height="18"></li> <!--<li class="darkModeToggle"> <img src="https://image.coinpedia.org/static/common/dark_mode.svg" alt="light-sun" class="dark-lightimage" width="16" height="18"></li> --></ul> <!-- End custom menu design--></div></div><div id="mobile-container"> <!-- custom create account menu design --><div class="mb-user-account openLoginModalMobile"> <img src="https://image.coinpedia.org/static/common/mobile-sidemenu.svg" alt="menu-wallet" width="35" height="35" /> <span>Login / Create account</span> <!--<ul class="mb-collapse-content">--> <!--<li><a class="" href="https://app.coinpedia.org/login/"><img src="https://image.coinpedia.org/wp-content/uploads/2022/06/21160226/mb-manual-login.svg" width="23" height="23" alt="manual-login" /><span>Login</span></a></li>--> <!--<li><a class="" href="https://app.coinpedia.org/register/"><img src="https://image.coinpedia.org/wp-content/uploads/2022/06/21160225/mb-user-profile.svg" width="23" height="23" alt="Manage User Profile" /><span>Register</span></a></li>--> <!--</ul> --></div> <!-- end custom create account menu --><div id="mobile-menu" class="hide-menu-icons"></div><!-- #mobile-menu /--></div><!-- #mobile-container /--></div><!-- .side-aside-wrapper /--></aside><!-- .side-aside /--></div><!-- #tie-container /--></div><!-- .background-overlay /--><div class="modal header-popup" id="loginModal"><div class="modal-dialog modal-dialog-right modal-dialog-zoom event-login-popup"><div class="modal-content modal_registration_success"></div></div></div><div class="modal header-popup" id="disabledAccount"><div class="modal-dialog modal-dialog-right modal-dialog-zoom modal-sm modal_small"><div class="modal-content ticket_event_popup create_event_modal_box"></div></div></div> <script>/********************** Login design **************************** */ function generateLoginModalContent() { return ` <div class="modal-body" id="login-reached"> <img src="https://image.coinpedia.org/static/common/logo-auth-modal.svg" width="198" height="32" alt="logo" class="modal-logo-img hide-in-dark" /> <img src="https://image.coinpedia.org/static/common/logo-auth-modal-dark.svg" width="198" height="32" alt="logo" class="modal-logo-img show-in-dark" /> <button type="button" class="close" onclick="closeLoginModal()"> <img src="https://image.coinpedia.org/static/common/close-header-modal.svg" alt="pop-cancel" title="pop-cancel" class="close-popup lightmode_image hide-in-dark" /> <img src="https://image.coinpedia.org/static/common/close-dark.svg" alt="pop-cancel" title="pop-cancel" class="close-popup lightmode_image show-in-dark" /> </button> <div class=""> <div class="col-md-11 mx-auto"> <div class=""> <div class="login_account_body pb-0"> <h4 class="modalsubtitle">Join us today - Create your account to explore, connect, and thrive!</h4> <div class="login-popup-error"></div> <form id="loginForm"> <div class="form-group"> <label>Email</label> <div class="input-group"> <input type="text" class="form-control" placeholder="Enter Your Email ID" id="mail" name="email" value=""> </div> </div> <div class="error-message login-error-msg"></div> <div class="button_logged_in"> <span class="text_content">Keep me logged in</span> <label class="switch"> <input type="checkbox" id="checkboxId"> <span class="slider"></span> </label> </div> <button type="submit" class="btn btn-login btnLoginModal disabled-button"> <div class="login-loader"></div> Explore</button> </form> <div class="login_with_social"> <h5 class="hr-border"><span>OR</span></h5> <div class="social_media_icons_hover"> <div class="social-links"> <div class="social-btn flex-center" id="google-login-button" onclick="googlesignin()" ><img src="https://image.coinpedia.org/static/common/google.svg" alt="Google" title="Google" width="20" height="20"> </div> <div class="social-btn flex-center" id="metamask_icon" onclick="metamasksignin()"><img src="https://image.coinpedia.org/static/common/metamask.svg" alt="Metamask" title="Metamask" width="25" height="25"> </div> <div class="social-btn flex-center" id="apple_icon" onclick="applesignin()"><img src="https://image.coinpedia.org/static/common/apple.svg" alt="Apple" title="Apple" width="20" height="20"> </div> </div> </div> </div> </div> </div> </div> </div> </div> `; } /*********************** disable account design*****************************************/ function generateDisableModalContent() { return ` <div class="ticket_updated_popup"> <div class="tickets_cancel_button"> <img src="https://image.coinpedia.org/static/common/logo-auth-modal.svg" width="198" height="32" alt="logo" class="modal-logo-img hide-in-dark" /> <img src="https://image.coinpedia.org/static/common/logo-auth-modal-dark.svg" width="198" height="32" alt="logo" class="modal-logo-img show-in-dark" /> <button type="button" class="close" data-dismiss="modal" onclick="disabledAccountClose()"> <img src="https://image.coinpedia.org/static/common/close-header-modal.svg" alt="Cancel" title="Cancel" class="hide-in-dark"/> <img src="https://image.coinpedia.org/static/common/close-dark.svg" alt="Cancel" title="Cancel" class="show-in-dark" /> </button> </div> <div class="ticket_updated_popup_img"> <img src="https://image.coinpedia.org/static/common/system-regular-error.gif" alt="Success" title="Success" /> </div> </div> <div class="modal-body"> <h4 class="modal-title mb-2">OOPS!</h4> <h5 id="showDisableDeleteMsg"> You do not have permission to login. please contact administrator for more details. (email: info@coinpedia.org) </h5> </div> `; } /**************************** OTP design ******************************************/ function generateOTPModalContent() { return ` <div class="modal-body" id="otp-reached"> <img src="https://image.coinpedia.org/static/common/logo-auth-modal.svg" width="198" height="32" alt="logo" class="modal-logo-img hide-in-dark" /> <img src="https://image.coinpedia.org/static/common/logo-auth-modal-dark.svg" width="198" height="32" alt="logo" class="modal-logo-img show-in-dark" /> <button type="button" class="close" style="z-index: 999999; position: relative;"> <img src="https://image.coinpedia.org/static/common/close-header-modal.svg" alt="pop-cancel" title="pop-cancel" class="close-popup lightmode_image hide-in-dark"> <img src="https://image.coinpedia.org/static/common/close-dark.svg" alt="Cancel" title="Cancel" class="lose-popup lightmode_image show-in-dark" /> </button> <div class="col-md-12 otp-block-center"> <div class="row"> <div class="col-md-12 mx-auto"> <div class="create_account"> <div class="account_header"> <h3 class="modalsubtitle">Verify your email </h3> <p>A code has been sent to <strong><span id="getEmail"></span></strong>. Enter it below to verify your email.<span id="timeOutContent">The code is valid for</span> <span id="otpTimer"></span> </p> </div> <div class="otp_section"> <div> <div> <div class="manual_login otp_verify_block"> <div class="form-group"><label>Enter OTP </label> <input type="hidden" id="getToken" value="" /> <input type="hidden" id="getKeepMeStatus" value="" /> <input type="hidden" id="getRegisterStatus" value="" /> <div class="otp-input-lists"> <input type="number" maxlength="1" id="otp1" class="otp-input" /> <input type="number" maxlength="1" id="otp2" class="otp-input" /> <input type="number" maxlength="1" id="otp3" class="otp-input" /> <input type="number" maxlength="1" id="otp4" class="otp-input" /> <input type="number" maxlength="1" id="otp4" class="otp-input" /> <input type="number" maxlength="1" id="otp4" class="otp-input" /> </div> <span class="verifyOTPHidden" style="display:none">Resend OTP in Few seconds <span class="resentOTP">Resend OTP</span></span> <p class="error-message otp-error-message"></p> </div> <div class="col-md-8 mx-auto"> <button class="btn-login verifyOTP" type="button" disabled><span class="verifyBtn">Verify</span></button> <div class="text-center mt-2 go-back"> Go back</div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> `; } /**************************** Register design ******************************************/ function generateRegisterModalContent() { return ` <div class="modal-body" id="register-reached"> <img src="https://image.coinpedia.org/static/common/logo-auth-modal.svg" width="198" height="32" alt="logo" class="modal-logo-img hide-in-dark" /> <img src="https://image.coinpedia.org/static/common/logo-auth-modal-dark.svg" width="198" height="32" alt="logo" class="modal-logo-img show-in-dark" /> <button type="button" class="close"> <img src="https://image.coinpedia.org/static/common/close-header-modal.svg" alt="pop-cancel" title="pop-cancel" class="close-popup lightmode_image hide-in-dark"> <img src="https://image.coinpedia.org/static/common/close-dark.svg" alt="pop-cancel" title="pop-cancel" class="close-popup lightmode_image show-in-dark"> </button> <div class="account_header"> <h3 class="modalsubtitle">Create CoinPedia Account </h3> <p>A Platform to over 1 million + Crypto and Blockchain enthusiasts in the world.</p> </div> <div class="manual_login"> <form id="registerCpForm"> <div class=""> <div class="row"> <div class="col-md-12 auth_second_step"> <div class="row metamaskmainblock"> <div class="col-md-12"> <div class="media metamast_connected connected_social_block"> <div class="media-body"> <input autocomplete="off" type="text" class="form-control" value="" id="metamaskBlock"> </div> <div class="media-right"> <img src="https://image.coinpedia.org/static/common/metamask.svg" alt="Metamask" title="Metamask" width="23" height="23"> </div> </div> </div> </div> <div class="row email_block_hide"> <div class="col-md-12"> <div class="media email_connected connected_social_block"> <div class="media-body"> <input autocomplete="off" type="text" class="form-control" value="" id="registerMail"> </div> <div class="media-right"><img src="https://image.coinpedia.org/static/common/at-email.svg" alt="Email" title="Email"></div> </div> </div> </div> <div class="row"> <div class="col-md-12"> <label class="field_label">Full Name<span>*</span></label> <div class=" form-custom form-custom-fullname"> <div class="form-group input_block_outline"> <div class="input-group"> <div class="input-group-append"> <!-- Custom Gender Dropdown --> <div class="gender-custom-dropdown"> <button type="button"> <span class="genderDropdownToggle"> <span id="genderSelect">Male</span> <img src="https://image.coinpedia.org/static/common/dropdown-down.svg" alt="dropdown" width="13" class="hide-in-dark" /> <img src=" https://image.coinpedia.org/static/common/reg-dropdown.svg" alt="dropdown" width="13" class="show-in-dark" /> </span> </button> <ul class="genderDropdownMenu hide"> <li data-value="1">Male</li> <li data-value="2">Female</li> <li data-value="3">Other</li> </ul> <input type="hidden" id="selectedGenderInput" name="gender" value="1" /> </div> </div> <input autocomplete="off" type="text" placeholder="Type your Full Name" class="form-control clearable" value="" id="fullName"> </div> </div> <p class="error-message register-error-message"></p> </div> </div> <div class="col-md-12"> <label class="field_label">User Name</label> <div class="username-field"> <div class="form-group"> <div class="input-group"> <input autocomplete="off" type="text" placeholder="Type your User Name" class="form-control clearable" value="" id="userName"> </div> </div> <p class="error-message register-username-error-message"></p> </div> </div> <div class="col-md-12" style="display:none" id="showEmailInput"> <label class="field_label">Email ID<span>*</span></label> <div class="default_form_group email-input-register"> <div class="form-group"> <input autocomplete="off" type="text" class="form-control" placeholder="Enter your Email ID" value="" id="walletEmailAdres"> </div> <p class="error-message register-email-error-message"></p> </div> </div> <div class="col-md-12" id="metamaskConnect"> <label class="field_label">Connect Wallet</label> <div class="default_form_group"> <div class="form-group connect_wallet_block"> <div class="input-group"> <p id="wallet-addres-label">Click here to connect Wallet</p> <p id="manuallyConnectwallet"></p> </div> </div> <p class="error-message" id="wallet_adress_exist"></p> </div> </div> <div class="col-md-12"> <label class="field_label">Mobile No</label> <div class="form-custom event_organiser_mobile_number mobile-fields-validation mb-2"> <div class="form-group input_block_outline mobile-number-field"> <div class="input-group"> <div class="input-group-append country_select" > <span class="input-group-text"> <img src="https://image.coinpedia.org/static/flags/in.png" class="country_image" alt="India" title="India" id="country_flag_img" width="28px" height="19px"> <span id="countryId">+91</span> <img src="https://image.coinpedia.org/static/common/dropdown-down.svg" class="country_caret_down lightmode_image hide-in-dark" alt="drop down" title="drop down" width="11px" height="6px"> <img src="https://image.coinpedia.org/static/common/reg-dropdown.svg" class="country_caret_down lightmode_image show-in-dark" alt="drop down" title="drop down" width="11px" height="6px"> </span> </div> <input autocomplete="off" type="number" class="form-control clearable" placeholder="Type your Mobile Number" value="" id="register_mobile_number"> </div> </div> <p class="error-message register-mobile-error-message"></p> </div> </div> </div> <div class="row"> <div class="col-md-12"> <label class="field_label">Referral ID</label> <div class="form-custom event_organiser_mobile_number mb-2"> <div class="form-group input_block_outline"> <div class="input-group"><input type="text" autocomplete="off" class="form-control clearable" placeholder="Any invitee Id ?" value="" id="referral_user_name"></div> </div> </div> </div> </div> <div class="row"> <div class="col-md-12 mt-3"><button type="submit" class="createAccount btn-login">Create Account</button></div> </div> </div> </div> </div> </form> </div> <div class="account_body_footer"> <p>By creating account with us, you clarify you have read and accepted the <a href="https://coinpedia.org/privacy-policy/" target="_blank"><span class="blue_links">Privacy policy</span></a> and <a href="https://coinpedia.org/terms-and-conditions/"><span class="blue_links">Terms & Conditions </span></a></p> </div> </div> `; } /********************** Register success modal ************************************888 */ function generateSuccessModalContent() { return ` <div id="registered-user"> <div class=" ticket_updated_popup "> <div class="ticket_updated_popup_img success_popup_img"> <img src="https://image.coinpedia.org/static/common/succsess-image.gif" width="60" height="60"> </div> </div> <div class="modal-body indi_popup_sucess"> <h2 class="modalsubtitle">Registration Successful ! </h2> <p>Hello <b id="successMsgUsername"></b>,Welcome to Coinpedia! Now, you can join contests, ace quizzes, read exclusive crypto insights, and unlock your potential in the cryptocurrency world with us.</p> <ul class="success-modal-btns"> <li> <a href="" id="continue_with_cp"><button class="primary-button">Continue With Coinpedia</button></a> </li> <li> <a href="https://app.coinpedia.org/profile/" target="_blank"> <button class="btn secondary-button" onclick="complete_profile_refresh()">Complete Your Profile</button></a> </li> </div> </div> </div> `; } jQuery(document).ready(function($) { $('#loginModal').modal({ show: false, backdrop: 'static' }); $("#loginModal .modal-content").click(function(event) { event.stopPropagation(); }); $('#disabledAccount').modal({ show: false, backdrop: 'static' }); $("#disabledAccount .modal-content").click(function(event) { event.stopPropagation(); }); function validateEmail() { var email_id = $('#mail').val(); var emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; var isValid = emailPattern.test(email_id); if (isValid) { $('.btnLoginModal').prop('disabled', false).removeClass('disabled-button'); } else { $('.btnLoginModal').prop('disabled', true).addClass('disabled-button'); } } $(document).on('click', '.openLoginModal', function() { $('#loginModal').removeClass('hide'); $('#registerModal').removeClass('hide'); $('#OTPPopModal').removeClass('hide'); $('#registered-success-modal').removeClass('hide'); $('#loginModal .modal-content').html(generateLoginModalContent()); $('#loginModal').modal('show'); $('#loginModal input[type="text"]').val(''); // $('.site.tie-container').removeClass('side-aside-open'); $('#mail').on('input', function() { validateEmail(); }); }); $(document).on('click', '.openLoginModalMobile', function(e) { $('#loginModal').removeClass('hide'); $('#registerModal').removeClass('hide'); $('#OTPPopModal').removeClass('hide'); $('#registered-success-modal').removeClass('hide'); $('#loginModal .modal-content').html(generateLoginModalContent()); $('#loginModal').modal('show'); $('#loginModal input[type="text"]').val(''); $('.site.tie-container').removeClass('side-aside-open'); $('#mail').on('input', function() { validateEmail(); }); e.preventDefault(); }); // $(document).on('click', '.closeModallogin', function() { // $('#loginModal').modal('hide'); // $('#loginModal input[type="text"]').val(''); // $('.login-popup-error').text(''); // }); // $(document).on('click', '#disabledAccount .close', function() { // $('#disabledAccount').modal('hide'); // $('.login-popup-error').text(''); // }); $(document).on('submit', '#loginForm', function(event) { event.preventDefault(); $('.login-popup-error').text(''); var email_id = $('#mail').val(); if (email_id === '') { $('.login-error-msg').text('The Email ID field is required.'); return; } var emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; if (!emailPattern.test(email_id)) { $('.login-error-msg').text('The Email ID field must contain a valid email'); return; } var keepme_status = $('#checkboxId').prop('checked') ? 2 : 1; var data = { email_id: email_id, keepme_status: keepme_status }; var requestLoginData = { action: 'handle_dynamic_api_request_with_headers', security: '9a9e767c12', endpoint: '/app/auth/login_with_email', data: data, }; jQuery('.btnLoginModal .login-loader').show(); $.ajax({ url: 'https://coinpedia.org/wp-admin/admin-ajax.php', type: 'POST', data: requestLoginData, beforeSend: function(xhr) { xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); }, success: function(response) { jQuery('.btnLoginModal .login-loader').hide(); try { response = response.data; if (response.status === false) { $('#loginModal').modal('hide'); $('#disabledAccount').modal('show'); $('#disabledAccount .modal-content').html(generateDisableModalContent()); $('#showDisableDeleteMsg').text(response.message.alert_message); } else if (response.message.registered_status === true) { $('#OTPPopModal .modal-content').html(generateOTPModalContent()); $('#loginModal').modal('hide'); $('#OTPPopModal').modal('show'); var logintoken = response.message.token; startOTPTimer(600); $('.otp_verify_block #getToken').val(logintoken); $('#OTPPopModal #getEmail').text(email_id); $('#OTPPopModal #getKeepMeStatus').val(keepme_status); $('#OTPPopModal #getRegisterStatus').val(response.message.registered_status); $('#OTPPopModal .otp-input').val(''); } else if (response.status === true) { $('#loginModal').modal('hide'); $('#registerModal').modal('show'); /***************** register modal appened*******************8 */ $('#registerModal .modal-content').html(generateRegisterModalContent()); /***************** register modal appened*******************8 */ $('.clearable').val(''); startOTPTimer(600); $('#registerModal #registerMail').val(email_id); $('#OTPPopModal #getEmail').text(email_id); $('#OTPPopModal #getKeepMeStatus').val(keepme_status); $('#OTPPopModal #getRegisterStatus').val(response.message.registered_status); $('#country_flag_img').attr('src', 'https://image.coinpedia.org/static/flags/in.png'); $('#countryId').text('+91'); $('#registerModal .email_block_hide').css('display', 'block'); $('#registerModal .metamaskmainblock').css('display', 'none'); $('#registerModal #metamaskConnect').css('display', 'block'); $('#registerModal #showEmailInput').css('display', 'none'); $('#manuallyConnectwallet').text(''); } else { console.log('Unexpected response:', response); } } catch (e) { console.error('Error parsing response:', e); } }, error: function(xhr, status, error) { console.error('Error:', error); } }); }); }); function closeLoginModal() { jQuery('#loginModal').removeClass('show').addClass('hide'); setTimeout(function() { jQuery('#loginModal').modal('hide'); jQuery('#loginModal input[type="text"]').val(''); jQuery('.login-popup-error').text(''); }, 500); } function disabledAccountClose() { jQuery('#disabledAccount').removeClass('show').addClass('hide'); setTimeout(function() { jQuery('#disabledAccount').modal('hide'); jQuery('.login-popup-error').text(''); }, 500); } function complete_profile_refresh(){ // console.log('test reload'); jQuery('#registered-success-modal').modal('hide'); } function startOTPTimer(duration) { // console.log(duration); var timerElement = jQuery('#otpTimer'); // console.log(timerElement, 'timerElement'); var timer = duration; var intervalId = setInterval(function() { var minutes = Math.floor(timer / 60); var seconds = timer % 60; minutes = minutes < 10 ? '0' + minutes : minutes; seconds = seconds < 10 ? '0' + seconds : seconds; timerElement.text(minutes + ':' + seconds); if (--timer < 0) { clearInterval(intervalId); timerElement.text(''); jQuery('#timeOutContent').text(''); jQuery('.verifyOTPHidden').show(); } }, 1000); }</script> <script src="https://apis.google.com/js/platform.js"></script> <script>function googlesignin() { // console.log('google sign'); gapi.load('auth2', function() { var auth2 = gapi.auth2.init({ client_id: '120903672784-tgvt3apka33k6jj3s5c0htg84g23ej07.apps.googleusercontent.com' // Replace with your client ID }); // console.log('auth2auth2', auth2); auth2.signIn().then(onSignIn).catch(onSignInError); }); } function onSignIn(googleUser) { // console.log(googleUser, 'googleUsergoogleUser'); var google_token_id = googleUser.getAuthResponse().id_token; var profile = googleUser.getBasicProfile(); var user_email_id = profile.getEmail(); var user_full_name = profile.getName(); var google_user_name = profile.getGivenName(); var google_id = profile.getId(); var profile_image_url = profile.getImageUrl(); register_with_google_function(user_email_id, user_full_name, google_id, google_user_name, profile_image_url) } function onSignInError(error) { console.error("Error signing in: ", error); } // initGoogleSignIn();</script> <!-- /************** meta mask ******************** */ --> <script src="https://cdn.jsdelivr.net/npm/web3@1.3.6/dist/web3.min.js"></script> <script>async function metamasksignin() { if (window.ethereum) { window.web3 = new Web3(window.ethereum); try { const accounts = await window.ethereum.request({ method: 'eth_requestAccounts' }); const walletAddress = accounts[0]; // console.log(walletAddress, 'wallet addres'); metamaskApiFunction(walletAddress); } catch (error) { console.error("Metamask connection error:", error); } } else { console.error("Metamask not installed"); jQuery('.login-popup-error').text("Connection Error, You are connected to an unsupported network."); } } // window.ethereum.on('accountsChanged', function (accounts) { // // Handle account changes here // console.log("Metamask account changed:", accounts); // }); function metamaskApiFunction(walletAddress) { // console.log(walletAddress, 'walletAddressTokenwalletAddressToken'); var permalink = window.location.href; var walletRegisterParameter = { wallet_address: walletAddress, domain_row_id: '5', page: permalink, isMetamaskAuthentication: true }; var requestMetamskData = { action: 'handle_dynamic_api_request_with_headers', security: '9a9e767c12', endpoint: '/app/auth/login_using_wallet_address', data: walletRegisterParameter, }; // console.log(requestMetamskData, 'requestMetamskData'); jQuery.ajax({ url: 'https://coinpedia.org/wp-admin/admin-ajax.php', type: 'POST', data: requestMetamskData, beforeSend: function(xhr) { xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); }, success: function(response) { // console.log(response, 'metamaskresponse'); try { response = response.data; // console.log(response, 'responseresponseresponse'); // console.log(response, 'responseresponsematamask'); if (response.status === true) { if (response.message.registered_status === false) { jQuery('#loginModal').modal('hide'); jQuery('#registerModal').modal('show'); jQuery('#registerModal .modal-content').html(generateRegisterModalContent()); jQuery('#registerModal #metamaskBlock').val(walletAddress); jQuery('#registerModal #metamaskConnect').css('display', 'none'); jQuery('#registerModal #showEmailInput').css('display', 'block'); jQuery('#registerModal .metamaskmainblock').css('display', 'block'); jQuery('#registerModal .email_block_hide').css('display', 'none'); } else { if (response.status === true) { wallet_login_username = response.message.user_name; wallet_login_emailid = response.message.email_id; wallet_login_token = response.message.token; wallet_login_fullname = response.message.full_name; email_verify_status = response.message.email_verify_status; registered_wallet_address = response.message.wallet_address; profile_image_url = response.message.profile_image; var expirationDate = new Date(new Date().getTime() + 180 * 60 * 1000); var cookieOptions = "; expires=" + expirationDate + "; path=/; domain=.coinpedia.org"; document.cookie = "user_email_id=" + encodeURIComponent(wallet_login_emailid) + cookieOptions; document.cookie = "user_full_name=" + encodeURIComponent(wallet_login_fullname) + cookieOptions; document.cookie = "user_token=" + encodeURIComponent(wallet_login_token) + cookieOptions; document.cookie = "user_username=" + encodeURIComponent(wallet_login_username) + cookieOptions; document.cookie = "user_profile_image=" + encodeURIComponent(profile_image_url) + cookieOptions; document.cookie = "user_email_status=" + encodeURIComponent(email_verify_status) + cookieOptions; window.location.reload(); } } } if (response.status === false) { jQuery('#loginModal').modal('hide'); jQuery('#disabledAccount').modal('show'); jQuery('#disabledAccount .modal-content').html(generateDisableModalContent()); jQuery('#showDisableDeleteMsg').text(response.message.alert_message); } } catch (e) { console.error('Error parsing response:', e); } }, error: function(xhr, status, error) { console.error('Error:', error); } }); }</script> <script>function register_with_google_function(user_email_id, user_full_name, google_id, google_user_name, profile_image_url) { // console.log('vhecking google function'); var permalink = window.location.href; var googleRegisterParameter = { email_id: user_email_id, full_name: user_full_name, google_id: google_id, user_name: google_user_name, domain_row_id: '5', page: permalink, }; var requestGoogleData = { action: 'handle_dynamic_api_request_with_headers', security: '9a9e767c12', endpoint: '/app/auth/user_login_with_gmail', data: googleRegisterParameter }; jQuery.ajax({ url: 'https://coinpedia.org/wp-admin/admin-ajax.php', type: 'POST', data: requestGoogleData, beforeSend: function(xhr) { xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); }, success: function(response) { try { response = response.data; if (response.status === true) { google_login_username = response.message.user_name; google_login_emailid = response.message.email_id; google_login_token = response.message.token; google_login_fullname = response.message.full_name; email_verify_status = response.message.email_verify_status; google_profile_image = response.message.profile_image; // Set cookies for email and name var expirationDate = new Date(new Date().getTime() + 180 * 60 * 1000); var cookieOptions = "; expires=" + expirationDate + "; path=/; domain=.coinpedia.org"; document.cookie = "user_email_id=" + encodeURIComponent(google_login_emailid) + cookieOptions; document.cookie = "user_full_name=" + encodeURIComponent(google_login_fullname) + cookieOptions; document.cookie = "user_token=" + encodeURIComponent(google_login_token) + cookieOptions; document.cookie = "user_username=" + encodeURIComponent(google_login_username) + cookieOptions; document.cookie = "user_profile_image=" + encodeURIComponent(google_profile_image) + cookieOptions; document.cookie = "user_email_status=" + encodeURIComponent(email_verify_status) + cookieOptions; var isLoggedInOrRegistered = true; window.location.reload(); } if (response.status === false) { jQuery('#loginModal').modal('hide'); jQuery('#disabledAccount').modal('show'); jQuery('#disabledAccount .modal-content').html(generateDisableModalContent()); jQuery('#showDisableDeleteMsg').text(response.message.alert_message); } } catch (e) { console.error('Error parsing response:', e); } }, error: function(xhr, status, error) { console.error('Error:', error); } }); }</script> <script src="https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js"></script> <script>function applesignin() { try { AppleID.auth.init({ clientId: 'sign.coinpedia.services', redirectURI: 'https://coinpedia.org', scope: 'email name', state: 'origin:web', usePopup: true, }); function decodeIdToken(idToken) { const base64Url = idToken.split('.')[1]; const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/'); const jsonPayload = decodeURIComponent(atob(base64).split('').map(function(c) { return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2); }).join('')); return JSON.parse(jsonPayload); } AppleID.auth.signIn().then(function(response) { var idToken = response.authorization.id_token; var decodedToken = decodeIdToken(idToken); var apple_user_email = decodedToken.email; var apple_user_name = decodedToken.name || ""; var permalink = window.location.href; var appleRegisterParameter = { email_id: apple_user_email, full_name: apple_user_name, domain_row_id: '5', page: permalink, }; var requestAppleData = { action: 'handle_dynamic_api_request_with_headers', security: '9a9e767c12', endpoint: '/app/auth/user_login_with_apple', token: idToken, data: appleRegisterParameter }; jQuery.ajax({ url: 'https://coinpedia.org/wp-admin/admin-ajax.php', type: 'POST', data: requestAppleData, beforeSend: function(xhr) { xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); }, success: function(response) { try { response = response.data; // console.log('Apple returns data:', response); if (response.status === true) { var apple_login_username = response.message.user_name; var apple_login_emailid = response.message.email_id; var apple_login_token = response.message.token; var apple_login_fullname = response.message.full_name; var apple_email_verify_status = response.message.email_verify_status; var apple_profile_image = response.message.profile_image; var apple_registered_status = response.message.registered_status; var expirationDate = new Date(new Date().getTime() + 180 * 60 * 1000); var cookieOptions = "; expires=" + expirationDate + "; path=/; domain=.coinpedia.org"; document.cookie = "user_email_id=" + encodeURIComponent(apple_login_emailid) + cookieOptions; document.cookie = "user_full_name=" + encodeURIComponent(apple_login_fullname) + cookieOptions; document.cookie = "user_token=" + encodeURIComponent(apple_login_token) + cookieOptions; document.cookie = "user_username=" + encodeURIComponent(apple_login_username) + cookieOptions; document.cookie = "user_profile_image=" + encodeURIComponent(apple_profile_image) + cookieOptions; document.cookie = "user_email_status=" + encodeURIComponent(apple_email_verify_status) + cookieOptions; var isLoggedInOrRegistered = true; // console.log(isLoggedInOrRegistered, 'isLoggedInOrRegistered triggered '); window.location.reload(); } else { var isLoggedInOrRegistered = false; jQuery('#loginModal').modal('hide'); jQuery('#disabledAccount').modal('show'); jQuery('#disabledAccount .modal-content').html(generateDisableModalContent()); jQuery('#showDisableDeleteMsg').text(response.message.alert_message); } } catch (e) { console.error('Error parsing response:', e); } }, error: function(xhr, status, error) { console.error('Error:', error); } }); }).catch(function(error) { console.error('Error signing in with Apple:', error); }); } catch (error) { console.error('Error initializing Apple sign-in:', error); } }</script> <!-- /******************************************* Register Popup modal design **************************************************/ --><div class="modal modal-create-acc header-popup" id="registerModal"><div class="modal-dialog modal-dialog-zoom event-login-popup modal-dialog-right"><div class="modal-content modal_registration_success"></div></div></div><div class="country_list_modal"> <!-- Modal Structure --><div class="modal header-popup" id="countryModal"><div class="modal-dialog modal-dialog-right"><div class="modal-content"><div class="modal-header"><h5 class="modal-title">Select a Country</h5> <button type="button" class="close" data-dismiss="modal">×</button></div><div class="modal-body"><div class="input-group"> <input type="text" class="form-control" placeholder="Search" id="searchCountry" autofocus> <span class="input-group-text"> <img src="https://image.coinpedia.org/wp-content/uploads/2024/07/13130255/new_search.png" alt="search" title="search" width="20" height="20"> </span></div><ul id="countryList"><li id="noResults">No related data found for - "<span id="searchText"></span>".</li></ul></div></div></div></div></div> <script>jQuery(document).ready(function($) { // Function to fetch and populate country list function countrySelect() { // console.log('test country selects'); fetch('https://coinpedia.org/wp-content/themes/jannah/countryList.json') .then(response => response.json()) .then(data => { // Clear any existing country list items const countryList = document.getElementById('countryList'); while (countryList.firstChild && countryList.firstChild.id !== 'noResults') { countryList.removeChild(countryList.firstChild); } // Populate the country list data.forEach(country => { const li = document.createElement('li'); li.dataset.countryFlag = `https://image.coinpedia.org/static/flags/${country.country_flag}`; li.dataset.countryCode = country.country_code; const img = document.createElement('img'); img.src = `https://image.coinpedia.org/static/flags/${country.country_flag}`; img.alt = country.country_name; img.width = 30; img.height = 21; li.appendChild(img); li.appendChild(document.createTextNode(`${country.country_name} `)); const span = document.createElement('span'); span.textContent = country.country_code; li.appendChild(span); countryList.insertBefore(li, document.getElementById('noResults')); }); // Show the modal $('#countryModal').show(); // Focus on search input after modal is shown setTimeout(() => { $('#searchCountry').focus(); }, 0); }) .catch(error => { console.error('Error fetching JSON:', error); const countryList = document.getElementById('countryList'); const errorLi = document.createElement('li'); errorLi.textContent = 'Error: Unable to fetch country list.'; countryList.insertBefore(errorLi, document.getElementById('noResults')); // Show the modal $('#countryModal').show(); }); } // Search functionality $('#searchCountry').on('input', function() { var searchQuery = $(this).val().toLowerCase(); var found = false; $('#countryList li').each(function() { var countryName = $(this).text().toLowerCase(); if (countryName.includes(searchQuery)) { $(this).show(); found = true; } else { $(this).hide(); } }); if (!found) { $('#noResults').show(); $('#searchText').text(searchQuery); } else { $('#noResults').hide(); } }); // Click event handler for closing the modal $('#countryModal .close').click(function() { $('#countryModal').hide(); }); // Click event handler for country list items $('#countryList').on('click', 'li', function() { var countryFlag = $(this).data('country-flag'); var countryCode = $(this).data('country-code'); $('#country_flag_img').attr('src', countryFlag); $('#countryId').text(countryCode); $('#countryModal').hide(); }); // Trigger countrySelect function on button click $(document).on('click', '.country_select', function() { countrySelect(); }); // Wallet connection functionality $(document).on('click', '.connect_wallet_block', async function() { if (window.ethereum) { window.web3 = new Web3(window.ethereum); try { const accounts = await window.ethereum.request({ method: 'eth_requestAccounts' }); const walletAddress = accounts[0]; $('#manuallyConnectwallet').show().text(walletAddress); $('#wallet-addres-label').hide(); } catch (error) { console.log(error, 'error'); } } else { console.log("Install Metamask"); } }); }); jQuery(document).ready(function($) { // console.log('Document ready'); $(document).on('click', '.genderDropdownToggle', function(e) { e.preventDefault(); // Prevent any default action // console.log('Dropdown clicked'); if ($('.genderDropdownMenu').hasClass('show')) { $('.genderDropdownMenu').removeClass('show').addClass('hide'); } else { $('.genderDropdownMenu').removeClass('hide').addClass('show'); } }); $(document).on('click', '.genderDropdownMenu li', function() { const selectedGender = $(this).text(); // Get the text of the selected gender const selectedGenderValue = $(this).data('value'); // Get the data-value of the selected gender $('#genderSelect').text(selectedGender); $('#selectedGenderInput').val(selectedGenderValue); $('.genderDropdownMenu').removeClass('show').addClass('hide'); }); $(document).on('click', function(e) { if (!$('.gender-custom-dropdown').is(e.target) && $('.gender-custom-dropdown').has(e.target).length === 0) { $('.genderDropdownMenu').removeClass('show').addClass('hide'); } }); });</script> <script>jQuery(document).ready(function($) { $('#registerModal').modal({ show: false, backdrop: 'static' }); $('#countryModal').modal({ show: false, backdrop: 'static' }); $(document).on('click', '#loginModal .close', function() { // console.log('loginclick close'); }); $(document).on('click', '#registerModal .close', function() { $('#registerModal').removeClass('show').addClass('hide'); setTimeout(function() { $('#registerModal').modal('hide'); $('.clearable').val(''); $('.register-error-message').text(''); $('.register-mobile-error-message').text(''); $('.register-email-error-message').text(''); $('#manuallyConnectwallet').text(''); $('#wallet_adress_exist').text(''); $('#manuallyConnectwallet').hide(); $('#wallet-addres-label').show(); }, 500); }); jQuery(document).on('submit', '#registerCpForm', function(event) { event.preventDefault(); // console.log('submit register'); if (jQuery('#registerMail').val() == '') { var register_email_id = jQuery('#walletEmailAdres').val(); } else { var register_email_id = jQuery('#registerMail').val(); } var selectedValueGender = jQuery('#selectedGenderInput').val(); // console.log(selectedValueGender,'selectedValueGender'); var fullName = jQuery('#fullName').val(); var userName = jQuery('#userName').val(); var countryIdText = jQuery('#countryId').text(); var country_id = countryIdText.replace(/^\+/, ''); var register_mobile_number = jQuery('#register_mobile_number').val(); var referral_user_id = jQuery('#referral_user_name').val(); if (jQuery('#metamaskBlock').val() != '') { var metamask_address = jQuery('#metamaskBlock').val(); } else if (jQuery('#manuallyConnectwallet').text() != '') { var metamask_address = jQuery('#manuallyConnectwallet').text(); var hidewalletlabel = jQuery('#wallet-addres-label').hide(); } else { console.log('Not sent'); } var errors = []; // Reset previous error messages jQuery('.register-error-message').text(''); jQuery('.register-mobile-error-message').text(''); jQuery('.register-username-error-message').text(''); jQuery('.register-email-error-message').text(''); // Check full name if (fullName === '') { jQuery('.register-error-message').text('The Full Name field is required.'); } else if (fullName.length < 4) { jQuery('.register-error-message').text('The Full Name field must be at least 4 characters.'); } else if (/\d/.test(fullName)) { jQuery('.register-error-message').text('Full name cannot contain numbers.'); } if (userName !== '') { if (userName.length < 4) { jQuery('.register-username-error-message').text('The User Name field must be at least 4 characters.'); } else if (userName.length > 50) { jQuery('.register-username-error-message').text('The User Name field must be less than 50 characters.'); } else if (!(/^[a-zA-Z][a-zA-Z0-9]*$/).test(userName)) { jQuery('.register-username-error-message').text('The User Name field must contain only alphabets and numbers without spaces.'); } else if (/\s/.test(userName)) { // Check if there's any space jQuery('.register-username-error-message').text('The User Name field cannot contain spaces.'); } } // Check email id if (register_email_id === '') { jQuery('.register-email-error-message').text('The Email ID field is required.'); } else if (!/^\S+@\S+\.\S+$/.test(register_email_id)) { jQuery('.register-email-error-message').text('Please enter a valid email address.'); } // Check mobile number if (register_mobile_number !== '' && (register_mobile_number.length < 5 || !(/^\d+$/.test(register_mobile_number)))) { jQuery('.register-mobile-error-message').text('The Mobile Number field must be at least 5 numbers in length.'); } if (jQuery('.register-error-message').text() || $('.register-mobile-error-message').text() || $('.register-email-error-message').text()) { return false; } var registerParameter = { full_name: fullName, user_name: userName, email_id: register_email_id, gender: selectedValueGender, country_id: country_id, mobile_number: register_mobile_number, wallet_address: metamask_address, referral_user_name: referral_user_id }; var requesRegisterData = { action: 'handle_dynamic_api_request_with_headers', security: '9a9e767c12', endpoint: '/app/auth/create_account', data: registerParameter }; jQuery.ajax({ url: 'https://coinpedia.org/wp-admin/admin-ajax.php', type: 'POST', data: requesRegisterData, beforeSend: function(xhr) { xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); }, success: function(response) { try { response = response.data; if (response.status === true) { jQuery('#registerModal').modal('hide'); jQuery('#OTPPopModal .modal-content').html(generateOTPModalContent()); jQuery('#OTPPopModal').modal('show'); var logintoken = response.message.token; startOTPTimer(600); jQuery('.otp_verify_block #getToken').val(logintoken); jQuery('#OTPPopModal .otp-input').val(''); jQuery('#OTPPopModal #getEmail').text(register_email_id); } else { if (response.message.wallet_address != '') { jQuery('#wallet_adress_exist').text(response.message.wallet_address); } if (response.message.email_id != '') { jQuery('.register-email-error-message').text(response.message.email_id); } if (response.message.mobile_number != '') { jQuery('.register-mobile-error-message').text(response.message.mobile_number); } } } catch (e) { console.error('Error parsing response:', e); } }, error: function(xhr, status, error) { console.error('Error:', error); } }); }); });</script> <!-- /******************************************* OTP Page starts **************************************************/ --><div class="modal otpmodal header-popup " id="OTPPopModal"><div class="modal-dialog modal-dialog-zoom modal-dialog-right event-login-popup"><div class="modal-content modal_registration_success"></div></div></div> <!-- register success popup model start --><div class="modal registered-success-popup header-popup" id="registered-success-modal"><div class="modal-dialog modal-dialog-right modal-dialog-zoom event-login-popup"><div class="modal-content modal_registration_success"></div></div></div> <!-- Register success popup model end --> <script>jQuery(document).ready(function($) { $('#OTPPopModal').modal({ show: false, backdrop: 'static' }); function checkOTPFields() { var filled = true; jQuery('.otp-input').each(function() { if (jQuery(this).val().trim().length === 0) { filled = false; return false; } }); return filled; } function fillOTPFields(otp) { otp = otp.trim(); jQuery('.otp-input').each(function(index) { if (index < otp.length) { jQuery(this).val(otp[index]); } else { jQuery(this).val(''); } }); // Move focus to the last filled input field jQuery('.otp-input').eq(Math.min(otp.length, jQuery('.otp-input').length) - 1).focus(); // Check if all fields are filled var filled = checkOTPFields(); jQuery('.verifyOTP').prop('disabled', !filled); if (filled) { jQuery('.verifyBtn').html('<span class="loader-class"></span><span class="verifying">Verifying</span>'); var otp = ''; jQuery('.otp-input').each(function() { otp += jQuery(this).val().trim(); }); if (otp.length === 6) { verifyOTP(otp); } } else { jQuery('.verifyBtn').html('<span>Verify</span>'); } } jQuery(document).on('input', '.otp-input', function(e) { var $this = jQuery(this); var val = $this.val().trim(); // Limit input to a single character if (val.length > 1) { $this.val(val.slice(0, 1)); } // Move to next input if current input is filled if (val.length === 1) { $this.next('.otp-input').focus(); } var filled = checkOTPFields(); jQuery('.verifyOTP').prop('disabled', !filled); if (filled) { jQuery('.verifyBtn').html('<span class="loader-class"></span><span class="verifying">Verifying</span>'); } else { jQuery('.verifyBtn').html('<span>Verify</span>'); } // Collect OTP values and make AJAX request if length is 6 var otp = ''; jQuery('.otp-input').each(function() { otp += jQuery(this).val().trim(); }); if (otp.length === 6) { verifyOTP(otp); } }); jQuery(document).on('keydown', '.otp-input', function(e) { var $this = jQuery(this); var key = e.keyCode || e.which || 0; // Handle backspace key if (key === 8) { if ($this.val().trim().length === 0) { $this.prev('.otp-input').focus(); } else { $this.val(''); e.preventDefault(); // Prevent the default action of the backspace key } } }); jQuery(document).on('paste', '.otp-input', function(e) { var $this = jQuery(this); var pasteData = (e.originalEvent || e).clipboardData.getData('text'); // If data is available, fill OTP fields if (pasteData) { e.preventDefault(); fillOTPFields(pasteData); } }); jQuery(document).on('click', '.otp-input', function() { jQuery(this).val(''); }); jQuery(document).on('click', '#OTPPopModal .close', function() { jQuery('#OTPPopModal').removeClass('show').addClass('hide'); setTimeout(function() { jQuery('#OTPPopModal').modal('hide'); jQuery('#loginModal :input').val(''); }, 500); }); jQuery(document).on('click', '.go-back', function() { jQuery('#loginModal').modal('show'); jQuery('#OTPPopModal').modal('hide'); }); jQuery(document).on('click', '.resentOTP', function() { var getKeepMeStatus = jQuery('#getKeepMeStatus').val(); var geEmailResendOTP = jQuery('#getEmail').text(); var resendData = { email_id: geEmailResendOTP, keepme_status: getKeepMeStatus }; var requestTimerOTPData = { action: 'handle_dynamic_api_request_with_headers', security: '9a9e767c12', endpoint: '/app/auth/login_with_email', data: resendData }; jQuery.ajax({ url: 'https://coinpedia.org/wp-admin/admin-ajax.php', type: 'POST', data: requestTimerOTPData, beforeSend: function(xhr) { xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); }, success: function(response) { if(response.data.status){ $('.otp_verify_block #getToken').val(response.data.message.token); } }, error: function(xhr, status, error) { console.error('Error:', error); } }); }); function verifyOTP(otp) { var logintoken = jQuery('#getToken').val(); var permalink = window.location.href; var getKeepMeStatus = jQuery('#getKeepMeStatus').val(); var verifyOtpParameter = { otp_number: otp, domain_row_id: '5', page: permalink, token: logintoken }; var requestOTPData = { action: 'handle_dynamic_api_request_with_headers', security: '9a9e767c12', endpoint: '/app/auth/verify_otp_via_email', data: verifyOtpParameter }; jQuery.ajax({ url: 'https://coinpedia.org/wp-admin/admin-ajax.php', type: 'POST', data: requestOTPData, beforeSend: function(xhr) { xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); }, success: function(response) { try { response = response.data; if (response.status === false) { if (response.message.otp_number) { jQuery('.otp-error-message').text(response.message.otp_number); jQuery('.otp_section input').css('border', '1px solid #E0243D'); jQuery('.loader-class').hide(); } else { jQuery('.otp-error-message').text(response.message.alert_message); jQuery('.otp_section input').css('border', '1px solid #E0243D'); jQuery('.loader-class').hide(); } jQuery('.otp-error-message').text(); } else { handleSuccessfulOTP(response.message); jQuery('.otp_section input').css('border', '1px solid #16C582'); jQuery('.otp-error-message').hide(); jQuery('.loader-class').hide(); } } catch (e) { console.error('Error parsing response:', e); } }, error: function(xhr, status, error) { console.error('Error:', error); } }); } function handleSuccessfulOTP(message) { var user_username = message.user_name; var user_token = message.token; var user_email_id = message.email_id; var profile_image = message.profile_image; var user_full_name = message.full_name; var email_verify_status = message.email_verify_status; var expirationDate = (message.keepme_status == 2) ? new Date(new Date().getTime() + 30 * 24 * 60 * 60 * 1000) : new Date(new Date().getTime() + 180 * 60 * 1000); var cookieOptions = "; expires=" + expirationDate + "; path=/; domain=.coinpedia.org"; jQuery('#successMsgUsername').text(user_full_name); // Set cookies for username and token with expiration date document.cookie = "user_username=" + encodeURIComponent(user_username) + cookieOptions; document.cookie = "user_token=" + encodeURIComponent(user_token) + cookieOptions; document.cookie = "user_full_name=" + encodeURIComponent(user_full_name) + cookieOptions; document.cookie = "user_email_id=" + encodeURIComponent(user_email_id) + cookieOptions; document.cookie = "user_email_status=" + encodeURIComponent(email_verify_status) + cookieOptions; document.cookie = "user_profile_image=" + encodeURIComponent(profile_image) + cookieOptions; var getRegisterStatus = $('#getRegisterStatus').val(); var isLoggedInOrRegistered = true; if (getRegisterStatus === "true" || getRegisterStatus === true) { location.reload(); } else { jQuery('#registered-success-modal').modal('show'); jQuery('#registered-success-modal .modal-content').html(generateSuccessModalContent()); jQuery('#OTPPopModal').modal('hide'); var currentPermalink = window.location.href; jQuery("#continue_with_cp").attr("href", currentPermalink); } } jQuery(document).on('click', '.close_button_indi', function() { location.reload(); }); function deleteCookie(cookieName) { var domain = ".coinpedia.org"; document.cookie = cookieName + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; domain=" + domain; } jQuery(document).on('click', '.logout-button', function() { deleteCookie("user_username"); deleteCookie("user_token"); deleteCookie("user_full_name"); deleteCookie("user_email_id"); deleteCookie("user_email_status"); deleteCookie("user_profile_image"); window.location.reload(); }); });</script> <style>.currencyModalDesign{ z-index: 999; padding-top: 4%; text-align: left; padding-right: 24px !important; } .currencyModalDesign .modal-content { border: none; padding: 24px; box-shadow: 0 0 15px #eeeeee59; margin: auto; background-color: #FAFAFA; border-radius: 8px; } .currencyModalDesign .modal-content h2 { font-size: 18px; font-weight: 600; text-align: left; } .currency-close-btn{ float: right; } .currency-list-modal .input-group { border-radius: 8px; max-height: 42px; border: 1px solid #0052CC4D; margin-bottom: 18px; margin-top: 14px; } .currency-list-modal .input-group #searchCountry { width: 100%; font-weight: 400; font-size: 14px; color: #171717B2; line-height: 16px; border: 0; padding: 5px; background: transparent; } .currency-list-modal .input-group #search_curreny_country{ border: 0; width: 93%; background: transparent; } .curreny_flag_popup{ width: 25px; border-radius: 3px; } .currency-list-modal .input-group .input-group-text img{ vertical-align: sub; width: 16px; } #country-list-api{ height: 260px; overflow-y: auto; margin-top: 12px; } #country-list-api::-webkit-scrollbar-thumb { background: rgb(201, 214, 223); border-radius: 5px; } #country-list-api::-webkit-scrollbar-track { background: #f1f1f1; } #country-list-api .media{ align-items: center; border-bottom: 1px solid #f3eeee; margin: 6px 0 0; padding-bottom: 6px; } #country-list-api .media-body h6{ font-size: 14px; cursor: pointer; font-weight: 600; color: #2c2f34; } #country-list-api .media-body p{ font-size: 12px; cursor: pointer; font-weight: 400; line-height: 18px; margin-bottom: 0; } #country-list-api .media .media-body{ padding-left: 12px; } #searchCurrencyText{ font-weight: 600; color: #000; } @media (max-width: 991px) { .currency-list-modal .input-group { min-height: 40px; line-height: 38px; padding: 0 4px 0 10px; } } @media(max-width:767px){ .currencyModalDesign .modal-content{ margin: 10px; } .currencyModalDesign{ padding-right: 0 !important; } } @media (min-width: 576px) { .modal-dialog { max-width: 500px; margin: 1.75rem auto; } } @media (max-width: 580px){ .currency-list-modal .input-group #search_curreny_country{ width: 90%; } }</style><div id="currencyModal" class="modal currencyModalDesign"><div class="modal-dialog"><div class="modal-content"> <span class="currency-close-btn"><img src="https://image.coinpedia.org/static/common/close-header-modal.svg" alt="close modal" width="14" height="14" /></span><h2>Select Currency</h2><div class="currency-list-modal"><div class="input-group"> <input type="text" class="form-control" placeholder="Search" id="search_curreny_country" autofocus> <span class="input-group-text"> <img src="https://image.coinpedia.org/wp-content/uploads/2024/07/13130255/new_search.png" alt="search" title="search" width="20" height="20"> </span></div><div id="currency_result_notfound" style="display: none;">No results found for "<span id="searchCurrencyText"></span>"</div><ul id="country-list-api"></ul></div></div></div></div> <script>// Function to retrieve and parse cookie as an object function getCookie(name) { const value = `; ${document.cookie}`; const parts = value.split(`; ${name}=`); if (parts.length === 2) { return JSON.parse(decodeURIComponent(parts.pop().split(';').shift())); } return null; } jQuery(document).ready(function($) { // Initialize the currency modal $('#currencyModal').modal({ show: false, backdrop: 'static' }); // Function to fetch country currencies and display them function country_currency_Select() { const requestLikeCount = { action: "dynamic_get_request_api_integration", security: "9a9e767c12", endpoint: "/markets/cryptocurrency/country_currencies", isMetamaskAuthentication: true }; $.ajax({ url: "https://coinpedia.org/wp-admin/admin-ajax.php", type: "GET", data: requestLikeCount, beforeSend: function(xhr) { xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); }, success: function(response) { if (response.success && response.data.status) { document.getElementById('loadingOverlay').style.display = 'none'; const countryList = $('#country-list-api'); countryList.empty(); // Populate the list with countries and currencies response.data.message.forEach(current_country => { const li = $('<li></li>') .attr('data-country-flag', current_country.country_flag) .attr('data-currency-code', current_country.currency_code) .attr('data-currency-symbol', current_country.currency_symbol) .attr('data-currency-value', current_country.currency_value) .attr('data-currency-name', current_country.currency_name) .attr('data-currency-row-id', current_country.country_row_id) .attr('data-currency-id', current_country._id); const mediaDiv = $('<div class="media"></div>'); const mediaLeft = $('<div class="media-left align-self-center"></div>'); const img = $('<img>') .attr('src', `https://image.coinpedia.org/static/flags/${current_country.country_flag}`) .attr('alt', current_country.currency_name) .addClass('curreny_flag_popup'); mediaLeft.append(img); const mediaBody = $('<div class="media-body"></div>'); const h6 = $('<h6></h6>').text(current_country.currency_name); const p = $('<p></p>').text(`${current_country.currency_code} - ${current_country.currency_symbol}`); mediaBody.append(h6).append(p); mediaDiv.append(mediaLeft).append(mediaBody); li.append(mediaDiv); countryList.append(li); }); // $('#currencyModal').removeClass('hide'); $('#currencyModal').modal('show'); setTimeout(() => { $('#search_curreny_country').focus(); // $('#currencyModal').modal('show'); }, 200); } }, error: function() { console.error("Failed to fetch country list."); } }); } $(document).on('click', '.select-currency', function() { country_currency_Select(); document.getElementById('loadingOverlay').style.display = 'flex'; }); $(document).on('click', '.select-currency-mobile', function() { country_currency_Select(); document.getElementById('loadingOverlay').style.display = 'flex'; }); // Filter country currencies based on input $('#search_curreny_country').on('input', function() { const searchQuery = $(this).val().toLowerCase(); let found = false; $('#country-list-api li').each(function() { const countryName = $(this).text().toLowerCase(); if (countryName.includes(searchQuery)) { $(this).show(); found = true; } else { $(this).hide(); } }); // Show or hide the "not found" message if (!found) { $('#currency_result_notfound').show(); $('#searchCurrencyText').text(searchQuery); } else { $('#currency_result_notfound').hide(); } }); // Close the currency modal $(document).on('click', '.currency-close-btn', function() { jQuery('#currencyModal').modal('hide'); // jQuery('#currencyModal').removeClass('show').addClass('hide'); // setTimeout(() => { // jQuery('#currencyModal').modal('hide'); // }, 300); }); // Event listener for selecting a currency from the list $(document).on('click', '#country-list-api li', function() { const activeCurrency = { _id: $(this).data('currency-id') || null, country_row_id: $(this).data('currency-row-id') || null, country_flag: $(this).data('country-flag'), currency_code: $(this).data('currency-code'), currency_symbol: $(this).data('currency-symbol'), currency_value: parseFloat($(this).data('currency-value')), currency_name: $(this).data('currency-name') }; // Set cookie with expiration const expirationDays = 7; const date = new Date(); date.setTime(date.getTime() + (expirationDays * 24 * 60 * 60 * 1000)); const expires = `expires=${date.toUTCString()};`; const encodedCurrencyData = encodeURIComponent(JSON.stringify(activeCurrency)); document.cookie = `active_currency=${encodedCurrencyData}; ${expires} path=/; domain=coinpedia.org;`; location.reload(); $('#currencyModal').hide(); }); }); document.addEventListener('DOMContentLoaded', function () { const storedCurrency = getCookie('active_currency'); const currencyImage = document.getElementById('currency-image'); const currencyImageMobile = document.getElementById('currency-image-mobile'); const currencyCode = document.getElementById('currency-code'); // Set default values if no currency is stored if (storedCurrency) { if (currencyImage) { currencyImage.innerHTML = `<img src="https://image.coinpedia.org/static/flags/${storedCurrency.country_flag}" alt="currency-image" width="20" height="20"/>`; } if (currencyCode) { currencyCode.innerHTML = `<span class="currencyCode">${storedCurrency.currency_code} </span><span class="white-drop-down"><img src="https://image.coinpedia.org/static/common/top_dropdown.svg" alt="dropdown" width="13" height="20" /></span>`; } if (currencyImageMobile) { currencyImageMobile.innerHTML = `<img src="https://image.coinpedia.org/static/flags/${storedCurrency.country_flag}" alt="currency-image" width="20" height="20"/> <span class="white-drop-down"><img src="https://image.coinpedia.org/static/common/top_dropdown.svg" alt="dropdown" width="13" height="20" /></span>`; } } else { if (currencyImage) { currencyImage.innerHTML = `<img src="https://image.coinpedia.org/static/flags/us.png" alt="usd currency" width="20" height="20" />`; } if (currencyCode) { currencyCode.innerHTML = `<span class="currencyCode"> USD </span> <span class="white-drop-down"><img src="https://image.coinpedia.org/static/common/top_dropdown.svg" alt="dropdown" width="13" height="20" /></span>`; } if (currencyImageMobile) { currencyImageMobile.innerHTML = `<img src="https://image.coinpedia.org/static/flags/us.png" alt="currency-image" width="20" height="20"/> <span class="white-drop-down"><img src="https://image.coinpedia.org/static/common/top_dropdown.svg" alt="dropdown" width="13" height="20" /></span>`; } } });</script> <div id="autocomplete-suggestions" class="autocomplete-suggestions"></div><div id="is-scroller-outer"><div id="is-scroller"></div></div><div id="fb-root"></div><script type="text/javascript" id="ppress-frontend-script-js-extra">/* <![CDATA[ */ var pp_ajax_form = {"ajaxurl":"https:\/\/coinpedia.org\/wp-admin\/admin-ajax.php","confirm_delete":"Are you sure?","deleting_text":"Deleting...","deleting_error":"An error occurred. Please try again.","nonce":"cdec538eac","disable_ajax_form":"false","is_checkout":"0","is_checkout_tax_enabled":"0","is_checkout_autoscroll_enabled":"true"}; /* ]]> */</script> <script type="text/javascript" src="https://coinpedia.org/wp-content/plugins/wp-user-avatar/assets/js/frontend.min.js?ver=4.15.18" id="ppress-frontend-script-js"></script> <script type="text/javascript" id="rocket-browser-checker-js-after">/* <![CDATA[ */ "use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}var RocketBrowserCompatibilityChecker=function(){function RocketBrowserCompatibilityChecker(options){_classCallCheck(this,RocketBrowserCompatibilityChecker),this.passiveSupported=!1,this._checkPassiveOption(this),this.options=!!this.passiveSupported&&options}return _createClass(RocketBrowserCompatibilityChecker,[{key:"_checkPassiveOption",value:function(self){try{var options={get passive(){return!(self.passiveSupported=!0)}};window.addEventListener("test",null,options),window.removeEventListener("test",null,options)}catch(err){self.passiveSupported=!1}}},{key:"initRequestIdleCallback",value:function(){!1 in window&&(window.requestIdleCallback=function(cb){var start=Date.now();return setTimeout(function(){cb({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-start))}})},1)}),!1 in window&&(window.cancelIdleCallback=function(id){return clearTimeout(id)})}},{key:"isDataSaverModeOn",value:function(){return"connection"in navigator&&!0===navigator.connection.saveData}},{key:"supportsLinkPrefetch",value:function(){var elem=document.createElement("link");return elem.relList&&elem.relList.supports&&elem.relList.supports("prefetch")&&window.IntersectionObserver&&"isIntersecting"in IntersectionObserverEntry.prototype}},{key:"isSlowConnection",value:function(){return"connection"in navigator&&"effectiveType"in navigator.connection&&("2g"===navigator.connection.effectiveType||"slow-2g"===navigator.connection.effectiveType)}}]),RocketBrowserCompatibilityChecker}(); /* ]]> */</script> <script type="text/javascript" id="rocket-preload-links-js-extra">/* <![CDATA[ */ var RocketPreloadLinksConfig = {"excludeUris":"\/beginners-guide\/etf-exchange-traded-fund\/|\/feed\/|\/main\/users_polling\/|\/contest\/|\/academy\/|\/beginners-guide\/|\/traders\/|\/checklist\/|\/glossary\/|\/(?:.+\/)?feed(?:\/(?:.+\/?)?)?$|\/(?:.+\/)?embed\/|\/(index.php\/)?(.*)wp-json(\/.*|$)|\/refer\/|\/go\/|\/recommend\/|\/recommends\/","usesTrailingSlash":"","imageExt":"jpg|jpeg|gif|png|tiff|bmp|webp|avif|pdf|doc|docx|xls|xlsx|php","fileExt":"jpg|jpeg|gif|png|tiff|bmp|webp|avif|pdf|doc|docx|xls|xlsx|php|html|htm","siteUrl":"https:\/\/coinpedia.org","onHoverDelay":"100","rateThrottle":"3"}; /* ]]> */</script> <script type="text/javascript" id="rocket-preload-links-js-after">/* <![CDATA[ */ (function() { "use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e=function(){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}();function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var t=function(){function n(e,t){i(this,n),this.browser=e,this.config=t,this.options=this.browser.options,this.prefetched=new Set,this.eventTime=null,this.threshold=1111,this.numOnHover=0}return e(n,[{key:"init",value:function(){!this.browser.supportsLinkPrefetch()||this.browser.isDataSaverModeOn()||this.browser.isSlowConnection()||(this.regex={excludeUris:RegExp(this.config.excludeUris,"i"),images:RegExp(".("+this.config.imageExt+")$","i"),fileExt:RegExp(".("+this.config.fileExt+")$","i")},this._initListeners(this))}},{key:"_initListeners",value:function(e){-1<this.config.onHoverDelay&&document.addEventListener("mouseover",e.listener.bind(e),e.listenerOptions),document.addEventListener("mousedown",e.listener.bind(e),e.listenerOptions),document.addEventListener("touchstart",e.listener.bind(e),e.listenerOptions)}},{key:"listener",value:function(e){var t=e.target.closest("a"),n=this._prepareUrl(t);if(null!==n)switch(e.type){case"mousedown":case"touchstart":this._addPrefetchLink(n);break;case"mouseover":this._earlyPrefetch(t,n,"mouseout")}}},{key:"_earlyPrefetch",value:function(t,e,n){var i=this,r=setTimeout(function(){if(r=null,0===i.numOnHover)setTimeout(function(){return i.numOnHover=0},1e3);else if(i.numOnHover>i.config.rateThrottle)return;i.numOnHover++,i._addPrefetchLink(e)},this.config.onHoverDelay);t.addEventListener(n,function e(){t.removeEventListener(n,e,{passive:!0}),null!==r&&(clearTimeout(r),r=null)},{passive:!0})}},{key:"_addPrefetchLink",value:function(i){return this.prefetched.add(i.href),new Promise(function(e,t){var n=document.createElement("link");n.rel="prefetch",n.href=i.href,n.onload=e,n.onerror=t,document.head.appendChild(n)}).catch(function(){})}},{key:"_prepareUrl",value:function(e){if(null===e||"object"!==(void 0===e?"undefined":r(e))||!1 in e||-1===["http:","https:"].indexOf(e.protocol))return null;var t=e.href.substring(0,this.config.siteUrl.length),n=this._getPathname(e.href,t),i={original:e.href,protocol:e.protocol,origin:t,pathname:n,href:t+n};return this._isLinkOk(i)?i:null}},{key:"_getPathname",value:function(e,t){var n=t?e.substring(this.config.siteUrl.length):e;return n.startsWith("/")||(n="/"+n),this._shouldAddTrailingSlash(n)?n+"/":n}},{key:"_shouldAddTrailingSlash",value:function(e){return this.config.usesTrailingSlash&&!e.endsWith("/")&&!this.regex.fileExt.test(e)}},{key:"_isLinkOk",value:function(e){return null!==e&&"object"===(void 0===e?"undefined":r(e))&&(!this.prefetched.has(e.href)&&e.origin===this.config.siteUrl&&-1===e.href.indexOf("?")&&-1===e.href.indexOf("#")&&!this.regex.excludeUris.test(e.href)&&!this.regex.images.test(e.href))}}],[{key:"run",value:function(){"undefined"!=typeof RocketPreloadLinksConfig&&new n(new RocketBrowserCompatibilityChecker({capture:!0,passive:!0}),RocketPreloadLinksConfig).init()}}]),n}();t.run(); }()); /* ]]> */</script> <script type="text/javascript" defer="defer" src="https://coinpedia.org/wp-content/themes/jannah/assets/js/ie.js?ver=7.2.0" id="tie-js-ie-js"></script> <script type="text/javascript" src="https://coinpedia.org/wp-content/plugins/wp-review-pro/public/js/js.cookie.min.js?ver=2.1.4" id="js-cookie-js"></script> <script type="text/javascript" src="https://coinpedia.org/wp-content/plugins/wp-review-pro/public/js/jquery.appear.js?ver=1.1" id="wp_review-jquery-appear-js"></script> <script type="text/javascript" src="https://coinpedia.org/wp-includes/js/underscore.min.js?ver=1.13.7" id="underscore-js"></script> <script type="text/javascript" id="wp-util-js-extra">/* <![CDATA[ */ var _wpUtilSettings = {"ajax":{"url":"\/wp-admin\/admin-ajax.php"}}; /* ]]> */</script> <script type="text/javascript" src="https://coinpedia.org/wp-includes/js/wp-util.min.js?ver=6.7.1" id="wp-util-js"></script> <script type="text/javascript" id="wp_review-js-js-extra">/* <![CDATA[ */ var wpreview = {"ajaxurl":"https:\/\/coinpedia.org\/wp-admin\/admin-ajax.php","popup":{"enable":"0","width":"800px","animation_in":"bounceIn","animation_out":"bounceOut","overlay_color":"#0b0b0b","overlay_opacity":"0.8","post_type":"post","queryby":"category","orderby":"random","category":"0","tag":"0","review_type":"star","limit":"6","expiration":"30","cookie_name":"wpr-popup","delay":"0","show_on_load":false,"show_on_reach_bottom":false,"exit_intent":true,"screen_size_check":false,"screen_width":"0","embed_show_title":"","embed_show_thumbnail":"","embed_show_excerpt":"","embed_show_rating_box":"","embed_show_credit":""},"rateAllFeatures":"Please rate all features","verifiedPurchase":"(Verified purchase)","commentImageUploadNonce":"7b96e2c066"}; /* ]]> */</script> <script type="text/javascript" src="https://coinpedia.org/wp-content/plugins/wp-review-pro/public/js/main.js?ver=3.4.11" id="wp_review-js-js"></script> <script type="text/javascript" src="https://coinpedia.org/wp-content/plugins/wp-review-pro/public/js/jquery.knob.min.js?ver=1.1" id="jquery-knob-js"></script> <script type="text/javascript" id="tie-scripts-js-extra">/* <![CDATA[ */ var tie = {"is_rtl":"","ajaxurl":"https:\/\/coinpedia.org\/wp-admin\/admin-ajax.php","is_side_aside_light":"","is_taqyeem_active":"1","is_sticky_video":"","mobile_menu_top":"","mobile_menu_active":"area_2","mobile_menu_parent":"","lightbox_all":"true","lightbox_gallery":"true","lightbox_skin":"dark","lightbox_thumb":"horizontal","lightbox_arrows":"true","is_singular":"","autoload_posts":"","reading_indicator":"true","lazyload":"","select_share":"true","select_share_twitter":"true","select_share_facebook":"true","select_share_linkedin":"true","select_share_email":"","facebook_app_id":"5303202981","twitter_username":"","responsive_tables":"true","ad_blocker_detector":"","sticky_behavior":"upwards","sticky_desktop":"","sticky_mobile":"true","sticky_mobile_behavior":"default","ajax_loader":"<div class=\"loader-overlay\">\n\t\t\t\t<div class=\"spinner\">\n\t\t\t\t\t<div class=\"bounce1\"><\/div>\n\t\t\t\t\t<div class=\"bounce2\"><\/div>\n\t\t\t\t\t<div class=\"bounce3\"> <\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>","type_to_search":"1","lang_no_results":"Nothing Found","sticky_share_mobile":"","sticky_share_post":"","sticky_share_post_menu":""}; /* ]]> */</script> <script type="text/javascript" defer="defer" src="https://coinpedia.org/wp-content/themes/jannah/assets/js/scripts.min.js?ver=7.2.0" id="tie-scripts-js"></script> <script type="text/javascript" defer="defer" src="https://coinpedia.org/wp-content/themes/jannah/assets/ilightbox/lightbox.js?ver=7.2.0" id="tie-js-ilightbox-js"></script> <script type="text/javascript" defer="defer" src="https://coinpedia.org/wp-content/themes/jannah/assets/js/sliders.min.js?ver=7.2.0" id="tie-js-sliders-js"></script> <script type="text/javascript" defer="defer" src="https://coinpedia.org/wp-content/themes/jannah/assets/js/shortcodes.js?ver=7.2.0" id="tie-js-shortcodes-js"></script> <script type="text/javascript" defer="defer" src="https://coinpedia.org/wp-content/themes/jannah/assets/js/desktop.min.js?ver=7.2.0" id="tie-js-desktop-js"></script> <script type="text/javascript" defer="defer" src="https://coinpedia.org/wp-content/themes/jannah/assets/js/live-search.js?ver=7.2.0" id="tie-js-livesearch-js"></script> <script type="text/javascript">/* <![CDATA[ */ document.querySelectorAll("ul.nav-menu").forEach( ulist => { if (ulist.querySelectorAll("li").length == 0) { ulist.style.display = "none"; } } ); /* ]]> */</script> <script type='text/javascript'>!function(t){"use strict";t.loadCSS||(t.loadCSS=function(){});var e=loadCSS.relpreload={};if(e.support=function(){var e;try{e=t.document.createElement("link").relList.supports("preload")}catch(t){e=!1}return function(){return e}}(),e.bindMediaToggle=function(t){var e=t.media||"all";function a(){t.addEventListener?t.removeEventListener("load",a):t.attachEvent&&t.detachEvent("onload",a),t.setAttribute("onload",null),t.media=e}t.addEventListener?t.addEventListener("load",a):t.attachEvent&&t.attachEvent("onload",a),setTimeout(function(){t.rel="stylesheet",t.media="only x"}),setTimeout(a,3e3)},e.poly=function(){if(!e.support())for(var a=t.document.getElementsByTagName("link"),n=0;n<a.length;n++){var o=a[n];"preload"!==o.rel||"style"!==o.getAttribute("as")||o.getAttribute("data-loadcss")||(o.setAttribute("data-loadcss",!0),e.bindMediaToggle(o))}},!e.support()){e.poly();var a=t.setInterval(e.poly,500);t.addEventListener?t.addEventListener("load",function(){e.poly(),t.clearInterval(a)}):t.attachEvent&&t.attachEvent("onload",function(){e.poly(),t.clearInterval(a)})}"undefined"!=typeof exports?exports.loadCSS=loadCSS:t.loadCSS=loadCSS}("undefined"!=typeof global?global:this);</script> <script type='text/javascript'>var c = document.body.className; c = c.replace(/tie-no-js/, 'tie-js'); document.body.className = c;</script> <script>window.lazyLoadOptions=[{elements_selector:"img[data-lazy-src],.rocket-lazyload,iframe[data-lazy-src]",data_src:"lazy-src",data_srcset:"lazy-srcset",data_sizes:"lazy-sizes",class_loading:"lazyloading",class_loaded:"lazyloaded",threshold:300,callback_loaded:function(element){if(element.tagName==="IFRAME"&&element.dataset.rocketLazyload=="fitvidscompatible"){if(element.classList.contains("lazyloaded")){if(typeof window.jQuery!="undefined"){if(jQuery.fn.fitVids){jQuery(element).parent().fitVids()}}}}}},{elements_selector:".rocket-lazyload",data_src:"lazy-src",data_srcset:"lazy-srcset",data_sizes:"lazy-sizes",class_loading:"lazyloading",class_loaded:"lazyloaded",threshold:300,}];window.addEventListener('LazyLoad::Initialized',function(e){var lazyLoadInstance=e.detail.instance;if(window.MutationObserver){var observer=new MutationObserver(function(mutations){var image_count=0;var iframe_count=0;var rocketlazy_count=0;mutations.forEach(function(mutation){for(var i=0;i<mutation.addedNodes.length;i++){if(typeof mutation.addedNodes[i].getElementsByTagName!=='function'){continue} if(typeof mutation.addedNodes[i].getElementsByClassName!=='function'){continue} images=mutation.addedNodes[i].getElementsByTagName('img');is_image=mutation.addedNodes[i].tagName=="IMG";iframes=mutation.addedNodes[i].getElementsByTagName('iframe');is_iframe=mutation.addedNodes[i].tagName=="IFRAME";rocket_lazy=mutation.addedNodes[i].getElementsByClassName('rocket-lazyload');image_count+=images.length;iframe_count+=iframes.length;rocketlazy_count+=rocket_lazy.length;if(is_image){image_count+=1} if(is_iframe){iframe_count+=1}}});if(image_count>0||iframe_count>0||rocketlazy_count>0){lazyLoadInstance.update()}});var b=document.getElementsByTagName("body")[0];var config={childList:!0,subtree:!0};observer.observe(b,config)}},!1)</script><script data-no-minify="1" async src="https://coinpedia.org/wp-content/plugins/wp-rocket/assets/js/lazyload/17.8.3/lazyload.min.js"></script><script>function lazyLoadThumb(e,alt,l){var t='<img data-lazy-src="https://i.ytimg.com/vi_webp/ID/hqdefault.webp" alt="" width="480" height="360"><noscript><img src="https://i.ytimg.com/vi_webp/ID/hqdefault.webp" alt="" width="480" height="360"></noscript>',a='<button class="play" aria-label="play Youtube video"></button>';if(l){t=t.replace('data-lazy-','');t=t.replace('loading="lazy"','');t=t.replace(/<noscript>.*?<\/noscript>/g,'');}t=t.replace('alt=""','alt="'+alt+'"');return t.replace("ID",e)+a}function lazyLoadYoutubeIframe(){var e=document.createElement("iframe"),t="ID?autoplay=1";t+=0===this.parentNode.dataset.query.length?"":"&"+this.parentNode.dataset.query;e.setAttribute("src",t.replace("ID",this.parentNode.dataset.src)),e.setAttribute("frameborder","0"),e.setAttribute("allowfullscreen","1"),e.setAttribute("allow","accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"),this.parentNode.parentNode.replaceChild(e,this.parentNode)}document.addEventListener("DOMContentLoaded",function(){var exclusions=["avatar","right_arrow.png","author_linkedIn.svg","author_vector.svg","author_facebook.svg","breadcrum.svg"];var e,t,p,u,l,a=document.getElementsByClassName("rll-youtube-player");for(t=0;t<a.length;t++)(e=document.createElement("div")),(u='https://i.ytimg.com/vi_webp/ID/hqdefault.webp'),(u=u.replace('ID',a[t].dataset.id)),(l=exclusions.some(exclusion=>u.includes(exclusion))),e.setAttribute("data-id",a[t].dataset.id),e.setAttribute("data-query",a[t].dataset.query),e.setAttribute("data-src",a[t].dataset.src),(e.innerHTML=lazyLoadThumb(a[t].dataset.id,a[t].dataset.alt,l)),a[t].appendChild(e),(p=e.querySelector(".play")),(p.onclick=lazyLoadYoutubeIframe)});</script> <div class="sticky_footer_menu"><ul><li class="footer_menu_items "> <a href="https://coinpedia.org/news/"> <img src="https://image.coinpedia.org/static/common/footer-gray-news.svg" alt="home icon" width="20" height="20" class="hide-in-dark"/> <img src="https://image.coinpedia.org/static/common/dark-news.svg" alt="home icon" width="20" height="20" class="show-in-dark"/> <span>News</span> </a></li><li class="footer_menu_items "> <a href="https://coinpedia.org/crypto-live-news/"> <img src="https://image.coinpedia.org/static/common/livewire.svg" alt="news-category" width="20" height="20"/> <span><span class="footer_live_hide">Live</span> News</span> </a></li><li class="footer_menu_items "> <a href="https://markets.coinpedia.org"> <img src="https://image.coinpedia.org/static/common/market.svg" alt="market-icon" width="20" height="20" class="hide-in-dark" /> <img src="https://image.coinpedia.org/static/common/markets-dark-1.svg" alt="market-icon" width="20" height="20" class="show-in-dark" /> <span>Markets</span> </a></li><li class="footer_menu_items "> <a href="https://coinpedia.org/beginners-guide/"> <img src="https://image.coinpedia.org/static/common/academy_footer.svg" alt="footer-logo" width="20" height="20" class="hide-in-dark" /> <img src="https://image.coinpedia.org/static/common/academy-dark-1.svg" alt="footer-logo" width="20" height="20" class="show-in-dark" /> <span>Academy</span> </a></li><li class="footer_menu_items "> <a href="https://markets.coinpedia.org/portfolio/"> <img src="https://image.coinpedia.org/static/common/portfolio_footer.svg" alt="portfolio" width="20" height="20" class="hide-in-dark"/> <img src="https://image.coinpedia.org/static/common/portfolio-dark-2.svg" alt="portfolio" width="20" height="20" class="show-in-dark" /> <span>Portfolio</span> </a></li></ul></div> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> <!-- <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> --> <!-- <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.bundle.min.js"></script> --> <script>var coll = document.getElementsByClassName("mb-menu-collaps"); var i; for (i = 0; i < coll.length; i++) { coll[i].addEventListener("click", function() { this.classList.toggle("active"); var content = this.nextElementSibling; if (content.style.maxHeight){ content.style.maxHeight = null; } else { content.style.maxHeight = content.scrollHeight + "px"; } }); }</script> <script>document.addEventListener('DOMContentLoaded', function() { var closeButtons = document.querySelectorAll('.close-ad-btn'); closeButtons.forEach(function(button) { button.addEventListener('click', function() { var adBlock = button.closest('.banner_ad_hide'); adBlock.style.display = 'none'; }); }); });</script> <!---------- Dark and light mode button ---------> <script>jQuery(document).ready(function($) { // Function to toggle dark mode function toggleDarkMode(isDarkMode) { if (isDarkMode) { $('html').addClass('dark-skin tie-skin-inverted'); document.cookie = "light_dark_mode=dark; path=/; domain=.coinpedia.org"; $('.dark-lightimage').attr('src', 'https://image.coinpedia.org/static/common/light_mode.svg'); } else { $('html').removeClass('dark-skin tie-skin-inverted'); document.cookie = "light_dark_mode=light; path=/; domain=.coinpedia.org"; $('.dark-lightimage').attr('src', 'https://image.coinpedia.org/static/common/dark_mode.svg'); } // Update the iframe if it exists updateIframeMode(isDarkMode); } // Function to update the mode in the iframe function updateIframeMode(isDarkMode) { var $iframe = $(".tie-infinte-post-iframe").contents(); if (isDarkMode) { $iframe.find('body').addClass('dark-skin tie-skin-inverted'); } else { $iframe.find('body').removeClass('dark-skin tie-skin-inverted'); } } // Check the cookie and set the initial mode function checkDarkMode() { var storedCookie = "light"; if (storedCookie === 'dark') { toggleDarkMode(true); $('#togBtn').prop('checked', true); } else { toggleDarkMode(false); $('#togBtn').prop('checked', false); } } checkDarkMode(); // Event listener for the toggle button $('.darkModeToggle').on('click', function() { var isDarkMode = $('html').hasClass('dark-skin'); toggleDarkMode(!isDarkMode); // AJAX request to save the mode without refreshing the page $.ajax({ url: 'https://coinpedia.org/wp-admin/admin-ajax.php', type: 'POST', data: { action: 'set_dark_mode', mode: isDarkMode ? 'light' : 'dark' }, success: function(response) { // console.log('Mode switched to:', response); } }); }); // Handle iframe mode on scroll $(window).scroll(function() { var storedCookie = "light"; if (storedCookie === 'dark' && $(this).scrollTop() > 150) { $(".tie-infinte-post-iframe").contents().find('html').addClass('dark-skin tie-skin-inverted'); } else { $(".tie-infinte-post-iframe").contents().find('html').removeClass('dark-skin tie-skin-inverted'); } }); });</script> <!------- Subscriber button popup modal ------><div id="subscribe-modal-design"></div><div class="unsubscribed-popup-modal"><div class="modal header-popup"></div></div><div class="subscribed-popup-modal"><div class="modal header-popup"></div></div> <!-- Mobile search --><style>.searchbar_menu { width: 40%; } .search-bar #search-submit { background: transparent; padding: 9px 2px; line-height: 0; float: right; } .search-bar #search-input { width: 84%; } .search-bar #search-input::placeholder { color: #FAFAFA99; } .custom-search-container { position: relative; width: 100%; padding: 2px 10px; background: rgba(255, 255, 255, 0.10); border-radius: 8px; } .custom-search-design { width: 50%; } #searchform { display: flex; align-items: center; } #searchform input[type="text"] { padding: 8px 10px; border: 0; border-radius: 0; width: 100%; background: transparent; font-weight: 400; font-size: 14px; line-height: 21px; color: rgba(250, 250, 250, 0.60); outline: 0; } #searchform input[type="text"]::placeholder { color: rgba(250, 250, 250, 0.60); } #searchform button { background-color: transparent; border: 0; outline: 0; } .highlight { font-weight: 600; } .suggestion-item { padding: 12px 16px; border-bottom: 1px solid #c0d8ff; color: #0E1B1B; } #resource-suggestions .suggestion-item:last-child , .tab-content .suggestion-item:last-child { border-bottom: none; } .suggestion-item a { text-decoration: none; color: #333; display: flex; align-items: center; } .result-image { border-radius: 4px; margin-right: 12px; background-size: cover; background-repeat: no-repeat; background-position: center; width: 70px; height: 50px; margin-right: 12px; min-width: 70px; } .suggestions-box h5 a { font-weight: 700; font-size: 12px; float: right; color: #0052CC; } #resource-suggestions h5 { margin-top: 20px; } .suggestions-box h5 a img { vertical-align: middle; margin-left: 4px; width: 18px; } .suggestion-item h6 { color: #0E1B1B; font-size: 14px; font-weight: 400; line-height: 24px; margin-bottom: 0; white-space: break-spaces; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; text-transform: capitalize; } .suggestion-item ul { padding-left: 2px; list-style-type: none; } .suggestion-item ul li { color: #787F7F; display: inline-block; font-weight: 400; font-size: 12px; border-right: 1px solid #ECEDED; padding-right: 10px; margin-right: 6px; line-height: 18px; } .suggestion-item ul li:last-child { border-right: 0; padding-right: 0; margin-right: 0; } .suggestion-item p { font-size: 14px; line-height: 22px; margin: 6px 0; } .loader { position: absolute; top: 68%; left: 50%; transform: translate(-50%, -50%); width: 14px; height: 14px; border: 3px solid rgba(0, 0, 0, 0.1); border-top: 3px solid #1b1b4a; border-radius: 50%; animation: spin 1s linear infinite; z-index: 9999; background-color: rgba(255, 255, 255, 0.8); padding: 7px; } .suggestion-lists { min-height: 50px; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } #course-suggestions { position: relative; min-height: 40px; } .suggestions-box .suggestion-lists h5 { margin-top: 14px; } .highlight { font-weight: 600; } #suggestions { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-top: none; display: none; z-index: 999; padding: 0; max-height: 480px; overflow: auto; border: 1px solid #4782d5; border-radius: 8px; margin: 6px 0 0; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); min-height:160px; } #resource-suggestions .suggestion-item:last-child { border-bottom: none; } .suggestion-item a { text-decoration: none; color: #333; display: flex; } .result-image { border-radius: 8px; margin-right: 12px; background-size: cover; background-repeat: no-repeat; background-position: center; width: 80px; height: 50px; margin-right: 12px; min-width: 80px; } .suggestions-box h5 { font-weight: 600; font-size: 16px; line-height: 21px; color: #0E1B1B; margin-bottom: 4px; padding: 0 16px; } .suggestion-item h6 { color: #0E1B1B; font-size: 14px; font-weight: 400; line-height: 22px; margin-bottom: 0; white-space: break-spaces; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; } .suggestions .tab-menu { display: flex; border-bottom: 2px solid #1717171A; margin-bottom: 16px; margin-top: 10px; white-space: nowrap; overflow: auto; user-select: none; } .suggestions .tab-menu::-webkit-scrollbar-thumb, body ::-webkit-scrollbar { height: 0px; } .suggestions .tab-item { padding:16px; cursor: pointer; font-weight: 600; color: #0E1B1B; } .suggestions .tab-item.active { border-bottom: 2px solid #0052CC; background: linear-gradient(360deg, rgba(0, 82, 204, 0.26) -26.92%, rgba(0, 82, 204, 0.1) -26.91%, rgba(0, 82, 204, 0) 75.15%); color: #0052CC; } .suggestions .tab-content { display: none; } .suggestions .tab-content.active { display: block; padding: 0; } .not_found_data{ font-size: 14px; color: #78797a; margin-top: 16px; font-weight: 500; padding-left: 16px; padding-bottom: 10px; } #cryptocurrency-suggestions .result-image, #markets-exchange-suggestions .result-image, #wallet-address-suggestions .result-image{ min-width: 40px; height: 40px; width: 25px; } #wallet-address-suggestions h6{ width: 100%; } #wallet-address-suggestions .float-right{ color: #58667e; float: right; font-weight: 500; font-size: 13px; margin-top: 1px; } #wallet-address-suggestions .suggestion-item:last-child, #markets-exchange-suggestions .suggestion-item:last-child, #cryptocurrency-suggestions .suggestion-item:last-child{ border-bottom: 0; } .clear-btn{ cursor: pointer; } @media(max-width:991px){ #global-search-modal .custom-search-container{ border-radius: 8px; max-height: 42px; border: 1px solid #0052CC4D; margin-bottom: 18px; margin-top: 14px; } #global-search-modal .custom-search-container #searchform input[type="text"]{ font-size: 14px; cursor: pointer; font-weight: 600; color: #2c2f34; } #global-search-modal .custom-search-container .searchform input[type="text"]::placeholder { color: #2c2f34; font-weight: 400; } #global-search-modal .modal-content{ min-height: 550px; } #modal-suggestions{ margin-left: -30px; margin-right: -30px; position: relative; } .closemobile{ float: right; position: relative; top: 2px; width: 12px; } #global-search-modal h2{ font-size: 18px; font-weight: 600; } .tab-content .suggestion-item:last-child{ border-bottom: 0; } .suggestion-item { padding: 11px 16px; } #searchsubmit img{ margin-top: 6px; } #global-search-modal .loader{ top: 94%; } .suggestions-height{ max-height: 370px; overflow: auto; } .result-image{ width: 37px; height: 37px; min-width: 37px; } .clear-btn{ font-weight: 300; color: #b2b2b2; } }</style><div id="global-search-modal" class="modal header-popup hide"><div class="modal-dialog modal-dialog-right"><div class="modal-content"> <span class="closemobile" onclick="closeModalSearch()"><img src="https://image.coinpedia.org/static/common/close-header-modal.svg" alt="close modal" /></span><h2>Explore relevant results</h2><div class="custom-search-container"><form role="search" id="searchform" class="searchform" onsubmit="return false;"> <button type="button" id="searchsubmit"> <img src="https://image.coinpedia.org/wp-content/uploads/2024/07/13130255/new_search.png" alt="search" width="16" height="16" /> </button> <input type="text" value="" name="s" id="s" placeholder="Search Posts, Events and Professionals" onkeyup="showStaticSuggestions(this.value)" autocomplete="off" class="search-clear-mb"/> <span id="clear-btn-mb" class="clear-btn" style="display:none;" onclick="clearInput()">✖</span></form><div id="modal-suggestions" class="suggestions suggestions-box"><div class="tab-menu"><div class="tab-item active" data-tab="posts-mb">Posts</div><div class="tab-item" data-tab="events-mb">Events</div><div class="tab-item" data-tab="professionals-mb">Professionals</div><div class="tab-item" data-tab="companies-mb">Companies</div><div class="tab-item" data-tab="cryptocurrency-mb">Currencies</div><div class="tab-item" data-tab="markets-exchange-mb">Exchanges</div></div><div id="posts-mb" class="tab-content active"><h5>Posts <a href="https://coinpedia.org/?s=" class="viewAllPosts_mb">View All </a></h5><div id="resource-suggestions-mb" class="resource-suggestions suggestions-height"><p class="suggestion-item">Search keywords to find relevant posts.</p></div> <!--<div class="loader" style="display: none;"></div> --></div><div id="events-mb" class="tab-content"><h5>Events <a href="https://events.coinpedia.org/global_search/?search=" target="_blank" class="viewAllLink_mb">View All </a></h5><div id="events-suggestions-mb" class="events-suggestions suggestions-height"><p class="suggestion-item">Search keywords to find relevant events.</p></div></div><div id="professionals-mb" class="tab-content"><h5>Professionals <a href="https://events.coinpedia.org/global_search/?search=" target="_blank" class="view_professional_mb">View All </a></h5><div id="professional-suggestions-mb" class="professional-suggestions suggestions-height"><p class="suggestion-item">Search keywords to find relevant professionals.</p></div></div><div id="companies-mb" class="tab-content"><h5>Companies <a href="https://events.coinpedia.org/global_search/?search=" target="_blank" class="view_company_mb">View All </a></h5><div id="companies-suggestions-mb" class="companies-suggestions suggestions-height"><p class="suggestion-item">Search keywords to find relevant companies.</p></div></div><div id="cryptocurrency-mb" class="tab-content"><h5>Market Currencies <a href="https://markets.coinpedia.org/global_search/?search=" target="_blank" class="view_cryptocurrency_mb">View All </a></h5><div id="cryptocurrency-suggestions-mb" class="cryptocurrency-suggestions suggestions-height"><p class="suggestion-item">Search keywords to find relevant market currencies.</p></div><div id="wallet-address-suggestions"></div></div><div id="markets-exchange-mb" class="tab-content"><h5>Market Exchanges <a href="https://markets.coinpedia.org/exchanges?search=" target="_blank" class="view_exchange_mb">View All </a></h5><div id="markets-exchange-suggestions-mb" class="markets-exchange-suggestions suggestions-height"><p class="suggestion-item">Search keywords to find relevant market exchanges.</p></div></div></div></div></div></div></div> <script>/////// Mobile view ////////// // Function to open the modal function openModalSearch() { jQuery('#global-search-modal').fadeIn(); jQuery('#global-search-modal').addClass('show'); jQuery('#global-search-modal').removeClass('hide'); jQuery('#global-search-modal').modal('show'); jQuery('.site.tie-container').removeClass('side-aside-open'); } function closeModalSearch() { jQuery('#global-search-modal').fadeOut(); jQuery('#global-search-modal').removeClass('show').addClass('hide');; } function searchKeywordSuggestionMb() { jQuery('#resource-suggestions-mb').html('<p class="suggestion-item">Search keywords to find relevant posts.</p>'); jQuery('#events-suggestions-mb').html('<p class="suggestion-item">Search keywords to find relevant events.</p>'); jQuery('#professional-suggestions-mb').html('<p class="suggestion-item">Search keywords to find relevant professionals.</p>'); jQuery('#companies-suggestions-mb').html('<p class="suggestion-item">Search keywords to find relevant companies.</p>'); jQuery('#cryptocurrency-suggestions-mb').html('<p class="suggestion-item">Search keywords to find relevant market currencies.</p>'); jQuery('#markets-exchange-suggestions-mb').html('<p class="suggestion-item">Search keywords to find relevant market exchanges.</p>'); } function hideViewAllLinksMb(){ jQuery('.viewAllPosts_mb').hide(); jQuery('.viewAllLink_mb').hide(); jQuery('.view_professional_mb').hide(); jQuery('.view_company_mb').hide(); jQuery('.view_cryptocurrency_mb').hide(); jQuery('.view_exchange_mb').hide(); } function searchKeywordSuggestion() { jQuery('#resource-suggestions').html('<p class="suggestion-item">Search keywords to find relevant posts.</p>'); jQuery('#events-suggestions').html('<p class="suggestion-item">Search keywords to find relevant events.</p>'); jQuery('#professional-suggestions').html('<p class="suggestion-item">Search keywords to find relevant professionals.</p>'); jQuery('#companies-suggestions').html('<p class="suggestion-item">Search keywords to find relevant companies.</p>'); jQuery('#cryptocurrency-suggestions').html('<p class="suggestion-item">Search keywords to find relevant market currencies.</p>'); jQuery('#markets-exchange-suggestions').html('<p class="suggestion-item">Search keywords to find relevant market exchanges.</p>'); } function hideViewAllLinks(){ jQuery('.viewAllPosts').hide(); jQuery('.viewAllLink').hide(); jQuery('.view_professional').hide(); jQuery('.view_company').hide(); jQuery('.view_cryptocurrency').hide(); jQuery('.view_exchange').hide(); } jQuery(document).ready(function($) { $('.search-modal-mb').click(function() { openModalSearch(); $('.search-clear-mb').val(''); $('.clear-btn').hide(); searchKeywordSuggestionMb(); hideViewAllLinksMb(); }); $('.closemobile').click(function() { closeModalSearch(); }); $(window).click(function(event) { if ($(event.target).is('#global-search-modal')) { closeModalSearch(); } }); }); function highlightText(text, query) { const regex = new RegExp(`(${query})`, 'gi'); return text.replace(regex, '<span class="highlight">$1</span>'); } function showClearButton() { var inputValue = document.querySelector('.search-clear').value; var inputValueMb = document.querySelector('.search-clear-mb').value; if (inputValue) { document.getElementById('clear-btn').style.display = 'block'; } else { document.getElementById('clear-btn').style.display = 'none'; } if (inputValueMb) { document.getElementById('clear-btn-mb').style.display = 'block'; } else { document.getElementById('clear-btn-mb').style.display = 'none'; } } function clearInput() { document.querySelector('.search-clear').value = ''; document.getElementById('clear-btn').style.display = 'none'; document.querySelector('.search-clear-mb').value = ''; document.getElementById('clear-btn-mb').style.display = 'none'; jQuery('.hide-suggestions-tabs').hide(); setTimeout(function() { searchKeywordSuggestionMb(); hideViewAllLinksMb(); }, 2500); } document.querySelector('.search-clear')?.addEventListener('input', showClearButton); document.querySelector('.search-clear-mb')?.addEventListener('input', showClearButton); function showStaticSuggestions(query) { // Remove leading and trailing whitespace query = query.trim(); if (query === '') { setTimeout(function() { searchKeywordSuggestionMb(); hideViewAllLinks(); }, 3500); } if (query.length < 2) { jQuery('.hide-suggestions-tabs').hide(); return; } jQuery('.hide-suggestions-tabs').show(); jQuery('#resource-suggestions-mb').html('<div class="loader"></div>'); jQuery('.loader').show(); const EVENTS_HOME_URL = "https://events.coinpedia.org"; var viewAllPosts = document.getElementsByClassName('viewAllPosts')[0]; var viewAllLink = document.getElementsByClassName('viewAllLink')[0]; var viewAllLinkProfessional = document.getElementsByClassName('view_professional')[0]; var viewAllLinkCompany = document.getElementsByClassName('view_company')[0]; var viewAllLinkCryptocurrency = document.getElementsByClassName('view_cryptocurrency')[0]; var viewAllLinkExchange = document.getElementsByClassName('view_exchange')[0]; ////////// mobile ////////////////// var viewAllPostsMb = document.getElementsByClassName('viewAllPosts_mb')[0]; var viewAllLinkMb = document.getElementsByClassName('viewAllLink_mb')[0]; var viewAllLinkProfessionalMb = document.getElementsByClassName('view_professional_mb')[0]; var viewAllLinkCompanyMb = document.getElementsByClassName('view_company_mb')[0]; var viewAllLinkCryptocurrencyMb = document.getElementsByClassName('view_cryptocurrency_mb')[0]; var viewAllLinkExchangeMb = document.getElementsByClassName('view_exchange_mb')[0]; // Update the href dynamically with search query viewAllPosts.href = 'https://coinpedia.org/?s=' + encodeURIComponent(query); viewAllLink.href = 'https://events.coinpedia.org/global_search/?search=' + encodeURIComponent(query); viewAllLinkProfessional.href = 'https://events.coinpedia.org/global_search/?search=' + encodeURIComponent(query); viewAllLinkCompany.href = 'https://events.coinpedia.org/global_search/?search=' + encodeURIComponent(query); viewAllLinkCryptocurrency.href = 'https://markets.coinpedia.org/?search=' + encodeURIComponent(query); viewAllLinkExchange.href = 'https://markets.coinpedia.org/exchanges/?search=' + encodeURIComponent(query); // mobile view // Update the href dynamically with search query viewAllPostsMb.href = 'https://coinpedia.org/?s=' + encodeURIComponent(query); viewAllLinkMb.href = 'https://events.coinpedia.org/global_search/?search=' + encodeURIComponent(query); viewAllLinkProfessionalMb.href = 'https://events.coinpedia.org/global_search/?search=' + encodeURIComponent(query); viewAllLinkCompanyMb.href = 'https://events.coinpedia.org/global_search/?search=' + encodeURIComponent(query); viewAllLinkCryptocurrencyMb.href = 'https://markets.coinpedia.org/?search=' + encodeURIComponent(query); viewAllLinkExchangeMb.href = 'https://markets.coinpedia.org/exchanges/?search=' + encodeURIComponent(query); // Fetch events, speakers, and organizers jQuery.ajax({ url: 'https://coinpedia.org/wp-admin/admin-ajax.php', method: 'POST', data: { action: 'fetch_events_lists', query: query }, success: function(response) { jQuery('.loader').hide(); let data = JSON.parse(response); let eventsHTML = ''; let speakersHTML = ''; let organizersHTML = ''; if (data.message) { // Events if (data.message.events && data.message.events.length > 0) { data.message.events.forEach(function(event) { var eventsImageURL = event.event_image ? `https://image.coinpedia.org/app_uploads/events/${event.event_image}` : 'https://image.coinpedia.org/app_uploads/profile/default.png'; var eventURL = `${EVENTS_HOME_URL}/${event.event_url}`; eventsHTML += ` <div class="suggestion-item"> ${eventURL ? `<a href="${eventURL}" target="_blank"> <div class="result-image" style="background-image: url('${eventsImageURL}')"></div> <h6>${highlightText(event.event_title, query)}</h6> </a>` : `<a><div class="result-image" style="background-image: url('${eventsImageURL}')"></div> <h6>${highlightText(event.event_title, query)}</h6></a>` } </div> `; }); jQuery('#events-suggestions').html(eventsHTML); jQuery('#events-suggestions-mb').html(eventsHTML); jQuery('.viewAllLink').show(); jQuery('.viewAllLink_mb').show(); } else { jQuery('#events-suggestions').html('<div class="not_found_data">No events found.</div>'); jQuery('#events-suggestions-mb').html('<div class="not_found_data">No events found.</div>'); jQuery('.viewAllLink').hide(); jQuery('.viewAllLink_mb').hide(); } // Speakers if (data.message.speakers && data.message.speakers.length > 0) { data.message.speakers.forEach(function(speaker) { var profileImageURL = speaker.profile_image ? `https://image.coinpedia.org/app_uploads/profile/${speaker.profile_image}` : 'https://image.coinpedia.org/app_uploads/profile/default.png'; var displayNameSpeakers = speaker.full_name ? speaker.full_name : speaker.user_name; speakersHTML += ` <div class="suggestion-item"> ${speaker.user_name ? `<a href="https://app.coinpedia.org/${speaker.user_name}" target="_blank"> <div class="result-image" style="background-image: url('${profileImageURL}')"></div> <h6>${highlightText(displayNameSpeakers, query)}</h6> </a>` : `<a><div class="result-image" style="background-image: url('${profileImageURL}')"></div> <h6>${highlightText(displayNameSpeakers, query)}</h6></a>` } </div> `; }); jQuery('#professional-suggestions').html(speakersHTML); jQuery('#professional-suggestions-mb').html(speakersHTML); jQuery('.view_professional').show(); jQuery('.view_professional_mb').show(); } else { jQuery('#professional-suggestions').html('<div class="not_found_data">No professionals found.</div>'); jQuery('#professional-suggestions-mb').html('<div class="not_found_data">No professionals found.</div>'); jQuery('.view_professional').hide(); jQuery('.view_professional_mb').hide(); } // Organizers if (data.message.organizers && data.message.organizers.length > 0) { data.message.organizers.forEach(function(organizer) { var defaultImageURL = organizer.company_logo ? `https://image.coinpedia.org/app_uploads/profile/${organizer.company_logo}` : 'https://image.coinpedia.org/app_uploads/profile/default.png'; organizersHTML += ` <div class="suggestion-item"> ${organizer.company_id ? `<a href="https://app.coinpedia.org/company/${organizer.company_id}" target="_blank"> <div class="result-image" style="background-image: url('${defaultImageURL}')"></div> <h6>${highlightText(organizer.company_name, query)}</h6> </a>` : `<a><div class="result-image" style="background-image: url('${defaultImageURL}')"></div> <h6>${highlightText(organizer.company_name, query)}</h6></a>` } </div> `; }); jQuery('#companies-suggestions').html(organizersHTML); jQuery('#companies-suggestions-mb').html(organizersHTML); jQuery('.view_company').show(); jQuery('.view_company_mb').show(); } else { jQuery('#companies-suggestions').html('<div class="not_found_data">No companies found.</div>'); jQuery('#companies-suggestions-mb').html('<div class="not_found_data">No companies found.</div>'); jQuery('.view_company').hide(); jQuery('.view_company_mb').hide(); } } }, error: function() { jQuery('.loader').hide(); console.error('Failed to fetch data.'); } }); // Fetch resources jQuery.ajax({ url: 'https://coinpedia.org/wp-admin/admin-ajax.php', method: 'POST', data: { action: 'fetch_resources', query: query }, success: function(response) { let resources; try { resources = JSON.parse(response); } catch (e) { console.error('Failed to parse JSON response:', response); return; } let resourceHTML = ''; if (resources.error) { jQuery('.resourcenotfound').show().text(resources.error); } else if (resources.length > 0) { resources.forEach(function(resource) { resourceHTML += ` <div class="suggestion-item"> <a href="${resource.permalink}"> <div class="result-image" style="background-image: url('${resource.image}')"></div> <h6>${highlightText(resource.title, query)}</h6> </a> </div> `; }); jQuery('#resource-suggestions').html(resourceHTML); jQuery('.viewAllPosts').show(); jQuery('#resource-suggestions-mb').html(resourceHTML); jQuery('.viewAllPosts_mb').show(); } else { jQuery('#resource-suggestions').html('<div class="not_found_data">No posts found.</div>'); jQuery('.viewAllPosts').hide(); jQuery('#resource-suggestions-mb').html('<div class="not_found_data">No posts found.</div>'); jQuery('.viewAllPosts_mb').hide(); } const tabMenu = document.querySelector('.tab-menu'); let isDragging = false; let startX; let scrollLeft; tabMenu.addEventListener('mousedown', (e) => { isDragging = true; tabMenu.classList.add('dragging'); startX = e.pageX - tabMenu.offsetLeft; scrollLeft = tabMenu.scrollLeft; }); tabMenu.addEventListener('mouseleave', () => { isDragging = false; tabMenu.classList.remove('dragging'); }); tabMenu.addEventListener('mouseup', () => { isDragging = false; tabMenu.classList.remove('dragging'); }); tabMenu.addEventListener('mousemove', (e) => { if (!isDragging) return; e.preventDefault(); const x = e.pageX - tabMenu.offsetLeft; const move = (x - startX) * 1.5; // Adjust this value for scroll speed tabMenu.scrollLeft = scrollLeft - move; }); }, error: function(xhr, status, error) { console.error('AJAX request failed:', status, error); } }); /*************** Markets api cryptocurrency global search integration url ************************/ jQuery.ajax({ url: 'https://coinpedia.org/wp-admin/admin-ajax.php', method: 'POST', data: { action: 'fetch_markets_cryptocurrency_lists', query: query }, success: function(response) { jQuery('.loader').hide(); let data; try { data = JSON.parse(response); } catch (e) { console.error('Failed to parse response JSON:', e); return; } let crypto_base_url = 'https://markets.coinpedia.org'; let cryptocurrencyHTML = ''; let walletAddressHTML = ''; let hasCryptocurrencies = false; let hasWalletAddresses = false; jQuery('#cryptocurrency-suggestions').html(''); jQuery('#wallet-address-suggestions').html(''); // Handle cryptocurrency data if (data.cryptocurrencies && data.cryptocurrencies.message) { if (data.cryptocurrencies.message.length > 0) { hasCryptocurrencies = true; // Set the flag to true if there are cryptocurrencies data.cryptocurrencies.message.forEach(function(crypto) { let cryptoImageURL = crypto.token_image ? `https://image.coinpedia.org/app_uploads/markets/cryptocurrencies/${crypto.token_image}` : 'https://image.coinpedia.org/app_uploads/profile/default.png'; cryptocurrencyHTML += ` <div class="suggestion-item"> <a href="${crypto_base_url}/${crypto.token_id}/" target="_blank"> <div class="result-image" style="background-image: url('${cryptoImageURL}')"></div> <h6>${highlightText(crypto.token_name, query)} ${crypto.symbol}</h6> </a> </div> `; }); jQuery('#cryptocurrency-suggestions').html(cryptocurrencyHTML); jQuery('.view_cryptocurrency').show(); jQuery('#cryptocurrency-suggestions-mb').html(cryptocurrencyHTML); jQuery('.view_cryptocurrency_mb').show(); } } else { console.error('Unexpected data format for cryptocurrencies:', data); } // If cryptocurrencies data is empty, check wallet addresses if (!hasCryptocurrencies && data.wallet_addresses && data.wallet_addresses.message) { if (Object.keys(data.wallet_addresses.message).length > 0) { hasWalletAddresses = true; var wallet_data = data.wallet_addresses.message.currency; var walletImageURL = '/assets/img/default_token.png'; walletAddressHTML += ` <div class="suggestion-item"> <a href="${crypto_base_url}/${data.wallet_addresses.network_id}/${query}" target="_blank"> <div class="result-image" style="background-image: url('${crypto_base_url}/${walletImageURL}')"></div> <h6>${highlightText(wallet_data.name, query)} (${wallet_data.symbol}) <span class="float-right">#${wallet_data.tokenType} </span></h6> </a> </div> `; jQuery('#wallet-address-suggestions').html(walletAddressHTML); jQuery('.view_cryptocurrency').hide(); jQuery('#wallet-address-suggestions-mb').html(walletAddressHTML); jQuery('.view_cryptocurrency_mb').hide(); } } else if (!hasCryptocurrencies) { console.error('Unexpected data format for wallet addresses:', data); } // Display "not found" message only if both are empty if (!hasCryptocurrencies && !hasWalletAddresses) { jQuery('#cryptocurrency-suggestions').html('<div class="not_found_data">No currencies found.</div>'); jQuery('.view_cryptocurrency').hide(); jQuery('#cryptocurrency-suggestions-mb').html('<div class="not_found_data">No currencies found.</div>'); jQuery('.view_cryptocurrency_mb').hide(); } }, error: function() { jQuery('.loader').hide(); console.error('Failed to fetch data.'); } }); /********* Markets exchange api integration ********************/ jQuery.ajax({ url: 'https://coinpedia.org/wp-admin/admin-ajax.php', method: 'POST', data: { action: 'fetch_markets_exchange_lists', query: query }, success: function(response) { jQuery('.loader').hide(); let data; try { data = JSON.parse(response); } catch (e) { console.error('Failed to parse response JSON:', e); return; } let exchangecurrencyHTML = ''; if (data.message) { if (data.message.length > 0) { data.message.forEach(function(exchange) { let exchange_base_url = 'https://markets.coinpedia.org'; let exchangeImageURL = exchange.exchange_image ? `https://image.coinpedia.org/app_uploads/markets/exchanges/${exchange.exchange_image}` : 'https://image.coinpedia.org/app_uploads/profile/default.png'; exchangecurrencyHTML += ` <div class="suggestion-item"> <a href="${exchange_base_url}/exchange/${exchange.exchange_slug}/" target="_blank"> <div class="result-image" style="background-image: url('${exchangeImageURL}')"></div> <h6>${highlightText(exchange.exchange_name, query)}</h6> </a> </div> `; }); jQuery('#markets-exchange-suggestions').html(exchangecurrencyHTML); jQuery('.view_exchange').show(); jQuery('#markets-exchange-suggestions-mb').html(exchangecurrencyHTML); jQuery('.view_exchange_mb').show(); } else { jQuery('#markets-exchange-suggestions').html('<div class="not_found_data">No market exchanges found.</div>'); jQuery('.view_exchange').hide(); jQuery('#markets-exchange-suggestions-mb').html('<div class="not_found_data">No market exchanges found.</div>'); jQuery('.view_exchange_mb').hide(); } } else { console.error('Unexpected data format:', data); } }, error: function() { jQuery('.loader').hide(); console.error('Failed to fetch data.'); } }); } jQuery(document).ready(function($) { $('.tab-item').on('click', function() { var tabId = $(this).data('tab'); $('.tab-item').removeClass('active'); $(this).addClass('active'); $('.tab-content').removeClass('active'); $('#' + tabId).addClass('active'); }); $(document).click(function(event) { if (!$(event.target).closest('.custom-search-container').length) { $('.hide-suggestions-tabs').hide(); } }); });</script> </body></html>