Skip to content

Commit

Permalink
upde: moved files & add transfer data
Browse files Browse the repository at this point in the history
  • Loading branch information
xonnu committed Sep 12, 2021
1 parent e54b472 commit c49d4a3
Show file tree
Hide file tree
Showing 15 changed files with 86 additions and 19 deletions.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
74 changes: 55 additions & 19 deletions index.bak.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,40 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content= "width=device-width, user-scalable=no">
<title> Chronobiks </title>
<link rel="apple-touch-icon" sizes="180x180" href="app/build/assets/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="app/build/assets/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="app/build/assets/favicon/favicon-16x16.png">
<link rel="manifest" href="app/build/assets/favicon/site.webmanifest">
<link rel="mask-icon" href="app/build/assets/favicon/safari-pinned-tab.svg" color="#5bbad5">
<link rel="apple-touch-icon" sizes="180x180" href="app/build/assets/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="app/build/assets/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="app/build/assets/favicon-16x16.png">
<link rel="manifest" href="app/build/assets/site.webmanifest">
<link rel="mask-icon" href="app/build/assets/safari-pinned-tab.svg" color="#5bbad5">
<meta name="apple-mobile-web-app-title" content="Chronobiks">
<meta name="application-name" content="Chronobiks">
<meta name="msapplication-TileColor" content="#2b5797">
<meta name="msapplication-TileImage" content="app/build/assets/favicon/mstile-144x144.png">
<meta name="msapplication-TileImage" content="app/build/assets/mstile-144x144.png">
<meta name="theme-color" content="#ffffff">
<meta name="title" content="Chronobiks">
<meta name="description" content="This web app was created by @heychrono, this was his personal project called Chronobiks. Chrono, built this for himself and to others, this website application helps the Rubik’s beginners to gain an insight of their improvements">
<meta name="description" content="Chronobiks is a speed-solving Rubik's Cube timer, a stopwatch that collects and analyzes your training statistics and allows you to keep track of your time.">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://chronobiks.netlify.app/">
<meta property="og:url" content="https://chronobiks.tech">
<meta property="og:title" content="Chronobiks">
<meta property="og:description" content="This web app was created by @heychrono, this was his personal project called Chronobiks. Chrono, built this for himself and to others, this website application helps the Rubik’s beginners to gain an insight of their improvements">
<meta property="og:image" content="https://chronobiks.netlify.app/app/build/assets/cover.gif">
<meta property="og:description" content="Chronobiks is a speed-solving Rubik's Cube timer, a stopwatch that collects and analyzes your training statistics and allows you to keep track of your time.">
<meta property="og:image" content="https://chronobiks.tech/app/build/assets/cover.gif">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://chronobiks.netlify.app/">
<meta property="twitter:url" content="https://chronobiks.tech/">
<meta property="twitter:title" content="Chronobiks">
<meta property="twitter:description" content="This web app was created by @heychrono, this was his personal project called Chronobiks. Chrono, built this for himself and to others, this website application helps the Rubik’s beginners to gain an insight of their improvements">
<meta property="twitter:image" content="https://chronobiks.netlify.app/app/build/assets/cover.gif">
<meta property="twitter:description" content="Chronobiks is a speed-solving Rubik's Cube timer, a stopwatch that collects and analyzes your training statistics and allows you to keep track of your time.">
<meta property="twitter:image" content="https://chronobiks.tech/app/build/assets/cover.gif">
<link rel="preload" href="app/build/style/main.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="app/build/style/main.min.css"></noscript>
<link rel="stylesheet" href="app/build/style/main.min.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;600&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;600&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link href="https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;600&display=swap" rel="stylesheet"></noscript>
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript> <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet"></noscript>

</head>

<body id="go" class="go go--hide">
Expand Down Expand Up @@ -194,11 +199,11 @@ <h2>🗑️ Reset time list</h2>
<div class="sidebar__footer">
<p>Made with ☕ by <a href="https://fb.me/heychrono" target="_blank" rel="noopener">Justin
Pacual</a><a href="https://github.com/heychrono/Chronobiks" target="_blank"
rel="noopener">Chronobiks v1</a> | September 2021 <a href="../LICENSE.md" target="_blank"
rel="noopener">Chronobiks v1</a> | September 2021 <a href="LICENSE.md" target="_blank"
rel="noopener">MIT License</a></p>
</div>

<a href="https://simpleanalytics.com/?utm_source=chronobiks.netlify.app&utm_content=badge" referrerpolicy="origin" target="_blank"><img src="https://simpleanalyticsbadge.com/chronobiks.netlify.app?counter=true" loading="lazy" referrerpolicy="no-referrer" crossorigin="anonymous" style="inline-size: 150px;margin: 10px 0;" /></a>
<a href="https://simpleanalytics.com/?utm_source=chronobiks.tech&utm_content=badge" referrerpolicy="origin" target="_blank"><img src="https://simpleanalyticsbadge.com/chronobiks.netlify.app?counter=true" loading="lazy" referrerpolicy="no-referrer" crossorigin="anonymous" style="inline-size: 150px;margin: 10px 0;" /></a>
</div>

<section class="timer__trigger">
Expand Down Expand Up @@ -257,10 +262,41 @@ <h4 class="sidebar__heading">✨ Newest</h4>
<script src="app/build/script/timer.min.js" async defer></script>
<script src="app/build/script/sidebar.min.js" async defer></script>
<script src="app/build/script/modal.min.js" async defer></script>
<script defer>
<script>
function getParameterByName(name, url = window.location.href) {
name = name.replace(/[\[\]]/g, '\\$&');
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, ' '));
}

const domain = window.location.hostname;
const newDomain = 'chronobiks.tech';
const oldDomain = 'chronobiks.netlify.app';
const timeListData = encodeURI(btoa(localStorage.getItem('chronobiks-2021-v1')));
const getTimeListData = getParameterByName('transfer-data');

if(domain == oldDomain) {
if(localStorage.getItem('chronobiks-2021-v1') == 'false') {
location.href = 'https://' + newDomain + '/?new-user=true';
} else {
location.href = 'https://' + newDomain + '/?transfer-data=' + timeListData;
}
}

if(domain == newDomain) {
if(localStorage.getItem('chronobiks-2021-v1') == 'false') {
localStorage.setItem('chronobiks-2021-v1', atob(getTimeListData));
location.href = 'https://' + newDomain + '/transfer_success'
}
}
</script>
<script>
(function(h,o,t,j,a,r){
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
h._hjSettings={hjid:2580734,hjsv:6};
h._hjSettings={hjid:2598059,hjsv:6};
a=o.getElementsByTagName('head')[0];
r=o.createElement('script');r.async=1;
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
Expand Down
31 changes: 31 additions & 0 deletions transfer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<script>
function getParameterByName(name, url = window.location.href) {
name = name.replace(/[\[\]]/g, '\\$&');
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, ' '));
}

const domain = window.location.hostname;
const newDomain = 'chronobiks.tech';
const oldDomain = 'chronobiks.netlify.app';
const timeListData = encodeURI(btoa(localStorage.getItem('chronobiks-2021-v1')));
const getTimeListData = getParameterByName('transfer-data');

if(domain == oldDomain) {
if(localStorage.getItem('chronobiks-2021-v1') == 'false') {
location.href = 'https://' + newDomain + '/?new-user=true';
} else {
location.href = 'https://' + newDomain + '/?transfer-data=' + timeListData;
}
}

if(domain == newDomain) {
if(localStorage.getItem('chronobiks-2021-v1') == 'false') {
localStorage.setItem('chronobiks-2021-v1', atob(getTimeListData));
location.href = 'https://' + newDomain + '/transfer_success'
}
}
</script>

0 comments on commit c49d4a3

Please sign in to comment.