Skip to content

Commit

Permalink
substr -> substring
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed Jan 6, 2024
1 parent edff536 commit 776e048
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ $(document).ready(async function() {
// local feed
let pathname = window.location.pathname;
if (pathname.endsWith("/")) {
pathname = pathname.substr(0, pathname.length-1);
pathname = pathname.substring(0, pathname.length-1);
}
url = `${window.location.protocol}//${window.location.host}${pathname}${data}`;
// initiate a request just to get a head start on resolving urls
Expand Down Expand Up @@ -300,7 +300,7 @@ $(document).ready(async function() {
$("#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("=")));
const params = toObject(window.location.search.substring(1).split("&").map((arg) => arg.split("=")));
if (params.q) {
$('input[type="search"]').val(params.q);
}
Expand Down

0 comments on commit 776e048

Please sign in to comment.