# HG changeset patch # User June Park # Date 1767405742 28800 # Node ID be91a73d801aab23817f22f0aabda07a6dd35eff # Parent 655ea0b661fdc8dc6c45c2e759aeba65e381dfe8 [MrJuneJune] Updated my website. diff -r 655ea0b661fd -r be91a73d801a mrjunejune/src/index.html --- a/mrjunejune/src/index.html Fri Jan 02 17:47:10 2026 -0800 +++ b/mrjunejune/src/index.html Fri Jan 02 18:02:22 2026 -0800 @@ -23,17 +23,18 @@ -

During my free time, I like to write codes mostly in C, Python, and Typescript.

-

This website is hosted using my own server library which I wrote in C.

+

During my free time, I like to write codes mostly in C, Python, and Typescript. All in mono repo styles using mercurial and bazel. (I know that is mentally ill...)

+

Feel free to check it out. My bad code..

Links

+ + {{/parts/footer.html}} diff -r 655ea0b661fd -r be91a73d801a mrjunejune/src/tools/file_converter/index.html --- a/mrjunejune/src/tools/file_converter/index.html Fri Jan 02 17:47:10 2026 -0800 +++ b/mrjunejune/src/tools/file_converter/index.html Fri Jan 02 18:02:22 2026 -0800 @@ -148,120 +148,8 @@ + {{/parts/footer.html}} - - + diff -r 655ea0b661fd -r be91a73d801a mrjunejune/src/tools/file_converter/index.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mrjunejune/src/tools/file_converter/index.js Fri Jan 02 18:02:22 2026 -0800 @@ -0,0 +1,114 @@ +async function convertImageToWebP() +{ + const input = document.getElementById('imageInput'); + const btn = document.getElementById('convertImageBtn'); + const loading = document.getElementById('imageLoading'); + const result = document.getElementById('imageResult'); + const message = document.getElementById('imageMessage'); + const download = document.getElementById('imageDownload'); + + if (!input.files || !input.files[0]) + { + alert('Please select an image file first'); + return; + } + + const file = input.files[0]; + + // Show loading state + btn.disabled = true; + loading.classList.add('show'); + result.classList.remove('show', 'success', 'error'); + download.style.display = 'none'; + + try { + const response = await fetch('/api/convert/image-to-webp', { + method: 'POST', + body: file, + headers: { + 'Content-Type': file.type + } + }); + + loading.classList.remove('show'); + result.classList.add('show'); + + if (response.ok) { + const data = await response.json(); + + download.href = data.download_url; + download.download = file.name.replace(/\.[^/.]+$/, '') + '.webp'; + download.style.display = 'inline-block'; + + message.textContent = 'Conversion successful! Link expires in ' + data.expires + '.'; + result.classList.add('success'); + } else { + const text = await response.text(); + message.textContent = 'Conversion failed: ' + text; + result.classList.add('error'); + } + } catch (error) { + loading.classList.remove('show'); + result.classList.add('show', 'error'); + message.textContent = 'Error: ' + error.message; + } finally { + btn.disabled = false; + } +} + +async function convertVideoToMP4() { + const input = document.getElementById('videoInput'); + const btn = document.getElementById('convertVideoBtn'); + const loading = document.getElementById('videoLoading'); + const result = document.getElementById('videoResult'); + const message = document.getElementById('videoMessage'); + const download = document.getElementById('videoDownload'); + + if (!input.files || !input.files[0]) { + alert('Please select a video file first'); + return; + } + + const file = input.files[0]; + + // Show loading state + btn.disabled = true; + loading.classList.add('show'); + result.classList.remove('show', 'success', 'error'); + download.style.display = 'none'; + + try { + const response = await fetch('/api/convert/video-to-mp4', { + method: 'POST', + body: file, + headers: { + 'Content-Type': file.type + } + }); + + loading.classList.remove('show'); + result.classList.add('show'); + + if (response.ok) { + const data = await response.json(); + + download.href = data.download_url; + download.download = file.name.replace(/\.[^/.]+$/, '') + '.mp4'; + download.style.display = 'inline-block'; + + message.textContent = 'Conversion successful! Link expires in ' + data.expires + '.'; + result.classList.add('success'); + } else { + const text = await response.text(); + message.textContent = 'Conversion failed: ' + text; + result.classList.add('error'); + } + } catch (error) { + loading.classList.remove('show'); + result.classList.add('show', 'error'); + message.textContent = 'Error: ' + error.message; + } finally { + btn.disabled = false; + } +} + diff -r 655ea0b661fd -r be91a73d801a mrjunejune/src/tools/index.html --- a/mrjunejune/src/tools/index.html Fri Jan 02 17:47:10 2026 -0800 +++ b/mrjunejune/src/tools/index.html Fri Jan 02 18:02:22 2026 -0800 @@ -12,6 +12,13 @@
  • MarkDown to HTML
  • Images to Webp / Video to Mp4
  • +

    TODOs

    +

    Probably should add this...

    + + {{/parts/footer.html}} diff -r 655ea0b661fd -r be91a73d801a mrjunejune/src/tools/markdown_to_html/index.html --- a/mrjunejune/src/tools/markdown_to_html/index.html Fri Jan 02 17:47:10 2026 -0800 +++ b/mrjunejune/src/tools/markdown_to_html/index.html Fri Jan 02 18:02:22 2026 -0800 @@ -67,7 +67,7 @@
    - + {{/parts/footer.html}}