Skip to content

Commit

Permalink
Fix the tz element making the button square (i.e. not rounded on th…
Browse files Browse the repository at this point in the history
…e right side) because it is not the last element anymore.
  • Loading branch information
stefansundin committed Jan 3, 2024
1 parent 9af8809 commit 5c30c34
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions public/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ try {
}
} catch {}

function pad(s) {
return ("0"+s).slice(-2);
}

function sign(n) {
if (n < 0) {
return "-";
Expand Down Expand Up @@ -301,7 +297,7 @@ $(document).ready(async function() {

const tz_offset = -new Date().getTimezoneOffset();
if (tz_offset != 0) {
$("form[action=youtube]").append($('<input type="hidden" name="tz">').val(`${sign(tz_offset)}${pad(Math.abs(tz_offset/60))}:${pad(Math.abs(tz_offset%60))}`));
$("#youtube_q").after($('<input type="hidden" name="tz">').val(`${sign(tz_offset)}${Math.abs(tz_offset/60).toString().padStart(2,'0')}:${Math.abs(tz_offset%60).toString().padStart(2,'0')}`));
}

const params = toObject(window.location.search.substr(1).split("&").map((arg) => arg.split("=")));
Expand Down

0 comments on commit 5c30c34

Please sign in to comment.