Skip to content

Instantly share code, notes, and snippets.

View short_url.js
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
/**
* Respond to the request
* @param {Request} request
*/
async function handleRequest(request) {
// 檢查網址後面有沒有東西
View index.html
<a>https://blog.toolman.xyz</a>