Skip to content

Commit

Permalink
Add Pomodoro on YouTube
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminoakes committed Feb 12, 2024
1 parent 327a84a commit 0790ea1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<option value="mailto:{{rememberTheMilkInboxEmail}}?subject={{simpleTitle}}%20{{url}}%20">Milk, Remember the 馃惍</option>
<option value="mailto:{{rememberTheMilkInboxEmail}}?subject={{title}}%20{{url}}%20!1">Milk, Remember the (full title, priority 1) 馃惍</option>
<option value="mailto:{{rememberTheMilkInboxEmail}}?subject={{title}}%20{{url}}%20">Milk, Remember the (full title) 馃惍</option>
<option value="https://musical-pomodoro.surge.sh/?v={{vParam}}">Pomodoro on YouTube 馃崊</option>
<option value="https://benjaminoakes.github.io/qrcodejs/index-svg.html?text={{url}}">QR Code 馃嚩</option>
<option value="https://www.reviewmeta.com/search?q={{url}}">ReviewMeta 馃嚪</option>
<option value="https://smmry.com/{{rawUrl}}#&SM_LENGTH=3">SMMRY (3 sentences) 鉃★笍</option>
Expand Down Expand Up @@ -91,6 +92,7 @@

const url = searchParams.get("url")
const parsedUrl = new URL(url)
const vParam = url.match(/v=([^&]+)/)?.[1]
const title = searchParams.get("title")
const simpleTitle = title.split(/ [-|路] /)[0].replace(/\[[^\]]+\]/, '').trim()

Expand All @@ -116,6 +118,7 @@
replace("{{url}}", encodeURIComponent(url)).
replace("{{uuid}}", uuid).
replace("{{rawUrl}}", url).
replace("{{vParam}}", vParam).
replace("{{simpleTitle}}", encodeURIComponent(simpleTitle)).
replace("{{title}}", encodeURIComponent(title))

Expand Down

0 comments on commit 0790ea1

Please sign in to comment.