UNPKG

@andatoshiki/fuki

Version:

🐳 A lovely self-hosted yet serverless link shortener service via CloudFlare Workers!

272 lines (267 loc) β€’ 9.36 kB
<!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="txt/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <link rel="stylesheet" href="https://jsd.toshiki.dev/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css" integrity="sha256-L/W5Wfqfa0sdBNIKN9cG6QA5F2qx4qICmU2VgLruv9Y=" crossorigin="anonymous" /> <link rel="stylesheet" href="https://jsd.toshiki.dev/npm/font-awesome@4.7.0/css/font-awesome.min.css" /> <link rel="stylesheet" href="https://jsd.toshiki.dev/npm/fuki@0.0.1/src/styles/style.css" /> <script async defer data-website-id="d4ae2914-5736-415e-94c3-f13b3b8df166" src="https://umami.toshiki.dev/umami.js" ></script> <link rel="shortcut icon" href="https://r2.toshiki.dev/favicon.ico" type="image/x-icon" /> <title>Fuki 不期 | Your lovely URL shortener</title> </head> <body> <a href="https://github.com/toshikidev/fuki" class="github-corner" aria-label="View source on GitHub" ><svg width="80" height="80" viewBox="0 0 250 250" style=" fill: #00d26a; color: #fff; position: absolute; top: 0; border: 0; left: 0; transform: scale(-1, 1); " aria-hidden="true" > <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path> <path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px" class="octo-arm" ></path> <path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body" ></path></svg></a ><style> .github-corner:hover .octo-arm { animation: octocat-wave 560ms ease-in-out; } @keyframes octocat-wave { 0%, 100% { transform: rotate(0); } 20%, 60% { transform: rotate(-25deg); } 40%, 80% { transform: rotate(10deg); } } @media (max-width: 500px) { .github-corner:hover .octo-arm { animation: none; } .github-corner .octo-arm { animation: octocat-wave 560ms ease-in-out; } } </style> <div class="fixed-top d-flex justify-content-end m-5"> <div class="toast" style="min-height: 50px"> <div class="toast-header"> <img width="18px" class="rounded mr-2" src="https://r2.toshiki.dev/image/coffee.png" alt="coffee" /> <strong class="mr-auto">Hello from developers!</strong> <button type="button" class="ml-2 mb-1 close" data-dismiss="toast"> <span>&times;</span> </button> </div> <div class="toast-body"> Welcome to use fuki.cc url shortener, fuki is a moe site made with <i class="fa fa-heart fa-beat heart"></i> by <a href="http://github.com/toshikidev">toshikidev</a>! Happy shortening! </div> </div> </div> <div class="card"> <h5 class="card-header">βœ… Welcome to <code>fuki.cc</code>!</h5> <div class="card-body"> <h5 class="card-title">Enter a URL to shorten:</h5> <div class="input-group mb-3"> <input type="text" class="form-control" placeholder="Example: https://example.com/ (Must with http or https prefix)" id="text" /> <div class="input-group-append"> <button class="btn btn-primary" type="button" onclick="shorturl()" id="searchbtn"> Shorten it! </button> </div> </div> <div class="card-text btn btn-success"> <a href="https://github.com/toshikidev/fuki" target="_self" ><i class="fa fa-github" aria-hidden="true"></i> GitHub source</a > </div> <div data-toggle="modal" data-target="#exampleModalCenter" type="button" class="btn btn-primary btn-circle btn-sm" > <i class="fa fa-question-circle" aria-hidden="true"></i> </div> </div> </div> <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" > <div class="modal-dialog .popup" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Result</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> </div> <div class="modal-body" id="result">No result</div> <div class="modal-footer"> <button type="button" class="btn btn-primary" onclick='copyurl("result")' data-toggle="popover" data-placement="bottom" data-content="Copied!" > Copy </button> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> </div> </div> </div> </div> <!-- modal --> <div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true" > <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalCenterTitle"><strong>Note</strong></h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> </div> <div class="modal-body light"> Hey there! We're overjoyed to let you know that Fuki is now running on CloudFlare Workers on a free plan. Although this is fantastic, we understand that it may come with some issues. As such, if Fuki appears to be down or receiving constant errors when shortening URLs, it's possible that the Worker has reached its daily limit. We sincerely apologize for any inconvenience this may be causing, and kindly ask you to please try again later. It's also possible that Fuki is receiving large bandwidth flooding, so please bear with us and be patient! To avoid this issue in the future, you could consider self-hosting Fuki or donating to Fuki to ensure better performance. We thank you for your understanding and your continued support! </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> </div> </div> </div> </div> <!-- modal ends --> <script src="https://jsd.toshiki.dev/npm/jquery@3.4.1/dist/jquery.slim.min.js" integrity="sha256-pasqAKBDmFT4eHoN2ndd6lN370kFiGUFyTiUHWhU7k8=" crossorigin="anonymous" ></script> <script src="https://jsd.toshiki.dev/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous" ></script> <script src="https://jsd.toshiki.dev/npm/bootstrap@4.4.1/dist/js/bootstrap.min.js" integrity="sha256-WqU1JavFxSAMcLP2WIOI+GB2zWmShMI82mTpLDcqFUg=" crossorigin="anonymous" ></script> <script src="https://jsd.toshiki.dev/npm/@andatoshiki/fuki@0.0.1/main.js" crossorigin="anonymous"></script> <script src="https://jsd.toshiki.dev/gh/andatoshiki/toshiki-cdn@master/js/sakura.js"></script> <script src="https://jsd.toshiki.dev/npm/@andatoshiki/fuki@0.0.1/src/plugins/blockkeys.js"></script> <script src="https://jsd.toshiki.dev/npm/@andatoshiki/fuki@0.0.1/src/plugins/urusai.js"></script> <script src="https://jsd.toshiki.dev/npm/@andatoshiki/fuki@0.0.1/src/plugins/tooltips.js"></script> <script src="https://jsd.toshiki.dev/npm/@andatoshiki/fuki@0.0.1/src/plugins/modal.js"></script> <!-- <script> window.onload = { requestHeaders: { 'cache-control': 'max-age=0', }, } </script> --> <script> document.addEventListener('keydown', function (event) { if (event.keyCode === 123) { $('.toast') .toast({ delay: 5000, }) .toast('show') .on('hidden.bs.toast', function () { $('.toast').toast('dispose') }) console.log('F12 key was pressed') } }) $('.toast') .toast({ delay: 5000, }) .toast('show') .on('hidden.bs.toast', function () { $('.toast').toast('dispose') }) </script> <div id="links"> <div id="fadeIn" align="center"> 🍭<a href="https://status.toshiki.dev" target="_blank" class="links card-text" id="a1">Status</a ><a class="links"> ・ </a>🍒<a class="links card-text" href="https://github.com/toshiki/fuki/#fuki" target="_blank" id="a2" >Doc</a ><a class="links" id="a4"> ・ </a>🍑<a class="links card-text" href="https://workers.cloudflare.com" target="_blank" id="a3" >Workers</a > </div> </div> </body> </html>